Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a0bd024f authored by Igor Poboiko's avatar Igor Poboiko

Fix duplicated entries in Google Calendar and Tasks resource settings dialog

Differential Revision: https://phabricator.kde.org/D9715
parent 9fd6167a
......@@ -169,7 +169,7 @@ void SettingsDialog::slotReloadTaskLists()
}
TaskListFetchJob *fetchJob = new TaskListFetchJob(account, this);
connect(fetchJob, &CalendarFetchJob::finished, this, &SettingsDialog::slotTaskListsRetrieved);
connect(fetchJob, &TaskListFetchJob::finished, this, &SettingsDialog::slotTaskListsRetrieved);
m_taskListsBox->setDisabled(true);
m_taskListsList->clear();
......@@ -189,6 +189,7 @@ void SettingsDialog::slotCalendarsRetrieved(Job *job)
if (currentAccount()->accountName() == Settings::self()->account()) {
activeCalendars = Settings::self()->calendars();
}
m_calendarsList->clear();
for (const ObjectPtr &object : objects) {
CalendarPtr calendar = object.dynamicCast<Calendar>();
......@@ -216,6 +217,7 @@ void SettingsDialog::slotTaskListsRetrieved(Job *job)
if (currentAccount()->accountName() == Settings::self()->account()) {
activeTaskLists = Settings::self()->taskLists();
}
m_taskListsList->clear();
for (const ObjectPtr &object : objects) {
TaskListPtr taskList = object.dynamicCast<TaskList>();
......
......@@ -131,8 +131,7 @@ KGAPI2::AccountPtr GoogleSettingsDialog::currentAccount() const
void GoogleSettingsDialog::reloadAccounts()
{
disconnect(m_accComboBox, SIGNAL(currentIndexChanged(QString)),
this, SIGNAL(currentAccountChanged(QString)));
disconnect(m_accComboBox, QOverload<const QString &>::of(&KComboBox::currentIndexChanged), this, &GoogleSettingsDialog::currentAccountChanged);
m_accComboBox->clear();
......@@ -146,8 +145,7 @@ void GoogleSettingsDialog::reloadAccounts()
m_accComboBox->setCurrentIndex(index);
}
disconnect(m_accComboBox, SIGNAL(currentIndexChanged(QString)),
this, SIGNAL(currentAccountChanged(QString)));
connect(m_accComboBox, QOverload<const QString &>::of(&KComboBox::currentIndexChanged), this, &GoogleSettingsDialog::currentAccountChanged);
m_removeAccButton->setEnabled(m_accComboBox->count() > 0);
Q_EMIT currentAccountChanged(m_accComboBox->currentText());
......
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