From 87274e272d2a854563066489e20d019b4e6320de Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 18 Oct 2011 09:54:31 +0200 Subject: QtBase examples: Remove Maemo/Symbian-specific code. - Maemo/Symbian are no longer supported and QWidget-based examples are no longer supposed to run on mobile platforms, so, remove any Maemo/Symbian or mobile-specific code from source files and profiles. - Remove Maemo/Symbian vibration examples. - Change Q_WS_MAC/WIN to Q_OS_MAC/WIN where appropriate. Reviewed-by: Casper van Donderen Change-Id: I488a0adadb98934567aa6416206a80465c9c3a81 Reviewed-by: Friedemann Kleint Reviewed-by: Casper van Donderen --- examples/embedded/digiflip/digiflip.cpp | 16 ---------------- examples/embedded/digiflip/digiflip.pro | 5 ----- examples/embedded/embedded.pro | 1 - examples/embedded/flickable/flickable.pro | 5 ----- examples/embedded/flickable/main.cpp | 4 ---- examples/embedded/flightinfo/flightinfo.cpp | 10 ---------- examples/embedded/flightinfo/flightinfo.pro | 6 ------ examples/embedded/lightmaps/lightmaps.cpp | 5 ----- examples/embedded/lightmaps/lightmaps.pro | 7 ------- examples/embedded/lightmaps/main.cpp | 7 ------- examples/embedded/lightmaps/mapzoom.cpp | 8 -------- examples/embedded/raycasting/raycasting.cpp | 4 ---- examples/embedded/raycasting/raycasting.pro | 5 ----- examples/embedded/styleexample/styleexample.pro | 4 ---- 14 files changed, 87 deletions(-) (limited to 'examples/embedded') diff --git a/examples/embedded/digiflip/digiflip.cpp b/examples/embedded/digiflip/digiflip.cpp index 38501d3ecc..dfe8432631 100644 --- a/examples/embedded/digiflip/digiflip.cpp +++ b/examples/embedded/digiflip/digiflip.cpp @@ -117,10 +117,6 @@ protected: QPixmap drawDigits(int n, const QRect &rect) { int scaleFactor = 2; -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) - if (rect.height() > 240) - scaleFactor = 1; -#endif QString str = QString::number(n); if (str.length() == 1) @@ -192,10 +188,8 @@ protected: void paintFlip() { QPainter p(this); -#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_WINCE_WM) p.setRenderHint(QPainter::SmoothPixmapTransform, true); p.setRenderHint(QPainter::Antialiasing, true); -#endif p.fillRect(rect(), Qt::black); int hw = width() / 2; @@ -319,16 +313,10 @@ public: connect(slideAction, SIGNAL(triggered()), SLOT(chooseSlide())); connect(flipAction, SIGNAL(triggered()), SLOT(chooseFlip())); connect(rotateAction, SIGNAL(triggered()), SLOT(chooseRotate())); -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) - menuBar()->addAction(slideAction); - menuBar()->addAction(flipAction); - menuBar()->addAction(rotateAction); -#else addAction(slideAction); addAction(flipAction); addAction(rotateAction); setContextMenuPolicy(Qt::ActionsContextMenu); -#endif } void updateTime() { @@ -414,12 +402,8 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); DigiFlip time; -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) - time.showMaximized(); -#else time.resize(320, 240); time.show(); -#endif return app.exec(); } diff --git a/examples/embedded/digiflip/digiflip.pro b/examples/embedded/digiflip/digiflip.pro index cd64f7cba6..29e215008d 100644 --- a/examples/embedded/digiflip/digiflip.pro +++ b/examples/embedded/digiflip/digiflip.pro @@ -1,10 +1,5 @@ SOURCES = digiflip.cpp -symbian { - TARGET.UID3 = 0xA000CF72 - CONFIG += qt_example -} - target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/digiflip sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/digiflip diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro index 8670fcb3a5..fbdfe2e908 100644 --- a/examples/embedded/embedded.pro +++ b/examples/embedded/embedded.pro @@ -9,5 +9,4 @@ sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded INSTALLS += sources -symbian: CONFIG += qt_demo QT += widgets widgets diff --git a/examples/embedded/flickable/flickable.pro b/examples/embedded/flickable/flickable.pro index d31e7eba14..82b39acce1 100644 --- a/examples/embedded/flickable/flickable.pro +++ b/examples/embedded/flickable/flickable.pro @@ -1,11 +1,6 @@ SOURCES = flickable.cpp main.cpp HEADERS = flickable.h -symbian { - TARGET.UID3 = 0xA000CF73 - CONFIG += qt_example -} - target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable diff --git a/examples/embedded/flickable/main.cpp b/examples/embedded/flickable/main.cpp index 5ecc0c10df..9f86281317 100644 --- a/examples/embedded/flickable/main.cpp +++ b/examples/embedded/flickable/main.cpp @@ -222,12 +222,8 @@ int main(int argc, char *argv[]) ColorList list; list.setWindowTitle("Kinetic Scrolling"); -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) - list.showMaximized(); -#else list.resize(320, 320); list.show(); -#endif return app.exec(); } diff --git a/examples/embedded/flightinfo/flightinfo.cpp b/examples/embedded/flightinfo/flightinfo.cpp index 592357cab4..c0beb9ea8c 100644 --- a/examples/embedded/flightinfo/flightinfo.cpp +++ b/examples/embedded/flightinfo/flightinfo.cpp @@ -126,16 +126,10 @@ public: connect(randomAction, SIGNAL(triggered()), SLOT(randomFlight())); connect(&m_manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleNetworkData(QNetworkReply*))); -#if defined(Q_OS_SYMBIAN) - menuBar()->addAction(searchTodayAction); - menuBar()->addAction(searchYesterdayAction); - menuBar()->addAction(randomAction); -#else addAction(searchTodayAction); addAction(searchYesterdayAction); addAction(randomAction); setContextMenuPolicy(Qt::ActionsContextMenu); -#endif } private slots: @@ -388,12 +382,8 @@ int main(int argc, char **argv) QApplication app(argc, argv); FlightInfo w; -#if defined(Q_OS_SYMBIAN) - w.showMaximized(); -#else w.resize(360, 504); w.show(); -#endif return app.exec(); } diff --git a/examples/embedded/flightinfo/flightinfo.pro b/examples/embedded/flightinfo/flightinfo.pro index 89a7265d41..a7a4fcec5a 100644 --- a/examples/embedded/flightinfo/flightinfo.pro +++ b/examples/embedded/flightinfo/flightinfo.pro @@ -5,12 +5,6 @@ FORMS += form.ui RESOURCES = flightinfo.qrc QT += network widgets -symbian { - TARGET.UID3 = 0xA000CF74 - CONFIG += qt_example - TARGET.CAPABILITY = NetworkServices -} - target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flightinfo sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flightinfo diff --git a/examples/embedded/lightmaps/lightmaps.cpp b/examples/embedded/lightmaps/lightmaps.cpp index 2489ddc840..2b97abacd8 100644 --- a/examples/embedded/lightmaps/lightmaps.cpp +++ b/examples/embedded/lightmaps/lightmaps.cpp @@ -122,11 +122,6 @@ void LightMaps::paintEvent(QPaintEvent *event) p.begin(this); m_normalMap->render(&p, event->rect()); p.setPen(Qt::black); -#if defined(Q_OS_SYMBIAN) - QFont font = p.font(); - font.setPixelSize(13); - p.setFont(font); -#endif p.drawText(rect(), Qt::AlignBottom | Qt::TextWordWrap, "Map data CCBYSA 2009 OpenStreetMap.org contributors"); p.end(); diff --git a/examples/embedded/lightmaps/lightmaps.pro b/examples/embedded/lightmaps/lightmaps.pro index 1f638b5398..92ef6b9410 100644 --- a/examples/embedded/lightmaps/lightmaps.pro +++ b/examples/embedded/lightmaps/lightmaps.pro @@ -8,13 +8,6 @@ SOURCES = lightmaps.cpp \ slippymap.cpp QT += network widgets -symbian { - TARGET.UID3 = 0xA000CF75 - CONFIG += qt_example - TARGET.CAPABILITY = NetworkServices - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 -} - target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/lightmaps sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/lightmaps diff --git a/examples/embedded/lightmaps/main.cpp b/examples/embedded/lightmaps/main.cpp index 85f74e638e..999c355f25 100644 --- a/examples/embedded/lightmaps/main.cpp +++ b/examples/embedded/lightmaps/main.cpp @@ -44,20 +44,13 @@ int main(int argc, char **argv) { -#if defined(Q_WS_X11) - QApplication::setGraphicsSystem("raster"); -#endif QApplication app(argc, argv); app.setApplicationName("LightMaps"); MapZoom w; -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) - w.showMaximized(); -#else w.resize(600, 450); w.show(); -#endif return app.exec(); } diff --git a/examples/embedded/lightmaps/mapzoom.cpp b/examples/embedded/lightmaps/mapzoom.cpp index 225c54c2a6..c1b43f07c7 100644 --- a/examples/embedded/lightmaps/mapzoom.cpp +++ b/examples/embedded/lightmaps/mapzoom.cpp @@ -64,13 +64,6 @@ MapZoom::MapZoom() connect(nightModeAction, SIGNAL(triggered()), map, SLOT(toggleNightMode())); connect(osmAction, SIGNAL(triggered()), SLOT(aboutOsm())); -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) - menuBar()->addAction(osloAction); - menuBar()->addAction(berlinAction); - menuBar()->addAction(jakartaAction); - menuBar()->addAction(nightModeAction); - menuBar()->addAction(osmAction); -#else QMenu *menu = menuBar()->addMenu(tr("&Options")); menu->addAction(osloAction); menu->addAction(berlinAction); @@ -78,7 +71,6 @@ MapZoom::MapZoom() menu->addSeparator(); menu->addAction(nightModeAction); menu->addAction(osmAction); -#endif QNetworkConfigurationManager manager; if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { diff --git a/examples/embedded/raycasting/raycasting.cpp b/examples/embedded/raycasting/raycasting.cpp index 0a50fb0419..f2de58a1c1 100644 --- a/examples/embedded/raycasting/raycasting.cpp +++ b/examples/embedded/raycasting/raycasting.cpp @@ -380,12 +380,8 @@ int main(int argc, char **argv) Raycasting w; w.setWindowTitle("Raycasting"); -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) - w.showMaximized(); -#else w.resize(640, 480); w.show(); -#endif return app.exec(); } diff --git a/examples/embedded/raycasting/raycasting.pro b/examples/embedded/raycasting/raycasting.pro index 181eadf74c..9c562d446c 100644 --- a/examples/embedded/raycasting/raycasting.pro +++ b/examples/embedded/raycasting/raycasting.pro @@ -2,11 +2,6 @@ TEMPLATE = app SOURCES = raycasting.cpp RESOURCES += raycasting.qrc -symbian { - TARGET.UID3 = 0xA000CF76 - CONFIG += qt_example -} - target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting diff --git a/examples/embedded/styleexample/styleexample.pro b/examples/embedded/styleexample/styleexample.pro index 5b1273e6aa..3cd4d0a3c0 100644 --- a/examples/embedded/styleexample/styleexample.pro +++ b/examples/embedded/styleexample/styleexample.pro @@ -11,8 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.html sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample INSTALLS += target sources -symbian { - TARGET.UID3 = 0xA000A63F - CONFIG += qt_example -} QT += widgets widgets -- cgit v1.2.3