summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 12:58:18 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 12:58:18 (GMT)
commit45922f5fa13e08b2b14856d8da1b327c252ee5e1 (patch)
treea808043886c38d45048c81d0629b4954ff70c759
parentf7dbed669675f038b40be7f84c3c72d7d83155d6 (diff)
Fix some clazy warning
-rw-r--r--autotests/libs/etmpopulationtest.cpp8
-rw-r--r--src/qsqlite/src/qsql_sqlite.cpp2
-rw-r--r--src/shared/akdebug.cpp4
3 files changed, 9 insertions, 5 deletions
diff --git a/autotests/libs/etmpopulationtest.cpp b/autotests/libs/etmpopulationtest.cpp
index 961f16b..1167aa6 100644
--- a/autotests/libs/etmpopulationtest.cpp
+++ b/autotests/libs/etmpopulationtest.cpp
@@ -53,7 +53,7 @@ public:
int end;
public Q_SLOTS:
- void onRowsInserted(QModelIndex p, int s, int e)
+ void onRowsInserted(const QModelIndex &p, int s, int e)
{
qDebug() << "rowsInserted( parent =" << p << ", start = " << s << ", end = " << e << ", data = " << p.data().toString() << ")";
mSignals << QStringLiteral("rowsInserted");
@@ -61,7 +61,7 @@ public Q_SLOTS:
start = s;
end = e;
}
- void onRowsRemoved(QModelIndex p, int s, int e)
+ void onRowsRemoved(const QModelIndex &p, int s, int e)
{
qDebug() << "rowsRemoved( parent = " << p << ", start = " << s << ", end = " << e << ")";
mSignals << QStringLiteral("rowsRemoved");
@@ -69,11 +69,11 @@ public Q_SLOTS:
start = s;
end = e;
}
- void onRowsMoved(QModelIndex, int, int, QModelIndex, int)
+ void onRowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)
{
mSignals << QStringLiteral("rowsMoved");
}
- void onDataChanged(QModelIndex tl, QModelIndex br)
+ void onDataChanged(const QModelIndex &tl, const QModelIndex &br)
{
qDebug() << "dataChanged( topLeft =" << tl << "(" << tl.data().toString() << "), bottomRight =" << br << "(" << br.data().toString() << ") )";
mSignals << QStringLiteral("dataChanged");
diff --git a/src/qsqlite/src/qsql_sqlite.cpp b/src/qsqlite/src/qsql_sqlite.cpp
index e4971a3..0bb570c 100644
--- a/src/qsqlite/src/qsql_sqlite.cpp
+++ b/src/qsqlite/src/qsql_sqlite.cpp
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
static QString _q_escapeIdentifier(const QString &identifier)
{
QString res = identifier;
- if(!identifier.isEmpty() && identifier.left(1) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) {
+ if(!identifier.isEmpty() && identifier.at(0) != QString(QLatin1Char('"')) && identifier.right(1) != QString(QLatin1Char('"')) ) {
res.replace(QLatin1Char('"'), QStringLiteral("\"\""));
res.prepend(QLatin1Char('"')).append(QLatin1Char('"'));
res.replace(QLatin1Char('.'), QStringLiteral("\".\""));
diff --git a/src/shared/akdebug.cpp b/src/shared/akdebug.cpp
index ab3a545..da1f05a 100644
--- a/src/shared/akdebug.cpp
+++ b/src/shared/akdebug.cpp
@@ -37,6 +37,7 @@
class FileDebugStream : public QIODevice
{
+ Q_OBJECT
public:
FileDebugStream()
: mType(QtCriticalMsg)
@@ -215,3 +216,6 @@ void akMakeVerbose(const QByteArray &category)
QLoggingCategory::CategoryFilter oldFilter = QLoggingCategory::installFilter(akCategoryFilter);
sInstance()->setOrigCategoryFilter(oldFilter);
}
+
+#include "akdebug.moc"
+