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

List:       kde-commits
Subject:    [kdepim-addons/Applications/17.08] plugins/messageviewerplugins/createeventplugin: Update buttons wh
From:       Montel Laurent <null () kde ! org>
Date:       2017-08-14 11:25:08
Message-ID: E1dhDUa-00033k-PL () code ! kde ! org
[Download RAW message or body]

Git commit 218524d1d79eae31b00f0c831fead9e06d1683d0 by Montel Laurent.
Committed on 14/08/2017 at 11:24.
Pushed by mlaurent into branch 'Applications/17.08'.

Update buttons when we fill combobox

M  +6    -0    plugins/messageviewerplugins/createeventplugin/eventedit.cpp
M  +1    -0    plugins/messageviewerplugins/createeventplugin/eventedit.h

https://commits.kde.org/kdepim-addons/218524d1d79eae31b00f0c831fead9e06d1683d0

diff --git a/plugins/messageviewerplugins/createeventplugin/eventedit.cpp \
b/plugins/messageviewerplugins/createeventplugin/eventedit.cpp index \
                8f9b1ced..50be17c0 100644
--- a/plugins/messageviewerplugins/createeventplugin/eventedit.cpp
+++ b/plugins/messageviewerplugins/createeventplugin/eventedit.cpp
@@ -81,6 +81,7 @@ EventEdit::EventEdit(QWidget *parent)
 #endif
     mCollectionCombobox->setToolTip(i18n("Calendar where the new event will be \
stored"));  
+    connect(mCollectionCombobox->model(), &QAbstractItemModel::rowsInserted, this, \
&EventEdit::comboboxRowInserted);  connect(mCollectionCombobox, static_cast<void \
(Akonadi::CollectionComboBox::*)(int)>(&Akonadi::CollectionComboBox::currentIndexChanged), \
this, &EventEdit::slotCollectionChanged);  connect(mCollectionCombobox, \
static_cast<void (Akonadi::CollectionComboBox::*)(int)>(&Akonadi::CollectionComboBox::activated), \
this, &EventEdit::slotCollectionChanged);  hbox->addWidget(mCollectionCombobox);
@@ -164,6 +165,11 @@ EventEdit::~EventEdit()
     writeConfig();
 }
 
+void EventEdit::comboboxRowInserted()
+{
+    slotUpdateButtons(mEventEdit->text());
+}
+
 void EventEdit::writeConfig()
 {
     const Akonadi::Collection col = mCollectionCombobox->currentCollection();
diff --git a/plugins/messageviewerplugins/createeventplugin/eventedit.h \
b/plugins/messageviewerplugins/createeventplugin/eventedit.h index 4625b542..d30efa5c \
                100644
--- a/plugins/messageviewerplugins/createeventplugin/eventedit.h
+++ b/plugins/messageviewerplugins/createeventplugin/eventedit.h
@@ -70,6 +70,7 @@ protected:
     bool eventFilter(QObject *object, QEvent *e) override;
 private:
     void readConfig();
+    void comboboxRowInserted();
     Akonadi::Collection mCollection;
     KMime::Message::Ptr mMessage;
     QLineEdit *mEventEdit;


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

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