From 07b5eac8a85088a928d04b84be9cc082e4500978 Mon Sep 17 00:00:00 2001 From: con Date: Tue, 22 Mar 2011 11:07:00 +0100 Subject: Use the new QT_QPA_DEFAULT_PLATFORM_NAME define. --- mkspecs/qws/macx-iphonedevice-g++/qplatformdefs.h | 2 ++ mkspecs/qws/macx-iphonesimulator-g++/qplatformdefs.h | 2 ++ src/plugins/platforms/uikit/examples/qmltest/main.mm | 16 +++------------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/mkspecs/qws/macx-iphonedevice-g++/qplatformdefs.h b/mkspecs/qws/macx-iphonedevice-g++/qplatformdefs.h index 425fda3..0468935 100644 --- a/mkspecs/qws/macx-iphonedevice-g++/qplatformdefs.h +++ b/mkspecs/qws/macx-iphonedevice-g++/qplatformdefs.h @@ -94,4 +94,6 @@ #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf +#define QT_QPA_DEFAULT_PLATFORM_NAME "uikit" + #endif // QPLATFORMDEFS_H diff --git a/mkspecs/qws/macx-iphonesimulator-g++/qplatformdefs.h b/mkspecs/qws/macx-iphonesimulator-g++/qplatformdefs.h index 425fda3..0468935 100644 --- a/mkspecs/qws/macx-iphonesimulator-g++/qplatformdefs.h +++ b/mkspecs/qws/macx-iphonesimulator-g++/qplatformdefs.h @@ -94,4 +94,6 @@ #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf +#define QT_QPA_DEFAULT_PLATFORM_NAME "uikit" + #endif // QPLATFORMDEFS_H diff --git a/src/plugins/platforms/uikit/examples/qmltest/main.mm b/src/plugins/platforms/uikit/examples/qmltest/main.mm index 6fd5629..2b5f024 100644 --- a/src/plugins/platforms/uikit/examples/qmltest/main.mm +++ b/src/plugins/platforms/uikit/examples/qmltest/main.mm @@ -39,14 +39,6 @@ ** ****************************************************************************/ -// -// main.m -// qmltest -// -// Created by Eike Troll on 18.02.11. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - #import #include "qmlapplicationviewer/qmlapplicationviewer.h" @@ -60,15 +52,13 @@ int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - setenv("QT_QPA_PLATFORM","uikit",1); - - QApplication app(argc, argv); + QApplication app(argc, argv); QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); - NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; + NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; viewer.setMainQmlFile(QString::fromUtf8([[resourcePath stringByAppendingPathComponent:@"qml/main.qml"] UTF8String])); viewer.showMaximized(); - int retVal = app.exec(); + int retVal = app.exec(); [pool release]; return retVal; } -- cgit v0.12