Commit b5bd01f0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QCombobox directly

parent ff6aa214
......@@ -43,7 +43,7 @@
#include <QVariant>
#include <QAction>
#include <KComboBox>
#include <QComboBox>
#include "messagelist_debug.h"
#include <KLocalizedString>
#include <QMenu>
......@@ -206,9 +206,9 @@ void Widget::populateStatusFilterCombo()
return;
}
d->mStatusFilterComboPopulationInProgress = true;
KComboBox *tagFilterComboBox = d->quickSearchLine->tagFilterComboBox();
QComboBox *tagFilterComboBox = d->quickSearchLine->tagFilterComboBox();
d->mCurrentStatusFilterIndex = (tagFilterComboBox->currentIndex() != -1) ? tagFilterComboBox->currentIndex() : 0;
disconnect(tagFilterComboBox, qOverload<int>(&KComboBox::currentIndexChanged), this, &Widget::statusSelected);
disconnect(tagFilterComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &Widget::statusSelected);
tagFilterComboBox->clear();
......@@ -223,7 +223,7 @@ void Widget::addMessageTagItem(const QPixmap &icon, const QString &text, const Q
void Widget::setCurrentStatusFilterItem()
{
d->quickSearchLine->updateComboboxVisibility();
connect(d->quickSearchLine->tagFilterComboBox(), qOverload<int>(&KComboBox::currentIndexChanged),
connect(d->quickSearchLine->tagFilterComboBox(), qOverload<int>(&QComboBox::currentIndexChanged),
this, &Widget::statusSelected);
d->quickSearchLine->tagFilterComboBox()->setCurrentIndex(d->mCurrentStatusFilterIndex >= d->quickSearchLine->tagFilterComboBox()->count() ? 0 : d->mCurrentStatusFilterIndex);
d->mStatusFilterComboPopulationInProgress = false;
......
......@@ -30,7 +30,6 @@
class QLineEdit;
class QActionGroup;
class KComboBox;
class QMenu;
namespace Akonadi {
......
......@@ -25,10 +25,9 @@
#include "searchlinestatus.h"
#include <KLocalizedString>
#include <KComboBox>
#include <QPushButton>
#include <QComboBox>
#include <QHBoxLayout>
#include <QStandardPaths>
......@@ -61,7 +60,7 @@ QuickSearchLine::QuickSearchLine(QWidget *parent)
hbox->addWidget(mSearchEdit);
// The status filter button. Will be populated later, as populateStatusFilterCombo() is virtual
mTagFilterCombo = new KComboBox(this);
mTagFilterCombo = new QComboBox(this);
mTagFilterCombo->setMaximumWidth(300);
mTagFilterCombo->setMaximumWidth(200);
mTagFilterCombo->hide();
......@@ -117,7 +116,7 @@ void QuickSearchLine::focusQuickSearch(const QString &selectedText)
mSearchEdit->setFocus();
}
KComboBox *QuickSearchLine::tagFilterComboBox() const
QComboBox *QuickSearchLine::tagFilterComboBox() const
{
return mTagFilterCombo;
}
......
......@@ -25,7 +25,7 @@
#include "messagelist_export.h"
#include <Akonadi/KMime/MessageStatus>
class KComboBox;
class QComboBox;
class QToolButton;
namespace MessageList {
namespace Core {
......@@ -57,7 +57,7 @@ public:
void focusQuickSearch(const QString &selectedText);
Q_REQUIRED_RESULT KComboBox *tagFilterComboBox() const;
Q_REQUIRED_RESULT QComboBox *tagFilterComboBox() const;
Q_REQUIRED_RESULT SearchLineStatus *searchEdit() const;
Q_REQUIRED_RESULT QToolButton *openFullSearchButton() const;
void resetFilter();
......@@ -86,7 +86,7 @@ private Q_SLOTS:
void slotFilterActionChanged(const QList<Akonadi::MessageStatus> &lst);
private:
SearchLineStatus *mSearchEdit = nullptr;
KComboBox *mTagFilterCombo = nullptr;
QComboBox *mTagFilterCombo = nullptr;
QList<Akonadi::MessageStatus> mLstStatus;
};
}
......
......@@ -70,7 +70,6 @@ void DKIMCheckFullJob::startCheckFullInfo(const Akonadi::Item &item)
void DKIMCheckFullJob::checkAuthenticationResults()
{
qDebug() << " void DKIMCheckFullJob::checkAuthenticationResults()" << mCheckPolicy.useAuthenticationResults();
if (mCheckPolicy.useAuthenticationResults()) {
DKIMCheckAuthenticationStatusJob *job = new DKIMCheckAuthenticationStatusJob(this);
mHeaderParser.setHead(mMessage->head());
......
......@@ -68,7 +68,7 @@ CustomTemplates::CustomTemplates(const QList<KActionCollection *> &actionCollect
connect(mUi->mDuplicate, &QPushButton::clicked, this, &CustomTemplates::slotDuplicateClicked);
connect(mUi->mList, &QTreeWidget::currentItemChanged, this, &CustomTemplates::slotListSelectionChanged);
connect(mUi->mList, &QTreeWidget::itemChanged, this, &CustomTemplates::slotItemChanged);
connect(mUi->mType, qOverload<int>(&KComboBox::activated), this, &CustomTemplates::slotTypeActivated);
connect(mUi->mType, qOverload<int>(&QComboBox::activated), this, &CustomTemplates::slotTypeActivated);
connect(mUi->mKeySequenceWidget, &KKeySequenceWidget::keySequenceChanged, this, &CustomTemplates::slotShortcutChanged);
......
......@@ -277,7 +277,7 @@
<number>6</number>
</property>
<item row="1" column="2">
<widget class="KComboBox" name="mType">
<widget class="QComboBox" name="mType">
<item>
<property name="text">
<string comment="@item:inlistbox Universal custom template type.">Universal</string>
......@@ -347,12 +347,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
......
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