Commit 60b6f9f6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QComboBox directly

parent 4cc3c52f
...@@ -29,7 +29,7 @@ using namespace Kontact; ...@@ -29,7 +29,7 @@ using namespace Kontact;
#include <KontactInterface/Plugin> #include <KontactInterface/Plugin>
#include <KAboutData> #include <KAboutData>
#include <KComboBox> #include <QComboBox>
#include <KServiceTypeTrader> #include <KServiceTypeTrader>
#include <KLocalizedString> #include <KLocalizedString>
...@@ -98,7 +98,7 @@ const KAboutData *KcmKontact::aboutData() const ...@@ -98,7 +98,7 @@ const KAboutData *KcmKontact::aboutData() const
PluginSelection::PluginSelection(KConfigSkeleton::ItemString *item, QWidget *parent) PluginSelection::PluginSelection(KConfigSkeleton::ItemString *item, QWidget *parent)
{ {
mItem = item; mItem = item;
mPluginCombo = new KComboBox(parent); mPluginCombo = new QComboBox(parent);
mPluginCombo->setToolTip( mPluginCombo->setToolTip(
i18nc("@info:tooltip", "Select the initial plugin to use on each start")); i18nc("@info:tooltip", "Select the initial plugin to use on each start"));
mPluginCombo->setWhatsThis( mPluginCombo->setWhatsThis(
...@@ -106,14 +106,14 @@ PluginSelection::PluginSelection(KConfigSkeleton::ItemString *item, QWidget *par ...@@ -106,14 +106,14 @@ PluginSelection::PluginSelection(KConfigSkeleton::ItemString *item, QWidget *par
"Select the plugin from this drop down list to be used as the " "Select the plugin from this drop down list to be used as the "
"initial plugin each time Kontact is started. Otherwise, Kontact " "initial plugin each time Kontact is started. Otherwise, Kontact "
"will restore the last active plugin from the previous usage.")); "will restore the last active plugin from the previous usage."));
connect(mPluginCombo, qOverload<int>(&KComboBox::currentIndexChanged), this, &PluginSelection::changed); connect(mPluginCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &PluginSelection::changed);
} }
PluginSelection::~PluginSelection() PluginSelection::~PluginSelection()
{ {
} }
KComboBox *PluginSelection::comboBox() const QComboBox *PluginSelection::comboBox() const
{ {
return mPluginCombo; return mPluginCombo;
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
using namespace KPIM; using namespace KPIM;
#include <KService> #include <KService>
class QComboBox;
namespace Kontact { namespace Kontact {
class KcmKontact : public KPrefsModule class KcmKontact : public KPrefsModule
{ {
...@@ -53,10 +53,10 @@ public: ...@@ -53,10 +53,10 @@ public:
void writeConfig() override; void writeConfig() override;
QList<QWidget *> widgets() const override; QList<QWidget *> widgets() const override;
KComboBox *comboBox() const; QComboBox *comboBox() const;
private: private:
KComboBox *mPluginCombo = nullptr; QComboBox *mPluginCombo = nullptr;
KService::List mPluginList; KService::List mPluginList;
KConfigSkeleton::ItemString *mItem = nullptr; KConfigSkeleton::ItemString *mItem = 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