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