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