aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 12:58:38 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 12:58:38 (GMT)
commit71c1c87b87a181c4f4582ad10ec4e45d610c96d2 (patch)
tree945e2f783e75fdd75c49a05f982b7313a12cac44
parent3d0b7dfd376e7b87ca4dfd85e04026381a20bd14 (diff)
Fix some clazy warningv16.11.80
-rw-r--r--src/collectionfiltermodel.cpp2
-rw-r--r--src/contactcompletionmodel.cpp3
-rw-r--r--src/editor/addresseditor/addresseslocationgrantleeformater.cpp1
-rw-r--r--src/editor/addresseditor/addresstypedialog.h1
-rw-r--r--src/editor/customfieldeditor/customfieldsmodel.h1
-rw-r--r--src/editor/generalinfoeditor/displaynameeditwidget.cpp3
-rw-r--r--src/editor/generalinfoeditor/nameeditdialog.h1
-rw-r--r--src/editor/generalinfoeditor/phone/phonetypedialog.h1
-rw-r--r--src/emailaddressselectionwidget.cpp3
-rw-r--r--src/waitingoverlay_p.h3
10 files changed, 15 insertions, 4 deletions
diff --git a/src/collectionfiltermodel.cpp b/src/collectionfiltermodel.cpp
index fad13e3..aa3e3e9 100644
--- a/src/collectionfiltermodel.cpp
+++ b/src/collectionfiltermodel.cpp
@@ -53,7 +53,7 @@ bool CollectionFilterModel::filterAcceptsRow(int row, const QModelIndex &parent)
if (!mContentMimeTypes.isEmpty()) {
QSet<QString> contentMimeTypes = collection.contentMimeTypes().toSet();
- accepted = accepted && !(contentMimeTypes.intersect(mContentMimeTypes).isEmpty());
+ accepted = accepted && contentMimeTypes.intersects(mContentMimeTypes);
}
if (mRights != Akonadi::Collection::ReadOnly) {
diff --git a/src/contactcompletionmodel.cpp b/src/contactcompletionmodel.cpp
index 319cd5b..117dc85 100644
--- a/src/contactcompletionmodel.cpp
+++ b/src/contactcompletionmodel.cpp
@@ -90,8 +90,7 @@ QVariant ContactCompletionModel::entityData(const Item &item, int column, int ro
}
break;
case NameAndEmailColumn: {
- QString name = QStringLiteral("%1 %2").arg(contact.givenName())
- .arg(contact.familyName()).simplified();
+ QString name = QStringLiteral("%1 %2").arg(contact.givenName(), contact.familyName()).simplified();
if (name.isEmpty()) {
name = contact.organization().simplified();
}
diff --git a/src/editor/addresseditor/addresseslocationgrantleeformater.cpp b/src/editor/addresseditor/addresseslocationgrantleeformater.cpp
index aceda9b..9a0301d 100644
--- a/src/editor/addresseditor/addresseslocationgrantleeformater.cpp
+++ b/src/editor/addresseditor/addresseslocationgrantleeformater.cpp
@@ -52,6 +52,7 @@ QString AddressesLocationGrantleeFormater::formatAddresses(const KContacts::Addr
const int nbAddress(addresses.count());
addressList.reserve(nbAddress);
QList<AddressGrantleeObject *> lstAddress;
+ lstAddress.reserve(nbAddress);
for (int i = 0; i < nbAddress; ++i) {
AddressGrantleeObject *addressObj = new AddressGrantleeObject(addresses.at(i), i);
addressList << QVariant::fromValue(static_cast<QObject *>(addressObj));
diff --git a/src/editor/addresseditor/addresstypedialog.h b/src/editor/addresseditor/addresstypedialog.h
index 412ae7b..ad44345 100644
--- a/src/editor/addresseditor/addresstypedialog.h
+++ b/src/editor/addresseditor/addresstypedialog.h
@@ -34,6 +34,7 @@ namespace Akonadi
{
class AddressTypeDialog : public QDialog
{
+ Q_OBJECT
public:
AddressTypeDialog(KContacts::Address::Type type, QWidget *parent);
~AddressTypeDialog();
diff --git a/src/editor/customfieldeditor/customfieldsmodel.h b/src/editor/customfieldeditor/customfieldsmodel.h
index e977e8c..d01bf62 100644
--- a/src/editor/customfieldeditor/customfieldsmodel.h
+++ b/src/editor/customfieldeditor/customfieldsmodel.h
@@ -28,6 +28,7 @@
class CustomFieldsModel : public QAbstractItemModel
{
+ Q_OBJECT
public:
enum Role {
TypeRole = Qt::UserRole,
diff --git a/src/editor/generalinfoeditor/displaynameeditwidget.cpp b/src/editor/generalinfoeditor/displaynameeditwidget.cpp
index 7ff600c..bbd1f96 100644
--- a/src/editor/generalinfoeditor/displaynameeditwidget.cpp
+++ b/src/editor/generalinfoeditor/displaynameeditwidget.cpp
@@ -52,6 +52,7 @@ static DisplayNameEditWidget::DisplayType guessedDisplayType(const KContacts::Ad
class DisplayNameDelegate : public QStyledItemDelegate
{
+ Q_OBJECT
public:
DisplayNameDelegate(QAbstractItemView *view, QObject *parent = Q_NULLPTR)
: QStyledItemDelegate(parent)
@@ -253,3 +254,5 @@ void DisplayNameEditWidget::setComboBoxEditable(bool value)
{
mView->setEditable(value);
}
+
+#include "displaynameeditwidget.moc"
diff --git a/src/editor/generalinfoeditor/nameeditdialog.h b/src/editor/generalinfoeditor/nameeditdialog.h
index 02304bd..7bb689e 100644
--- a/src/editor/generalinfoeditor/nameeditdialog.h
+++ b/src/editor/generalinfoeditor/nameeditdialog.h
@@ -32,6 +32,7 @@ class KComboBox;
class DisplayNameEditWidget;
class NameEditDialog : public QDialog
{
+ Q_OBJECT
public:
explicit NameEditDialog(QWidget *parent = Q_NULLPTR);
diff --git a/src/editor/generalinfoeditor/phone/phonetypedialog.h b/src/editor/generalinfoeditor/phone/phonetypedialog.h
index f828109..eef2614 100644
--- a/src/editor/generalinfoeditor/phone/phonetypedialog.h
+++ b/src/editor/generalinfoeditor/phone/phonetypedialog.h
@@ -32,6 +32,7 @@ namespace Akonadi
*/
class PhoneTypeDialog : public QDialog
{
+ Q_OBJECT
public:
/**
* Creates a new phone type dialog.
diff --git a/src/emailaddressselectionwidget.cpp b/src/emailaddressselectionwidget.cpp
index 2d01163..6278a5f 100644
--- a/src/emailaddressselectionwidget.cpp
+++ b/src/emailaddressselectionwidget.cpp
@@ -52,6 +52,7 @@ using namespace Akonadi;
*/
class SearchLineEdit : public QLineEdit
{
+ Q_OBJECT
public:
SearchLineEdit(QWidget *receiver, QWidget *parent = Q_NULLPTR)
: QLineEdit(parent)
@@ -232,3 +233,5 @@ QTreeView *EmailAddressSelectionWidget::view() const
{
return d->mView;
}
+
+#include "emailaddressselectionwidget.moc"
diff --git a/src/waitingoverlay_p.h b/src/waitingoverlay_p.h
index 98dbfb4..1946408 100644
--- a/src/waitingoverlay_p.h
+++ b/src/waitingoverlay_p.h
@@ -33,13 +33,14 @@ class KJob;
*/
class WaitingOverlay : public QWidget
{
+ Q_OBJECT
public:
/**
* Create an overlay widget on @p baseWidget for @p job.
* @param baseWidget must not be null.
* @param parent must not be equal to baseWidget
*/
- explicit WaitingOverlay(KJob *job, QWidget *baseWidget, QWidget *parent = 0);
+ explicit WaitingOverlay(KJob *job, QWidget *baseWidget, QWidget *parent = Q_NULLPTR);
~WaitingOverlay();
protected: