Commit 11e39942 authored by Laurent Montel's avatar Laurent Montel 😁

Modernize code

parent 9e56437f
Pipeline #33442 passed with stage
in 26 minutes and 19 seconds
......@@ -16,7 +16,6 @@ using namespace KAddressBookImportExport;
KAddressBookContactSelectionDialog::KAddressBookContactSelectionDialog(QItemSelectionModel *selectionModel, bool allowToSelectTypeToExport, QWidget *parent)
: QDialog(parent)
, mVCardExport(nullptr)
{
setWindowTitle(i18nc("@title:window", "Select Contacts"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
......
......@@ -31,7 +31,6 @@ using namespace KAddressBookImportExport;
KAddressBookContactSelectionWidget::KAddressBookContactSelectionWidget(QItemSelectionModel *selectionModel, QWidget *parent)
: QWidget(parent)
, mSelectionModel(selectionModel)
, mAddContactGroup(false)
{
initGui();
......
......@@ -64,15 +64,15 @@ public:
private:
void initGui();
KAddressBookImportExport::KAddressBookImportExportContactList collectAllContacts() const;
KAddressBookImportExport::KAddressBookImportExportContactList collectSelectedContacts() const;
KAddressBookImportExport::KAddressBookImportExportContactList collectAddressBookContacts() const;
Q_REQUIRED_RESULT KAddressBookImportExport::KAddressBookImportExportContactList collectAllContacts() const;
Q_REQUIRED_RESULT KAddressBookImportExport::KAddressBookImportExportContactList collectSelectedContacts() const;
Q_REQUIRED_RESULT KAddressBookImportExport::KAddressBookImportExportContactList collectAddressBookContacts() const;
Akonadi::Item::List collectAllItems() const;
Akonadi::Item::List collectSelectedItems() const;
Akonadi::Item::List collectAddressBookItems() const;
Q_REQUIRED_RESULT Akonadi::Item::List collectAllItems() const;
Q_REQUIRED_RESULT Akonadi::Item::List collectSelectedItems() const;
Q_REQUIRED_RESULT Akonadi::Item::List collectAddressBookItems() const;
QItemSelectionModel *mSelectionModel = nullptr;
QItemSelectionModel *const mSelectionModel;
QLabel *mMessageLabel = nullptr;
QRadioButton *mAllContactsButton = nullptr;
......
......@@ -10,7 +10,6 @@ using namespace KAddressBookImportExport;
KAddressBookImportExportPluginInterface::KAddressBookImportExportPluginInterface(QObject *parent)
: PimCommon::AbstractGenericPluginInterface(parent)
, mImportExportAction(Import)
{
}
......
......@@ -53,7 +53,7 @@ public:
protected:
QList<QAction *> mImportActions;
QList<QAction *> mExportActions;
ImportExportAction mImportExportAction;
ImportExportAction mImportExportAction = Import;
Akonadi::Collection mDefaultCollection;
QItemSelectionModel *mItemSelectionModel = nullptr;
};
......
......@@ -30,23 +30,17 @@ public:
delete pluginManager;
}
KAddressBookImportExportPluginManager *pluginManager = nullptr;
KAddressBookImportExportPluginManager *const pluginManager;
};
class KAddressBookImportExportInfo
{
public:
KAddressBookImportExportInfo()
: plugin(nullptr)
, isEnabled(true)
{
}
QString metaDataFileNameBaseName;
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
KAddressBookImportExportPlugin *plugin = nullptr;
bool isEnabled;
bool isEnabled = true;
};
Q_GLOBAL_STATIC(KAddressBookImportExportPluginManagerPrivate, sInstance)
......
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