Commit 1b966bc4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing override + const'ify pointer

parent 2f1aea73
Pipeline #50451 passed with stage
in 15 minutes and 19 seconds
......@@ -24,7 +24,7 @@ public:
Q_REQUIRED_RESULT QString errorMessage() const;
protected:
QString mApplicationName;
const QString mApplicationName;
QString mErrorMessage;
};
......
......@@ -51,7 +51,7 @@ public:
*
* @param parent The parent widget.
*/
ContactGroupViewer(QWidget *parent = nullptr);
explicit ContactGroupViewer(QWidget *parent = nullptr);
/**
* Destroys the contact group viewer.
......
......@@ -52,12 +52,12 @@ public:
*
* @param parent The parent widget of the dialog.
*/
ContactGroupViewerDialog(QWidget *parent = nullptr);
explicit ContactGroupViewerDialog(QWidget *parent = nullptr);
/**
* Destroys the contact group viewer dialog.
*/
~ContactGroupViewerDialog();
~ContactGroupViewerDialog() override;
/**
* Returns the contact group that is currently displayed.
......
......@@ -61,7 +61,7 @@ public:
/**
* Destroys the contact viewer dialog.
*/
~ContactViewerDialog();
~ContactViewerDialog() override;
/**
* Returns the contact that is currently displayed.
......
......@@ -37,7 +37,7 @@ public:
/**
* Destroys the email address requester.
*/
~EmailAddressRequester();
~EmailAddressRequester() override;
/**
* Clears the text of the email address requester.
......
......@@ -20,7 +20,7 @@ class AKONADI_CONTACT_EXPORT EmailAddressSelectionModel : public QObject
Q_OBJECT
public:
explicit EmailAddressSelectionModel(QObject *parent = nullptr);
~EmailAddressSelectionModel();
~EmailAddressSelectionModel() override;
Q_REQUIRED_RESULT Akonadi::ContactsTreeModel *model() const;
private:
......
......@@ -81,7 +81,7 @@ public:
/**
* Destroys the email address selection widget.
*/
~EmailAddressSelectionWidget();
~EmailAddressSelectionWidget() override;
/**
* Returns the list of selected email addresses.
......
......@@ -47,24 +47,24 @@ public:
ContactGrantleeWrapper(const KContacts::Addressee &addr);
private:
QString addressBookLabel() const;
QString anniversaryLabel() const;
QString assistantLabel() const;
QString managerLabel() const;
QString officeLabel() const;
QString professionLabel() const;
QString spouseLabel() const;
Q_REQUIRED_RESULT QString addressBookLabel() const;
Q_REQUIRED_RESULT QString anniversaryLabel() const;
Q_REQUIRED_RESULT QString assistantLabel() const;
Q_REQUIRED_RESULT QString managerLabel() const;
Q_REQUIRED_RESULT QString officeLabel() const;
Q_REQUIRED_RESULT QString professionLabel() const;
Q_REQUIRED_RESULT QString spouseLabel() const;
QString addressBookName() const;
int age() const;
QString cryptoPreference() const;
QString signaturePreference() const;
Q_REQUIRED_RESULT QString addressBookName() const;
Q_REQUIRED_RESULT int age() const;
Q_REQUIRED_RESULT QString cryptoPreference() const;
Q_REQUIRED_RESULT QString signaturePreference() const;
QString photoImgElement() const;
QString logoImgElement() const;
Q_REQUIRED_RESULT QString photoImgElement() const;
Q_REQUIRED_RESULT QString logoImgElement() const;
QString formattedBirthday() const;
QString formattedAnniversary() const;
Q_REQUIRED_RESULT QString formattedBirthday() const;
Q_REQUIRED_RESULT QString formattedAnniversary() const;
};
}
......
......@@ -25,8 +25,8 @@ class Q_DECL_HIDDEN GrantleeContactGroupFormatter::Private
{
public:
Private()
: mEngine(new Grantlee::Engine)
{
mEngine = new Grantlee::Engine;
mTemplateLoader = QSharedPointer<Grantlee::FileSystemTemplateLoader>(new Grantlee::FileSystemTemplateLoader);
}
......@@ -54,7 +54,7 @@ public:
}
QVector<QObject *> mObjects;
Grantlee::Engine *mEngine = nullptr;
Grantlee::Engine *const mEngine;
QSharedPointer<Grantlee::FileSystemTemplateLoader> mTemplateLoader;
Grantlee::Template mSelfcontainedTemplate;
Grantlee::Template mEmbeddableTemplate;
......
......@@ -14,8 +14,8 @@ using namespace KAddressBookGrantlee;
GrantleeContactViewer::GrantleeContactViewer(QWidget *parent)
: Akonadi::ContactViewer(parent)
, mFormatter(new KAddressBookGrantlee::GrantleeContactFormatter)
{
mFormatter = new KAddressBookGrantlee::GrantleeContactFormatter;
setContactFormatter(mFormatter);
mFormatter->setAbsoluteThemePath(kaddressBookAbsoluteThemePath());
}
......
......@@ -20,13 +20,13 @@ class AKONADI_CONTACT_EXPORT GrantleeContactViewer : public Akonadi::ContactView
Q_OBJECT
public:
explicit GrantleeContactViewer(QWidget *parent = nullptr);
~GrantleeContactViewer();
~GrantleeContactViewer() override;
void setForceDisableQRCode(bool b);
private:
QString kaddressBookAbsoluteThemePath();
KAddressBookGrantlee::GrantleeContactFormatter *mFormatter = nullptr;
Q_REQUIRED_RESULT QString kaddressBookAbsoluteThemePath();
KAddressBookGrantlee::GrantleeContactFormatter *const mFormatter;
};
}
......
......@@ -117,7 +117,7 @@ public:
}
AddContactJob *const q;
KContacts::Addressee mContact;
const KContacts::Addressee mContact;
QWidget *mParentWidget = nullptr;
Akonadi::Collection mCollection;
bool mShowMessageBox = true;
......
......@@ -18,10 +18,10 @@ K_PLUGIN_CLASS_WITH_JSON(CategoriesEditWidget, "categorieseditwidgetplugin.json"
CategoriesEditWidget::CategoriesEditWidget(QWidget *parent, const QList<QVariant> &)
: ContactEditor::CategoriesEditAbstractWidget(parent)
, mTagWidget(new Akonadi::TagWidget(this))
{
auto *layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
mTagWidget = new Akonadi::TagWidget(this);
layout->addWidget(mTagWidget);
}
......
......@@ -36,7 +36,7 @@ public:
void setReadOnly(bool readOnly) override;
private:
Akonadi::TagWidget *mTagWidget = nullptr;
Akonadi::TagWidget *const mTagWidget;
};
#endif
......@@ -22,7 +22,7 @@ class AKONADI_CONTACT_EXPORT RecipientsEditorManager : public QObject
Q_OBJECT
public:
explicit RecipientsEditorManager(QObject *parent = nullptr);
~RecipientsEditorManager();
~RecipientsEditorManager() override;
static RecipientsEditorManager *self();
Q_REQUIRED_RESULT Akonadi::EmailAddressSelectionModel *model();
......
......@@ -19,7 +19,7 @@ class AKONADI_CONTACT_EXPORT RecipientsPickerWidget : public QWidget
Q_OBJECT
public:
explicit RecipientsPickerWidget(bool onlyShowEmailWithAddress, QAbstractItemModel *model, QWidget *parent = nullptr);
~RecipientsPickerWidget();
~RecipientsPickerWidget() override;
Q_REQUIRED_RESULT QTreeView *view() const;
Q_REQUIRED_RESULT Akonadi::EmailAddressSelectionWidget *emailAddressSelectionWidget() const;
......
......@@ -21,7 +21,7 @@ class AKONADI_CONTACT_EXPORT SelectAddressBookDialog : public Akonadi::Collectio
Q_OBJECT
public:
explicit SelectAddressBookDialog(QWidget *parent = nullptr);
~SelectAddressBookDialog();
~SelectAddressBookDialog() override;
private:
SelectAddressBookDialogPrivate *const d;
......
......@@ -56,7 +56,7 @@ public:
/**
* Destroys the standard contact action manager.
*/
~StandardContactActionManager();
~StandardContactActionManager() override;
/**
* Sets the collection selection model based on which the collection
......
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