diff --git a/src/libkdepim/widgets/kcheckcombobox.h b/src/libkdepim/widgets/kcheckcombobox.h --- a/src/libkdepim/widgets/kcheckcombobox.h +++ b/src/libkdepim/widgets/kcheckcombobox.h @@ -28,7 +28,7 @@ #include "kdepim_export.h" -#include +#include #include namespace KPIM { @@ -38,7 +38,7 @@ * and the separator that is used to show the items that are selected in the line * edit. */ -class KDEPIM_EXPORT KCheckComboBox : public KComboBox +class KDEPIM_EXPORT KCheckComboBox : public QComboBox { Q_OBJECT diff --git a/src/libkdepim/widgets/kcheckcombobox.cpp b/src/libkdepim/widgets/kcheckcombobox.cpp --- a/src/libkdepim/widgets/kcheckcombobox.cpp +++ b/src/libkdepim/widgets/kcheckcombobox.cpp @@ -25,7 +25,6 @@ #include "kcheckcombobox.h" -#include #include "libkdepim_debug.h" #include @@ -135,10 +134,10 @@ /// Class KCheckComboBox KCheckComboBox::KCheckComboBox(QWidget *parent) - : KComboBox(parent) + : QComboBox(parent) , d(new KCheckComboBox::Private(this)) { - connect(this, qOverload(&KComboBox::activated), this, [this]() { + connect(this, qOverload(&QComboBox::activated), this, [this]() { d->toggleCheckState(); }); connect(model(), &QAbstractItemModel::rowsInserted, this, @@ -159,7 +158,6 @@ setCheckedItems(QStringList()); } }); - setInsertPolicy(KComboBox::NoInsert); view()->installEventFilter(this); view()->viewport()->installEventFilter(this); @@ -177,7 +175,7 @@ void KCheckComboBox::hidePopup() { if (!d->mIgnoreHide) { - KComboBox::hidePopup(); + QComboBox::hidePopup(); } d->mIgnoreHide = false; } @@ -310,7 +308,7 @@ void KCheckComboBox::resizeEvent(QResizeEvent *event) { - KComboBox::resizeEvent(event); + QComboBox::resizeEvent(event); if (d->mSqueezeText) { d->updateCheckedItems(); } @@ -351,7 +349,7 @@ default: break; } - return KComboBox::eventFilter(receiver, event); + return QComboBox::eventFilter(receiver, event); } bool KCheckComboBox::alwaysShowDefaultText() const