summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-11-26 17:41:07 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-11-26 21:02:18 (GMT)
commitdc23fd546163edb7ff4395f44217b5cb2600004a (patch)
tree37f494c22bf86888424b195bc2e6ef9d68529b0e
parentb284975435f80eba7bf6d1edd21987dcee134e86 (diff)
downloadQt-dc23fd546163edb7ff4395f44217b5cb2600004a.zip
Qt-dc23fd546163edb7ff4395f44217b5cb2600004a.tar.gz
Qt-dc23fd546163edb7ff4395f44217b5cb2600004a.tar.bz2
Fix warnings related to unused variables.
Just add some Q_UNUSED for parameters or remove the variable we don't need for the others. Reviewed-by: Trust Me
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp1
-rw-r--r--src/gui/styles/qstyle.cpp2
-rw-r--r--src/gui/styles/qstyleoption.cpp4
-rw-r--r--src/opengl/qgl_x11egl.cpp1
-rw-r--r--src/opengl/qglpixelbuffer_egl.cpp1
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp2
-rw-r--r--tools/shared/windows/registry.cpp3
8 files changed, 11 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 1160ed8..c646302 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -2232,6 +2232,8 @@ bool QDeclarative_isFileCaseCorrect(const QString &fileName)
if (a != c)
return false;
}
+#else
+ Q_UNUSED(fileName);
#endif
return true;
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 0adcdbd..dd9a224 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -320,7 +320,6 @@ void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaOb
{
Q_ASSERT(engine);
Q_ASSERT(metaObject);
- QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
clear();
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 3ebfab2..be8f794 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -2456,6 +2456,8 @@ QDebug operator<<(QDebug debug, QStyle::State state)
qSort(states);
debug << states.join(QLatin1String(" | "));
debug << ')';
+#else
+ Q_UNUSED(state);
#endif
return debug;
}
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index 4780edf..05ca793 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5483,6 +5483,8 @@ QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
case QStyleOption::SO_GraphicsItem:
debug << "SO_GraphicsItem"; break;
}
+#else
+ Q_UNUSED(optionType);
#endif
return debug;
}
@@ -5496,6 +5498,8 @@ QDebug operator<<(QDebug debug, const QStyleOption &option)
debug << ',' << option.state;
debug << ',' << option.rect;
debug << ')';
+#else
+ Q_UNUSED(option);
#endif
return debug;
}
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index d33ea56..144d140 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -97,7 +97,6 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
XVisualInfo visualInfo;
XVisualInfo *vi;
int numVisuals;
- EGLint id = 0;
visualInfo.visualid = QEgl::getCompatibleVisualId(config);
vi = XGetVisualInfo(X11->display, VisualIDMask, &visualInfo, &numVisuals);
diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp
index 0b94f5a..2d9f6f1 100644
--- a/src/opengl/qglpixelbuffer_egl.cpp
+++ b/src/opengl/qglpixelbuffer_egl.cpp
@@ -74,7 +74,6 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
// Use the same configuration as the widget we are sharing with.
ctx->setConfig(shareContext->config());
#if QGL_RENDER_TEXTURE
- EGLint value = EGL_FALSE;
if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGBA) == EGL_TRUE)
textureFormat = EGL_TEXTURE_RGBA;
else if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGB) == EGL_TRUE)
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
index 952a444..0545422 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp
+++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
@@ -216,7 +216,6 @@ void QConnmanManagerInterface::registerCounter(const QString &path, quint32 inte
{ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("RegisterCounter"),
QVariant::fromValue(path),
QVariant::fromValue(interval));
- bool ok = true;
if(reply.error().type() == QDBusError::InvalidArgs) {
qWarning() << reply.error().message();
}
@@ -225,7 +224,6 @@ void QConnmanManagerInterface::registerCounter(const QString &path, quint32 inte
void QConnmanManagerInterface::unregisterCounter(const QString &path)
{ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("UnregisterCounter"),
QVariant::fromValue(path));
- bool ok = true;
if(reply.error().type() == QDBusError::InvalidArgs) {
qWarning() << reply.error().message();
}
diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp
index 48e9ae6..f520910 100644
--- a/tools/shared/windows/registry.cpp
+++ b/tools/shared/windows/registry.cpp
@@ -157,6 +157,9 @@ QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey)
}
RegCloseKey(handle);
+#else
+ Q_UNUSED(parentHandle);
+ Q_UNUSED(rSubkey)
#endif
return result;