[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim-addons/Applications/17.08] plugins/messageviewerplugins/createtodoplugin: Fix update button
From:       Montel Laurent <null () kde ! org>
Date:       2017-08-14 6:59:48
Message-ID: E1dh9Lo-00077E-DL () code ! kde ! org
[Download RAW message or body]

Git commit be0e48243446ebedbde80d1d379ec170581f543c by Montel Laurent.
Committed on 14/08/2017 at 06:58.
Pushed by mlaurent into branch 'Applications/17.08'.

Fix update button

Bug found by ervin

M  +6    -0    plugins/messageviewerplugins/createtodoplugin/todoedit.cpp
M  +1    -0    plugins/messageviewerplugins/createtodoplugin/todoedit.h

https://commits.kde.org/kdepim-addons/be0e48243446ebedbde80d1d379ec170581f543c

diff --git a/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp \
b/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp index 85125de8..b57443d3 \
                100644
--- a/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp
+++ b/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp
@@ -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();
diff --git a/plugins/messageviewerplugins/createtodoplugin/todoedit.h \
b/plugins/messageviewerplugins/createtodoplugin/todoedit.h index 70c1a847..381442cf \
                100644
--- a/plugins/messageviewerplugins/createtodoplugin/todoedit.h
+++ b/plugins/messageviewerplugins/createtodoplugin/todoedit.h
@@ -61,6 +61,7 @@ Q_SIGNALS:
 protected:
     bool eventFilter(QObject *object, QEvent *e) override;
 private:
+    void comboboxRowInserted();
     void slotReturnPressed();
     void slotCollectionChanged(int);
     void slotOpenEditor();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic