Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0595f887 authored by Laurent Montel's avatar Laurent Montel 😁

USe QCombobox here

parent 7f87afed
......@@ -91,7 +91,7 @@ CryptoPagePlugin::CryptoPagePlugin()
l = new QLabel(i18n("Sign:"), hbox);
hboxHBoxLayout->addWidget(l);
mSignPref = new KComboBox(hbox);
mSignPref = new QComboBox(hbox);
hboxHBoxLayout->addWidget(mSignPref);
l->setBuddy(mSignPref);
mSignPref->setEditable(false);
......@@ -109,7 +109,7 @@ CryptoPagePlugin::CryptoPagePlugin()
l = new QLabel(i18n("Encrypt:"), hbox);
hboxHBoxLayout->addWidget(l);
mCryptPref = new KComboBox(hbox);
mCryptPref = new QComboBox(hbox);
hboxHBoxLayout->addWidget(mCryptPref);
l->setBuddy(mCryptPref);
mCryptPref->setEditable(false);
......
......@@ -30,7 +30,7 @@ namespace Kleo {
class KeyRequester;
}
class KComboBox;
class QComboBox;
class QCheckBox;
class CryptoPagePlugin : public ContactEditor::ContactEditorPagePlugin
......@@ -51,8 +51,8 @@ private:
NumberOfProtocols = 4
};
QCheckBox *mProtocolCB[NumberOfProtocols];
KComboBox *mSignPref = nullptr;
KComboBox *mCryptPref = nullptr;
QComboBox *mSignPref = nullptr;
QComboBox *mCryptPref = nullptr;
Kleo::KeyRequester *mPgpKey = nullptr;
Kleo::KeyRequester *mSmimeCert = nullptr;
bool mReadOnly = false;
......
......@@ -24,7 +24,7 @@
#include "templateselectiondialog.h"
#include <KConfig>
#include <KComboBox>
#include <QComboBox>
#include <QInputDialog>
#include <QLineEdit>
#include <KLocalizedString>
......@@ -62,13 +62,13 @@ enum {
Codec = 4
};
class ContactFieldComboBox : public KComboBox
class ContactFieldComboBox : public QComboBox
{
Q_OBJECT
public:
ContactFieldComboBox(QWidget *parent = nullptr)
: KComboBox(parent)
: QComboBox(parent)
{
fillFieldMap();
......@@ -200,10 +200,10 @@ CSVImportDialog::CSVImportDialog(QWidget *parent)
connect(mDelimiterEdit, QOverload<const QString &>::of(&QLineEdit::textChanged), this, [this](const QString &str) {
customDelimiterChanged(str);
});
connect(mComboQuote, QOverload<const QString &>::of(&KComboBox::activated), this, [this](const QString &str) {
connect(mComboQuote, QOverload<const QString &>::of(&QComboBox::activated), this, [this](const QString &str) {
textQuoteChanged(str);
});
connect(mCodecCombo, QOverload<const QString &>::of(&KComboBox::activated), this, [this]() {
connect(mCodecCombo, QOverload<const QString &>::of(&QComboBox::activated), this, [this]() {
codecChanged();
});
connect(mSkipFirstRow, &QCheckBox::toggled, this, [this](bool b) {
......@@ -393,7 +393,7 @@ void CSVImportDialog::initGUI()
mainLayout->addWidget(label);
layout->addWidget(label, 1, 2);
mComboQuote = new KComboBox(page);
mComboQuote = new QComboBox(page);
mainLayout->addWidget(mComboQuote);
mComboQuote->setToolTip(
i18nc("@info:tooltip", "Select the quote character"));
......@@ -451,7 +451,7 @@ void CSVImportDialog::initGUI()
mainLayout->addWidget(label);
layout->addWidget(label, 3, 2);
mCodecCombo = new KComboBox(page);
mCodecCombo = new QComboBox(page);
mainLayout->addWidget(mCodecCombo);
mCodecCombo->setToolTip(
i18nc("@info:tooltip", "Select the text codec"));
......
......@@ -26,7 +26,7 @@
#include <QList>
class KComboBox;
class QComboBox;
class QLineEdit;
class KUrlRequester;
......@@ -71,8 +71,8 @@ private:
QButtonGroup *mDelimiterGroup = nullptr;
QLineEdit *mDelimiterEdit = nullptr;
QLineEdit *mDatePatternEdit = nullptr;
KComboBox *mComboQuote = nullptr;
KComboBox *mCodecCombo = nullptr;
QComboBox *mComboQuote = nullptr;
QComboBox *mCodecCombo = nullptr;
QCheckBox *mSkipFirstRow = nullptr;
KUrlRequester *mUrlRequester = nullptr;
QCsvModel *mModel = nullptr;
......
......@@ -19,7 +19,7 @@
#include "../widgets/mailmergewidget.h"
#include "PimCommon/SimpleStringlistEditor"
#include <qtest.h>
#include <KComboBox>
#include <QComboBox>
#include <QStackedWidget>
#include <QSignalSpy>
using namespace MailMerge;
......@@ -32,7 +32,7 @@ MailMergeWidgetTest::MailMergeWidgetTest()
void MailMergeWidgetTest::shouldHaveDefaultValueOnCreation()
{
MailMergeWidget mailmerge;
KComboBox *source = mailmerge.findChild<KComboBox *>(QStringLiteral("source"));
QComboBox *source = mailmerge.findChild<QComboBox *>(QStringLiteral("source"));
QVERIFY(source);
QCOMPARE(source->currentIndex(), 0);
......@@ -55,7 +55,7 @@ void MailMergeWidgetTest::shouldHaveDefaultValueOnCreation()
void MailMergeWidgetTest::shouldEmitSourceModeChanged()
{
MailMergeWidget mailmerge;
KComboBox *source = mailmerge.findChild<KComboBox *>(QStringLiteral("source"));
QComboBox *source = mailmerge.findChild<QComboBox *>(QStringLiteral("source"));
QCOMPARE(source->currentIndex(), 0);
QSignalSpy spy(&mailmerge, SIGNAL(sourceModeChanged(MailMerge::MailMergeWidget::SourceType)));
source->setCurrentIndex(1);
......@@ -65,7 +65,7 @@ void MailMergeWidgetTest::shouldEmitSourceModeChanged()
void MailMergeWidgetTest::shouldDontEmitSourceModeChangedWhenIndexIsInvalid()
{
MailMergeWidget mailmerge;
KComboBox *source = mailmerge.findChild<KComboBox *>(QStringLiteral("source"));
QComboBox *source = mailmerge.findChild<QComboBox *>(QStringLiteral("source"));
QCOMPARE(source->currentIndex(), 0);
QSignalSpy spy(&mailmerge, SIGNAL(sourceModeChanged(MailMerge::MailMergeWidget::SourceType)));
source->setCurrentIndex(-1);
......@@ -75,7 +75,7 @@ void MailMergeWidgetTest::shouldDontEmitSourceModeChangedWhenIndexIsInvalid()
void MailMergeWidgetTest::shouldChangeStackedWidgetIndexWhenChangeComboboxIndex()
{
MailMergeWidget mailmerge;
KComboBox *source = mailmerge.findChild<KComboBox *>(QStringLiteral("source"));
QComboBox *source = mailmerge.findChild<QComboBox *>(QStringLiteral("source"));
QCOMPARE(source->currentIndex(), 0);
QStackedWidget *stackedwidget = mailmerge.findChild<QStackedWidget *>(QStringLiteral("stackedwidget"));
......
......@@ -22,7 +22,7 @@
#include "attachmentlistwidget.h"
#include <KLocalizedString>
#include <KComboBox>
#include <QComboBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
......@@ -43,12 +43,12 @@ MailMergeWidget::MailMergeWidget(QWidget *parent)
QLabel *lab = new QLabel(i18n("Source:"));
hbox->addWidget(lab);
mSource = new KComboBox;
mSource = new QComboBox;
mSource->setObjectName(QStringLiteral("source"));
mSource->addItem(i18n("Address Book"), AddressBook);
mSource->addItem(i18n("CSV"), CSV);
connect(mSource, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &MailMergeWidget::slotSourceChanged);
connect(mSource, QOverload<int>::of(&KComboBox::activated), this, &MailMergeWidget::slotSourceChanged);
connect(mSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MailMergeWidget::slotSourceChanged);
connect(mSource, QOverload<int>::of(&QComboBox::activated), this, &MailMergeWidget::slotSourceChanged);
hbox->addWidget(mSource);
......
......@@ -20,7 +20,7 @@
#include <QWidget>
class KComboBox;
class QComboBox;
class QStackedWidget;
namespace MailMerge {
......@@ -46,7 +46,7 @@ private Q_SLOTS:
void slotSourceChanged(int index);
private:
KComboBox *mSource = nullptr;
QComboBox *mSource = nullptr;
QStackedWidget *mStackedWidget = nullptr;
AttachmentListWidget *mAttachment = nullptr;
MailMerge::CsvWidget *mCsvWidget = 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