summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 07:13:00 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 11:02:28 (GMT)
commit7dadd2361d81cbd14faaf4e5d8f627819e11bc45 (patch)
tree884d59bfde635a32b7886e247351055c98dbe471
parent6b4ca1e4419c17fcd6266a90af1c436a80887448 (diff)
Fix some clazy warning
-rw-r--r--kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp3
-rw-r--r--kaddressbook/importexportplugins/csv/import/qcsvreader.cpp4
-rw-r--r--kaddressbook/importexportplugins/csv/import/qcsvreader.h4
-rw-r--r--kaddressbook/importexportplugins/csv/import/templateselectiondialog.cpp2
-rw-r--r--kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp2
-rw-r--r--kaddressbook/plugins/sendvcards/sendvcardsjob.cpp2
-rw-r--r--kaddressbook/plugins/sendvcards/sendvcardsjob.h2
-rw-r--r--kaddressbook/plugins/sendvcards/sendvcardsplugininterface.h1
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.cpp2
-rw-r--r--kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.h2
-rw-r--r--kmail/plugins/common/antispamwizard.h1
-rw-r--r--plugins/messageviewer/bodypartformatter/calendar/attendeeselector.cpp1
12 files changed, 17 insertions, 9 deletions
diff --git a/kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp b/kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp
index dbe8d1e..c6a47bb 100644
--- a/kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp
+++ b/kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp
@@ -64,6 +64,7 @@ enum {
class ContactFieldComboBox : public KComboBox
{
+ Q_OBJECT
public:
ContactFieldComboBox(QWidget *parent = Q_NULLPTR)
@@ -796,3 +797,5 @@ void CSVImportDialog::modelFinishedLoading()
mFieldSelection.clear();
}
+#include "csvimportdialog.moc"
+
diff --git a/kaddressbook/importexportplugins/csv/import/qcsvreader.cpp b/kaddressbook/importexportplugins/csv/import/qcsvreader.cpp
index 6745867..6d6eed1 100644
--- a/kaddressbook/importexportplugins/csv/import/qcsvreader.cpp
+++ b/kaddressbook/importexportplugins/csv/import/qcsvreader.cpp
@@ -264,7 +264,7 @@ bool QCsvReader::read(QIODevice *device)
return true;
}
-void QCsvReader::setTextQuote(const QChar &textQuote)
+void QCsvReader::setTextQuote(QChar textQuote)
{
d->mTextQuote = textQuote;
}
@@ -274,7 +274,7 @@ QChar QCsvReader::textQuote() const
return d->mTextQuote;
}
-void QCsvReader::setDelimiter(const QChar &delimiter)
+void QCsvReader::setDelimiter(QChar delimiter)
{
d->mDelimiter = delimiter;
}
diff --git a/kaddressbook/importexportplugins/csv/import/qcsvreader.h b/kaddressbook/importexportplugins/csv/import/qcsvreader.h
index 18ee74e..4064610 100644
--- a/kaddressbook/importexportplugins/csv/import/qcsvreader.h
+++ b/kaddressbook/importexportplugins/csv/import/qcsvreader.h
@@ -119,7 +119,7 @@ public:
/**
* Sets the character that is used for quoting. The default is '"'.
*/
- void setTextQuote(const QChar &textQuote);
+ void setTextQuote(QChar textQuote);
/**
* Returns the character that is used for quoting.
@@ -130,7 +130,7 @@ public:
* Sets the character that is used as delimiter for fields.
* The default is ' '.
*/
- void setDelimiter(const QChar &delimiter);
+ void setDelimiter(QChar delimiter);
/**
* Returns the delimiter that is used as delimiter for fields.
diff --git a/kaddressbook/importexportplugins/csv/import/templateselectiondialog.cpp b/kaddressbook/importexportplugins/csv/import/templateselectiondialog.cpp
index cea86c5..a8fb083 100644
--- a/kaddressbook/importexportplugins/csv/import/templateselectiondialog.cpp
+++ b/kaddressbook/importexportplugins/csv/import/templateselectiondialog.cpp
@@ -46,6 +46,7 @@ typedef struct {
class TemplatesModel : public QAbstractTableModel
{
+ Q_OBJECT
public:
TemplatesModel(QObject *parent = Q_NULLPTR)
: QAbstractTableModel(parent)
@@ -251,3 +252,4 @@ void TemplateSelectionDialog::updateButtons()
mOkButton->setEnabled(mView->currentIndex().isValid());
}
+#include "templateselectiondialog.moc"
diff --git a/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp b/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
index a6da9e9..367dee2 100644
--- a/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
+++ b/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
@@ -579,7 +579,7 @@ bool VCardImportExportPluginInterface::canImportFileType(const QUrl &url)
QString VCardImportExportPluginInterface::contactFileName(const KContacts::Addressee &contact) const
{
if (!contact.givenName().isEmpty() && !contact.familyName().isEmpty()) {
- return QStringLiteral("%1_%2").arg(contact.givenName()).arg(contact.familyName());
+ return QStringLiteral("%1_%2").arg(contact.givenName(), contact.familyName());
}
if (!contact.familyName().isEmpty()) {
diff --git a/kaddressbook/plugins/sendvcards/sendvcardsjob.cpp b/kaddressbook/plugins/sendvcards/sendvcardsjob.cpp
index 8e524da..fda3a28 100644
--- a/kaddressbook/plugins/sendvcards/sendvcardsjob.cpp
+++ b/kaddressbook/plugins/sendvcards/sendvcardsjob.cpp
@@ -117,7 +117,7 @@ KContacts::VCardConverter::Version SendVcardsJob::version() const
return mVersion;
}
-void SendVcardsJob::setVersion(const KContacts::VCardConverter::Version &version)
+void SendVcardsJob::setVersion(KContacts::VCardConverter::Version version)
{
mVersion = version;
}
diff --git a/kaddressbook/plugins/sendvcards/sendvcardsjob.h b/kaddressbook/plugins/sendvcards/sendvcardsjob.h
index 953d590..0e5eca4 100644
--- a/kaddressbook/plugins/sendvcards/sendvcardsjob.h
+++ b/kaddressbook/plugins/sendvcards/sendvcardsjob.h
@@ -41,7 +41,7 @@ public:
bool start();
KContacts::VCardConverter::Version version() const;
- void setVersion(const KContacts::VCardConverter::Version &version);
+ void setVersion(KContacts::VCardConverter::Version version);
Q_SIGNALS:
void sendVCardsError(const QString &error);
diff --git a/kaddressbook/plugins/sendvcards/sendvcardsplugininterface.h b/kaddressbook/plugins/sendvcards/sendvcardsplugininterface.h
index b5cbfe9..674ca2b 100644
--- a/kaddressbook/plugins/sendvcards/sendvcardsplugininterface.h
+++ b/kaddressbook/plugins/sendvcards/sendvcardsplugininterface.h
@@ -24,6 +24,7 @@
class SendVcardsPluginInterface : public PimCommon::GenericPluginInterface
{
+ Q_OBJECT
public:
explicit SendVcardsPluginInterface(QObject *parent = Q_NULLPTR);
~SendVcardsPluginInterface();
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.cpp
index 10a38e7..3dce43d 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.cpp
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.cpp
@@ -115,7 +115,7 @@ void ConfirmAddressConfigureTabWidget::saveSettings(KConfigGroup &grp)
identityGroup.writeEntry("RejectDomain", mRejectedDomain->isChecked());
}
-void ConfirmAddressConfigureTabWidget::setIdentity(const uint &identity)
+void ConfirmAddressConfigureTabWidget::setIdentity(uint identity)
{
mIdentity = identity;
}
diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.h b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.h
index 987dc51..bcce599 100644
--- a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.h
+++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfiguretabwidget.h
@@ -38,7 +38,7 @@ public:
void loadSettings(const KConfigGroup &grp);
void saveSettings(KConfigGroup &grp);
- void setIdentity(const uint &identity);
+ void setIdentity(uint identity);
Q_SIGNALS:
void configureChanged();
diff --git a/kmail/plugins/common/antispamwizard.h b/kmail/plugins/common/antispamwizard.h
index 731509f..6f695cd 100644
--- a/kmail/plugins/common/antispamwizard.h
+++ b/kmail/plugins/common/antispamwizard.h
@@ -296,6 +296,7 @@ private:
//---------------------------------------------------------------------------
class ASWizPage : public QWidget
{
+ Q_OBJECT
public:
ASWizPage(QWidget *parent, const QString &name);
diff --git a/plugins/messageviewer/bodypartformatter/calendar/attendeeselector.cpp b/plugins/messageviewer/bodypartformatter/calendar/attendeeselector.cpp
index b50d4e2..ece6d24 100644
--- a/plugins/messageviewer/bodypartformatter/calendar/attendeeselector.cpp
+++ b/plugins/messageviewer/bodypartformatter/calendar/attendeeselector.cpp
@@ -63,6 +63,7 @@ QStringList AttendeeSelector::attendees() const
{
QStringList rv;
const int numberOfAttendee(ui.attendeeList->count());
+ rv.reserve(numberOfAttendee);
for (int i = 0; i < numberOfAttendee; ++i) {
const QString addr = ui.attendeeList->item(i)->text();