Commit 218524d1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Update buttons when we fill combobox

parent be0e4824
......@@ -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();
......
......@@ -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;
......
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