summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz.qnx@kdab.com>2012-03-09 16:07:14 +0100
committerThomas McGuire <thomas.mcguire@kdab.com>2012-11-23 13:13:28 +0100
commite52ad06dce51d7320b44e5e254a678fd40681bb7 (patch)
treec0a99eb0baaab2186676962a6d664ca5350757c9
parentee207f708cd73a8b2a4fd252a6bcc790499c34d8 (diff)
Fix some warnings
Change-Id: Id5f2f8d49bfdea1231920dd402c16472b4ec8571 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
-rwxr-xr-xplugins/geoservices/nokia/qgeomappingmanagerengine_nokia.cpp6
-rw-r--r--plugins/landmarks/common/qlandmarkfilehandler_lmx.cpp5
-rw-r--r--plugins/landmarks/sqlite/databaseoperations.cpp17
-rw-r--r--plugins/landmarks/sqlite/qlandmarkmanagerengine_sqlite.cpp5
-rw-r--r--src/multimedia/effects/qsoundeffect_qmedia_p.cpp1
5 files changed, 20 insertions, 14 deletions
diff --git a/plugins/geoservices/nokia/qgeomappingmanagerengine_nokia.cpp b/plugins/geoservices/nokia/qgeomappingmanagerengine_nokia.cpp
index 6db6ab152d..0ff7f60965 100755
--- a/plugins/geoservices/nokia/qgeomappingmanagerengine_nokia.cpp
+++ b/plugins/geoservices/nokia/qgeomappingmanagerengine_nokia.cpp
@@ -198,11 +198,11 @@ namespace
QGeoMappingManagerEngineNokia::QGeoMappingManagerEngineNokia(const QMap<QString, QVariant> &parameters, QGeoServiceProvider::Error *error, QString *errorString)
: QGeoTiledMappingManagerEngine(parameters),
m_cache(0),
+ m_firstSubdomain(QChar::Null),
+ m_maxSubdomains(0),
m_token(QGeoServiceProviderFactoryNokia::defaultToken),
m_referer(QGeoServiceProviderFactoryNokia::defaultReferer),
- m_logoPosition(ShiftedDown),
- m_firstSubdomain(QChar::Null),
- m_maxSubdomains(0)
+ m_logoPosition(ShiftedDown)
{
Q_UNUSED(error)
Q_UNUSED(errorString)
diff --git a/plugins/landmarks/common/qlandmarkfilehandler_lmx.cpp b/plugins/landmarks/common/qlandmarkfilehandler_lmx.cpp
index e7990ab788..8950a47bfd 100644
--- a/plugins/landmarks/common/qlandmarkfilehandler_lmx.cpp
+++ b/plugins/landmarks/common/qlandmarkfilehandler_lmx.cpp
@@ -71,8 +71,8 @@ bool isURIAbsolute(const QString &uri)
QLandmarkFileHandlerLmx::QLandmarkFileHandlerLmx(const volatile bool * cancel)
: QObject(),
- m_writer(0),
m_reader(0),
+ m_writer(0),
m_option(QLandmarkManager::IncludeCategoryData),
m_cancel(cancel),
m_categoryIdNameHash(QHash<QString,QString>())
@@ -689,7 +689,7 @@ bool QLandmarkFileHandlerLmx::readCategory(QString &name)
if (m_reader->name() == "id") {
bool ok = false;
idString = m_reader->readElementText();
- unsigned int id = idString.toUShort(&ok);
+ (void)idString.toUShort(&ok);
if (!ok) {
m_reader->raiseError(QString("The element \"id\" expected a value convertable to type unsigned short (value was \"%1\").").arg(idString));
@@ -776,6 +776,7 @@ bool QLandmarkFileHandlerLmx::writeLmx()
bool QLandmarkFileHandlerLmx::writeLandmarkCollection(const QList<QLandmark> &landmarkCollection)
{
+ Q_UNUSED(landmarkCollection);
m_writer->writeStartElement(m_ns, "landmarkCollection");
for (int i = 0; i < m_landmarks.size(); ++i) {
diff --git a/plugins/landmarks/sqlite/databaseoperations.cpp b/plugins/landmarks/sqlite/databaseoperations.cpp
index 1f186dc1cf..0c263a028f 100644
--- a/plugins/landmarks/sqlite/databaseoperations.cpp
+++ b/plugins/landmarks/sqlite/databaseoperations.cpp
@@ -512,6 +512,7 @@ bool executeQuery(QSqlQuery *query, const QString &statement, const QMap<QString
QString queryStringForRadius(const QGeoCoordinate &coord, qreal radius)
{
Q_UNUSED(radius);
+ Q_UNUSED(coord);
return "SELECT id, latitude, longitude FROM landmark;";
}
@@ -1851,8 +1852,8 @@ bool DatabaseOperations::saveLandmarks(QList<QLandmark> * landmark,
lastError = QLandmarkManager::CancelError;
lastErrorString = "Landmark save was canceled";
if (errorMap) {
- for (i; i < landmark->size(); ++i)
- errorMap->insert(i, lastError);
+ for (int j = i; j < landmark->size(); ++j)
+ errorMap->insert(j, lastError);
}
noErrors = false;
break;
@@ -1950,8 +1951,8 @@ bool DatabaseOperations::removeLandmarks(const QList<QLandmarkId> &landmarkIds,
lastError = QLandmarkManager::CancelError;
lastErrorString = "Landmark remove was canceled";
if (errorMap) {
- for (i; i < landmarkIds.size(); ++i)
- errorMap->insert(i, lastError);
+ for (int j = i; j < landmarkIds.size(); ++j)
+ errorMap->insert(j, lastError);
}
noErrors = false;
break;
@@ -2395,8 +2396,8 @@ bool DatabaseOperations::saveCategories(QList<QLandmarkCategory> * categories,
lastError = QLandmarkManager::CancelError;
lastErrorString = "Category save was canceled";
if (errorMap) {
- for (i; i < categories->size(); ++i)
- errorMap->insert(i, lastError);
+ for (int j = i; j < categories->size(); ++j)
+ errorMap->insert(j, lastError);
}
noErrors = false;
break;
@@ -2542,8 +2543,8 @@ bool DatabaseOperations::removeCategories(const QList<QLandmarkCategoryId> &cate
lastError = QLandmarkManager::CancelError;
lastErrorString = "Category remove was canceled";
if (errorMap) {
- for (i; i < categoryIds.size(); ++i)
- errorMap->insert(i, lastError);
+ for (int j = i; j < categoryIds.size(); ++j)
+ errorMap->insert(j, lastError);
}
noErrors = false;
break;
diff --git a/plugins/landmarks/sqlite/qlandmarkmanagerengine_sqlite.cpp b/plugins/landmarks/sqlite/qlandmarkmanagerengine_sqlite.cpp
index 9835edcf26..36887757c7 100644
--- a/plugins/landmarks/sqlite/qlandmarkmanagerengine_sqlite.cpp
+++ b/plugins/landmarks/sqlite/qlandmarkmanagerengine_sqlite.cpp
@@ -103,10 +103,10 @@ QLandmarkManagerEngineSqlite::QLandmarkManagerEngineSqlite(const QString &filena
QString *errorString)
: m_dbFilename(filename),
m_dbConnectionName(QUuid::createUuid().toString()),
+ m_isCustomAttributesEnabled(false),
m_dbWatcher(NULL),
m_latestLandmarkTimestamp(0),
m_latestCategoryTimestamp(0),
- m_isCustomAttributesEnabled(false),
m_databaseOperations()
{
Q_ASSERT(error);
@@ -399,6 +399,7 @@ bool QLandmarkManagerEngineSqlite::exportLandmarks(QIODevice *device,
QStringList QLandmarkManagerEngineSqlite::supportedFormats(QLandmarkManager::TransferOperation operation, QLandmarkManager::Error *error, QString *errorString) const
{
+ Q_UNUSED(operation);
Q_ASSERT(error);
Q_ASSERT(errorString);
*error = QLandmarkManager::NoError;
@@ -470,6 +471,7 @@ bool QLandmarkManagerEngineSqlite::isReadOnly(QLandmarkManager::Error *error, QS
bool QLandmarkManagerEngineSqlite::isReadOnly(const QLandmarkId &landmarkId, QLandmarkManager::Error *error, QString *errorString) const
{
+ Q_UNUSED(landmarkId);
Q_ASSERT(error);
Q_ASSERT(errorString);
*error = QLandmarkManager::NoError;
@@ -480,6 +482,7 @@ bool QLandmarkManagerEngineSqlite::isReadOnly(const QLandmarkId &landmarkId, QLa
bool QLandmarkManagerEngineSqlite::isReadOnly(const QLandmarkCategoryId &categoryId, QLandmarkManager::Error *error, QString *errorString) const
{
+ Q_UNUSED(categoryId);
Q_ASSERT(error);
Q_ASSERT(errorString);
*error = QLandmarkManager::NoError;
diff --git a/src/multimedia/effects/qsoundeffect_qmedia_p.cpp b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp
index 5b26aabcc4..c33d9d65fe 100644
--- a/src/multimedia/effects/qsoundeffect_qmedia_p.cpp
+++ b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp
@@ -199,6 +199,7 @@ void QSoundEffectPrivate::mediaStatusChanged(QMediaPlayer::MediaStatus status)
void QSoundEffectPrivate::error(QMediaPlayer::Error err)
{
+ Q_UNUSED(err);
bool playingDirty = false;
if (m_playing) {
m_playing = false;