Commit cb2c80df authored by Laurent Montel's avatar Laurent Montel 😁

Fix some clazy warning

parent 718072e2
...@@ -57,8 +57,8 @@ void MainWidget::selectionModeChanged(int index) ...@@ -57,8 +57,8 @@ void MainWidget::selectionModeChanged(int index)
void MainWidget::showSelection() void MainWidget::showSelection()
{ {
mInfo->append(QLatin1String("===========================\n")); mInfo->append(QStringLiteral("===========================\n"));
mInfo->append(QLatin1String("Current selection:\n")); mInfo->append(QStringLiteral("Current selection:\n"));
for (const Akonadi::EmailAddressSelection &selection : mAddressesWidget->selectedAddresses()) { for (const Akonadi::EmailAddressSelection &selection : mAddressesWidget->selectedAddresses()) {
mInfo->append(QStringLiteral("%1: %2\n").arg(selection.name()).arg(selection.email())); mInfo->append(QStringLiteral("%1: %2\n").arg(selection.name()).arg(selection.email()));
......
...@@ -35,6 +35,7 @@ class Addressee; ...@@ -35,6 +35,7 @@ class Addressee;
*/ */
class CONTACTEDITOR_EXPORT ContactEditorWidget : public ContactEditor::AbstractContactEditorWidget class CONTACTEDITOR_EXPORT ContactEditorWidget : public ContactEditor::AbstractContactEditorWidget
{ {
Q_OBJECT
public: public:
enum DisplayMode { enum DisplayMode {
FullMode, ///< Show all pages FullMode, ///< Show all pages
......
...@@ -28,6 +28,7 @@ class QAbstractItemView; ...@@ -28,6 +28,7 @@ class QAbstractItemView;
namespace ContactEditor { namespace ContactEditor {
class CustomFieldsListDelegate : public QStyledItemDelegate class CustomFieldsListDelegate : public QStyledItemDelegate
{ {
Q_OBJECT
public: public:
explicit CustomFieldsListDelegate(QAbstractItemView *view, QObject *parent = nullptr); explicit CustomFieldsListDelegate(QAbstractItemView *view, QObject *parent = nullptr);
~CustomFieldsListDelegate(); ~CustomFieldsListDelegate();
......
...@@ -119,7 +119,7 @@ KContacts::Email MailWidget::email() ...@@ -119,7 +119,7 @@ KContacts::Email MailWidget::email()
} }
if (mMailEdit->preferred()) { if (mMailEdit->preferred()) {
if (!value.contains(QLatin1String("PREF"))) { if (!value.contains(QLatin1String("PREF"))) {
value.append(QLatin1String("PREF")); value.append(QStringLiteral("PREF"));
} }
} else { } else {
value.removeAll(QStringLiteral("PREF")); value.removeAll(QStringLiteral("PREF"));
......
...@@ -84,13 +84,13 @@ void MessageFormattingWidget::storeContact(KContacts::Addressee &contact) const ...@@ -84,13 +84,13 @@ void MessageFormattingWidget::storeContact(KContacts::Addressee &contact) const
} else if (index == 2) { } else if (index == 2) {
mailPreferedFormatting = QStringLiteral("HTML"); mailPreferedFormatting = QStringLiteral("HTML");
} }
ContactEditor::Utils::storeCustom(contact, QLatin1String("MailPreferedFormatting"), mailPreferedFormatting); ContactEditor::Utils::storeCustom(contact, QStringLiteral("MailPreferedFormatting"), mailPreferedFormatting);
QString mailAllowToRemoteContent; QString mailAllowToRemoteContent;
if (mAllowRemoteContent->isChecked()) { if (mAllowRemoteContent->isChecked()) {
mailAllowToRemoteContent = QLatin1String("TRUE"); mailAllowToRemoteContent = QStringLiteral("TRUE");
} }
ContactEditor::Utils::storeCustom(contact, QLatin1String("MailAllowToRemoteContent"), mailAllowToRemoteContent); ContactEditor::Utils::storeCustom(contact, QStringLiteral("MailAllowToRemoteContent"), mailAllowToRemoteContent);
} }
void MessageFormattingWidget::setReadOnly(bool readOnly) void MessageFormattingWidget::setReadOnly(bool readOnly)
......
...@@ -73,7 +73,7 @@ PhoneTypeDialog::PhoneTypeDialog(KContacts::PhoneNumber::Type type, QWidget *par ...@@ -73,7 +73,7 @@ PhoneTypeDialog::PhoneTypeDialog(KContacts::PhoneNumber::Type type, QWidget *par
KContacts::PhoneNumber::Type PhoneTypeDialog::type() const KContacts::PhoneNumber::Type PhoneTypeDialog::type() const
{ {
KContacts::PhoneNumber::Type type = 0; KContacts::PhoneNumber::Type type = nullptr;
for (int i = 0; i < mGroup->buttons().count(); ++i) { for (int i = 0; i < mGroup->buttons().count(); ++i) {
QCheckBox *box = qobject_cast<QCheckBox *>(mGroup->buttons().at(i)); QCheckBox *box = qobject_cast<QCheckBox *>(mGroup->buttons().at(i));
......
...@@ -123,7 +123,7 @@ KContacts::ResourceLocatorUrl WebWidget::url() ...@@ -123,7 +123,7 @@ KContacts::ResourceLocatorUrl WebWidget::url()
} }
if (mWebSiteEdit->preferred()) { if (mWebSiteEdit->preferred()) {
if (!value.contains(QLatin1String("PREF"))) { if (!value.contains(QLatin1String("PREF"))) {
value.append(QLatin1String("PREF")); value.append(QStringLiteral("PREF"));
} }
} else { } else {
value.removeAll(QStringLiteral("PREF")); value.removeAll(QStringLiteral("PREF"));
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
class KDatePickerAction : public QWidgetAction class KDatePickerAction : public QWidgetAction
{ {
Q_OBJECT
public: public:
KDatePickerAction(KDatePicker *widget, QObject *parent) KDatePickerAction(KDatePicker *widget, QObject *parent)
: QWidgetAction(parent) : QWidgetAction(parent)
...@@ -158,4 +159,5 @@ void KDatePickerPopup::slotNextMonth() ...@@ -158,4 +159,5 @@ void KDatePickerPopup::slotNextMonth()
Q_EMIT dateChanged(QDate::currentDate().addMonths(1)); Q_EMIT dateChanged(QDate::currentDate().addMonths(1));
} }
#include "kdatepickerpopup.moc"
#include "moc_kdatepickerpopup_p.cpp" #include "moc_kdatepickerpopup_p.cpp"
...@@ -144,7 +144,7 @@ ImageWidget::~ImageWidget() ...@@ -144,7 +144,7 @@ ImageWidget::~ImageWidget()
void ImageWidget::loadContact(const KContacts::Addressee &contact) void ImageWidget::loadContact(const KContacts::Addressee &contact)
{ {
mPicture = (mType == Photo ? contact.photo() : contact.logo()); mPicture = (mType == Photo) ? contact.photo() : contact.logo();
if (mPicture.isIntern() && !mPicture.data().isNull()) { if (mPicture.isIntern() && !mPicture.data().isNull()) {
mHasImage = true; mHasImage = true;
} else if (!mPicture.isIntern() && !mPicture.url().isEmpty()) { } else if (!mPicture.isIntern() && !mPicture.url().isEmpty()) {
......
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