Commit 8ac5b199 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve custom item

parent 180944a1
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.13.41")
set(PIM_VERSION "5.13.42")
project(pimcommon VERSION ${PIM_VERSION})
......
......@@ -304,12 +304,20 @@ void SimpleStringListEditor::slotAdd()
void SimpleStringListEditor::slotCustomize()
{
customEntry();
QListWidgetItem *item = d->mListBox->currentItem();
if (!item) {
return;
}
const QString newText = customEntry(item->text());
if (!newText.isEmpty()) {
item->setText(newText);
Q_EMIT changed();
}
}
void SimpleStringListEditor::customEntry()
QString SimpleStringListEditor::customEntry(const QString &text)
{
//TODO
return {};
}
void SimpleStringListEditor::slotRemove()
......
......@@ -91,7 +91,7 @@ public:
Q_REQUIRED_RESULT QSize sizeHint() const override;
virtual void addNewEntry();
virtual void customEntry();
virtual QString customEntry(const QString &text);
Q_REQUIRED_RESULT virtual QString modifyEntry(const QString &text);
void setAddDialogLabel(const QString &addDialogLabel);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment