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

Port to QComboBox

parent 0003b365
/* Copyright 2009 Klarälvdalens Datakonsult AB /* Copyright 2009 Klarälvdalens Datakonsult AB
Copyright 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as modify it under the terms of the GNU General Public License as
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
#include <AkonadiCore/Collection> #include <AkonadiCore/Collection>
#include <KLocalizedString> #include <KLocalizedString>
#include <KComboBox> #include <QComboBox>
#include <KUrlRequester> #include <KUrlRequester>
#include <KMessageBox> #include <KMessageBox>
#include <KSeparator> #include <KSeparator>
...@@ -93,7 +94,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent) ...@@ -93,7 +94,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent)
QLabel *formatLabel = new QLabel(i18n("F&ormat:"), mainWidget); QLabel *formatLabel = new QLabel(i18n("F&ormat:"), mainWidget);
mainLayout->addWidget(formatLabel, row, 0); mainLayout->addWidget(formatLabel, row, 0);
mFormatComboBox = new KComboBox(mainWidget); mFormatComboBox = new QComboBox(mainWidget);
formatLabel->setBuddy(mFormatComboBox); formatLabel->setBuddy(mFormatComboBox);
// These combobox values have to stay in sync with the ArchiveType enum from BackupJob! // These combobox values have to stay in sync with the ArchiveType enum from BackupJob!
...@@ -102,7 +103,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent) ...@@ -102,7 +103,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent)
mFormatComboBox->addItem(i18n("BZ2-Compressed Tar Archive (.tar.bz2)")); mFormatComboBox->addItem(i18n("BZ2-Compressed Tar Archive (.tar.bz2)"));
mFormatComboBox->addItem(i18n("GZ-Compressed Tar Archive (.tar.gz)")); mFormatComboBox->addItem(i18n("GZ-Compressed Tar Archive (.tar.gz)"));
mFormatComboBox->setCurrentIndex(2); mFormatComboBox->setCurrentIndex(2);
connect(mFormatComboBox, qOverload<int>(&KComboBox::activated), this, &ArchiveFolderDialog::slotFixFileExtension); connect(mFormatComboBox, qOverload<int>(&QComboBox::activated), this, &ArchiveFolderDialog::slotFixFileExtension);
mainLayout->addWidget(mFormatComboBox, row, 1); mainLayout->addWidget(mFormatComboBox, row, 1);
row++; row++;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class QCheckBox; class QCheckBox;
class KUrlRequester; class KUrlRequester;
class KComboBox; class QComboBox;
class QPushButton; class QPushButton;
namespace Akonadi { namespace Akonadi {
class Collection; class Collection;
...@@ -56,7 +56,7 @@ private: ...@@ -56,7 +56,7 @@ private:
QCheckBox *mDeleteCheckBox = nullptr; QCheckBox *mDeleteCheckBox = nullptr;
QCheckBox *mRecursiveCheckBox = nullptr; QCheckBox *mRecursiveCheckBox = nullptr;
MailCommon::FolderRequester *mFolderRequester = nullptr; MailCommon::FolderRequester *mFolderRequester = nullptr;
KComboBox *mFormatComboBox = nullptr; QComboBox *mFormatComboBox = nullptr;
KUrlRequester *mUrlRequester = nullptr; KUrlRequester *mUrlRequester = nullptr;
QPushButton *mOkButton = nullptr; QPushButton *mOkButton = 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