Commit be0e4824 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix update button

Bug found by ervin
parent 8941cfbd
......@@ -83,6 +83,7 @@ TodoEdit::TodoEdit(QWidget *parent)
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << KCalCore::Todo::todoMimeType());
mCollectionCombobox->setObjectName(QStringLiteral("akonadicombobox"));
connect(mCollectionCombobox->model(), &QAbstractItemModel::rowsInserted, this, &TodoEdit::comboboxRowInserted);
#ifndef QT_NO_ACCESSIBILITY
mCollectionCombobox->setAccessibleDescription(i18n("Todo list where the new task will be stored."));
#endif
......@@ -135,6 +136,11 @@ TodoEdit::~TodoEdit()
writeConfig();
}
void TodoEdit::comboboxRowInserted()
{
updateButtons(mNoteEdit->text());
}
void TodoEdit::updateButtons(const QString &subject)
{
const bool subjectIsNotEmpty = !subject.trimmed().isEmpty();
......
......@@ -61,6 +61,7 @@ Q_SIGNALS:
protected:
bool eventFilter(QObject *object, QEvent *e) override;
private:
void comboboxRowInserted();
void slotReturnPressed();
void slotCollectionChanged(int);
void slotOpenEditor();
......
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