diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-07 14:07:37 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-10 12:44:56 +0200 |
commit | eb8efdd8a38ca2304634155bdab60b973aa44c17 (patch) | |
tree | 9f5e54c09d77d07855435f696d8ed489898560d8 /tools | |
parent | 39e16d89dc759fc5aafe883476a163759d2ad6cf (diff) | |
download | qt4-tools-eb8efdd8a38ca2304634155bdab60b973aa44c17.tar.gz |
Fixed compiler warnings in meego graphics system helper.
Diffstat (limited to 'tools')
3 files changed, 13 insertions, 13 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp index 22b8d5f904..0670ac4a8e 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp @@ -51,11 +51,11 @@ QString QMeeGoGraphicsSystemHelper::runningGraphicsSystemName() { if (! QApplicationPrivate::instance()) { qWarning("Querying graphics system but application not running yet!"); - return ""; + return QString(); } QString name = QApplicationPrivate::instance()->graphics_system_name; - if (name == "runtime") { + if (name == QLatin1String("runtime")) { QRuntimeGraphicsSystem *rsystem = (QRuntimeGraphicsSystem *) QApplicationPrivate::instance()->graphics_system; name = rsystem->graphicsSystemName(); } @@ -65,32 +65,32 @@ QString QMeeGoGraphicsSystemHelper::runningGraphicsSystemName() bool QMeeGoGraphicsSystemHelper::isRunningMeeGo() { - return (runningGraphicsSystemName() == "meego"); + return (runningGraphicsSystemName() == QLatin1String("meego")); } void QMeeGoGraphicsSystemHelper::switchToMeeGo() { - if (runningGraphicsSystemName() == "meego") + if (isRunningMeeGo()) return; - if (QApplicationPrivate::instance()->graphics_system_name != "runtime") + if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime")) qWarning("Can't switch to meego - switching only supported with 'runtime' graphics system."); else { QApplication *app = static_cast<QApplication *>(QCoreApplication::instance()); - app->setGraphicsSystem("meego"); + app->setGraphicsSystem(QLatin1String("meego")); } } void QMeeGoGraphicsSystemHelper::switchToRaster() { - if (runningGraphicsSystemName() == "raster") + if (runningGraphicsSystemName() == QLatin1String("raster")) return; - if (QApplicationPrivate::instance()->graphics_system_name != "runtime") + if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime")) qWarning("Can't switch to raster - switching only supported with 'runtime' graphics system."); else { QApplication *app = static_cast<QApplication *>(QCoreApplication::instance()); - app->setGraphicsSystem("raster"); + app->setGraphicsSystem(QLatin1String("raster")); } } diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp index f159b586e6..2a1c04b2ce 100644 --- a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp +++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp @@ -95,7 +95,7 @@ QMeeGoLivePixmap* QMeeGoLivePixmap::fromLiveImage(QMeeGoLiveImage *liveImage) int h = liveImage->height(); counter++; - shm = new QSharedMemory(QString("QMeeGoLivePixmap%1").arg(counter)); + shm = new QSharedMemory(QString(QLatin1String("QMeeGoLivePixmap%1")).arg(counter)); shm->create((w * h * 4) + 2 * sizeof(int)); // +2 to store width & height shm->attach(); @@ -129,7 +129,7 @@ QMeeGoLivePixmap* QMeeGoLivePixmap::fromHandle(Qt::HANDLE handle) int height; uchar* imgData; - shm = new QSharedMemory(QString("QMeeGoLivePixmap%1").arg(handle)); + shm = new QSharedMemory(QString(QLatin1String("QMeeGoLivePixmap%1")).arg(handle)); shm->attach(); shm->lock(); diff --git a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp index 90991e7aca..f9f14ae88a 100644 --- a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp +++ b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp @@ -68,12 +68,12 @@ QPoint QMeeGoOverlayWidget::convertPoint(const QPoint &p) return QPoint(x, y); } -void QMeeGoOverlayWidget::showEvent(QShowEvent *event) +void QMeeGoOverlayWidget::showEvent(QShowEvent *) { QMeeGoRuntime::setSurfaceScaling(0, 0, width(), height()); } -bool QMeeGoOverlayWidget::eventFilter(QObject *obj, QEvent *event) +bool QMeeGoOverlayWidget::eventFilter(QObject *, QEvent *event) { if (event->spontaneous() == false) return false; |