diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-07 12:07:37 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-09-10 10:44:56 (GMT) |
commit | eb8efdd8a38ca2304634155bdab60b973aa44c17 (patch) | |
tree | 9f5e54c09d77d07855435f696d8ed489898560d8 /tools/qmeegographicssystemhelper | |
parent | 39e16d89dc759fc5aafe883476a163759d2ad6cf (diff) | |
download | Qt-eb8efdd8a38ca2304634155bdab60b973aa44c17.zip Qt-eb8efdd8a38ca2304634155bdab60b973aa44c17.tar.gz Qt-eb8efdd8a38ca2304634155bdab60b973aa44c17.tar.bz2 |
Fixed compiler warnings in meego graphics system helper.
Diffstat (limited to 'tools/qmeegographicssystemhelper')
3 files changed, 13 insertions, 13 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp index 22b8d5f..0670ac4 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 f159b58..2a1c04b 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 90991e7..f9f14ae 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; |