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

Use QComboBox directly

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