Commit 80605d5d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use directly QCombobox

parent f91ca295
......@@ -27,7 +27,7 @@
#include <QCheckBox>
#include <KLocalizedString>
#include <KComboBox>
#include <QComboBox>
#include <QPushButton>
#include <QDebug>
#include <KMessageBox>
......@@ -68,9 +68,9 @@ GoogleSettingsDialog::GoogleSettingsDialog(GoogleAccountManager *accountManager,
mainLayout->addWidget(m_accGroupBox);
QHBoxLayout *accLayout = new QHBoxLayout(m_accGroupBox);
m_accComboBox = new KComboBox(m_accGroupBox);
m_accComboBox = new QComboBox(m_accGroupBox);
accLayout->addWidget(m_accComboBox, 1);
connect(m_accComboBox, QOverload<const QString &>::of(&KComboBox::currentTextChanged), this, &GoogleSettingsDialog::currentAccountChanged);
connect(m_accComboBox, QOverload<const QString &>::of(&QComboBox::currentTextChanged), this, &GoogleSettingsDialog::currentAccountChanged);
m_addAccButton = new QPushButton(QIcon::fromTheme(QStringLiteral("list-add-user")), i18n("&Add"), m_accGroupBox);
accLayout->addWidget(m_addAccButton);
......@@ -128,7 +128,7 @@ KGAPI2::AccountPtr GoogleSettingsDialog::currentAccount() const
void GoogleSettingsDialog::reloadAccounts()
{
disconnect(m_accComboBox, QOverload<const QString &>::of(&KComboBox::currentTextChanged), this, &GoogleSettingsDialog::currentAccountChanged);
disconnect(m_accComboBox, QOverload<const QString &>::of(&QComboBox::currentTextChanged), this, &GoogleSettingsDialog::currentAccountChanged);
m_accComboBox->clear();
......@@ -142,7 +142,7 @@ void GoogleSettingsDialog::reloadAccounts()
m_accComboBox->setCurrentIndex(index);
}
connect(m_accComboBox, QOverload<const QString &>::of(&KComboBox::currentTextChanged), this, &GoogleSettingsDialog::currentAccountChanged);
connect(m_accComboBox, QOverload<const QString &>::of(&QComboBox::currentTextChanged), this, &GoogleSettingsDialog::currentAccountChanged);
m_removeAccButton->setEnabled(m_accComboBox->count() > 0);
Q_EMIT currentAccountChanged(m_accComboBox->currentText());
......
......@@ -31,7 +31,7 @@ class GoogleSettings;
class GoogleAccountManager;
class QGroupBox;
class KComboBox;
class QComboBox;
class QCheckBox;
class KPluralHandlingSpinBox;
class QPushButton;
......@@ -73,7 +73,7 @@ private:
QGroupBox *m_accGroupBox = nullptr;
QPushButton *m_addAccButton = nullptr;
QPushButton *m_removeAccButton = nullptr;
KComboBox *m_accComboBox = nullptr;
QComboBox *m_accComboBox = nullptr;
QCheckBox *m_enableRefresh = nullptr;
KPluralHandlingSpinBox *m_refreshSpinBox = nullptr;
QVBoxLayout *m_mainLayout = nullptr;
......
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