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/draganddrop/draganddrop.pro | 1 - examples/draganddrop/draggableicons/draggableicons.pro | 5 ----- examples/draganddrop/draggableicons/dragwidget.cpp | 3 --- examples/draganddrop/draggableicons/main.cpp | 4 ---- examples/draganddrop/draggabletext/draggabletext.pro | 7 +------ examples/draganddrop/draggabletext/main.cpp | 4 ---- examples/draganddrop/dropsite/dropsite.pro | 4 ---- examples/draganddrop/fridgemagnets/dragwidget.cpp | 6 ------ examples/draganddrop/fridgemagnets/fridgemagnets.pro | 6 ------ examples/draganddrop/fridgemagnets/main.cpp | 4 ---- examples/draganddrop/puzzle/main.cpp | 4 ---- examples/draganddrop/puzzle/mainwindow.cpp | 4 ---- examples/draganddrop/puzzle/puzzle.pro | 8 -------- 13 files changed, 1 insertion(+), 59 deletions(-) (limited to 'examples/draganddrop') diff --git a/examples/draganddrop/draganddrop.pro b/examples/draganddrop/draganddrop.pro index 6759520ddc..a209ae31e4 100644 --- a/examples/draganddrop/draganddrop.pro +++ b/examples/draganddrop/draganddrop.pro @@ -6,7 +6,6 @@ SUBDIRS = draggableicons \ puzzle wince*: SUBDIRS -= dropsite -symbian: SUBDIRS -= dropsite # install sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop diff --git a/examples/draganddrop/draggableicons/draggableicons.pro b/examples/draganddrop/draggableicons/draggableicons.pro index 792de0a73c..9f4156135f 100644 --- a/examples/draganddrop/draggableicons/draggableicons.pro +++ b/examples/draganddrop/draggableicons/draggableicons.pro @@ -9,9 +9,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/draggableicons INSTALLS += target sources -symbian { - TARGET.UID3 = 0xA000C615 - CONFIG += qt_example -} QT += widgets -maemo5: CONFIG += qt_example diff --git a/examples/draganddrop/draggableicons/dragwidget.cpp b/examples/draganddrop/draggableicons/dragwidget.cpp index e465e8ada5..7a788dfa47 100644 --- a/examples/draganddrop/draggableicons/dragwidget.cpp +++ b/examples/draganddrop/draggableicons/dragwidget.cpp @@ -46,10 +46,7 @@ DragWidget::DragWidget(QWidget *parent) : QFrame(parent) { -#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) -#else setMinimumSize(200, 200); -#endif setFrameStyle(QFrame::Sunken | QFrame::StyledPanel); setAcceptDrops(true); diff --git a/examples/draganddrop/draggableicons/main.cpp b/examples/draganddrop/draggableicons/main.cpp index a6ade67651..7a80b92a8a 100644 --- a/examples/draganddrop/draggableicons/main.cpp +++ b/examples/draganddrop/draggableicons/main.cpp @@ -55,11 +55,7 @@ int main(int argc, char *argv[]) mainWidget.setLayout(horizontalLayout); mainWidget.setWindowTitle(QObject::tr("Draggable Icons")); -#ifdef Q_OS_SYMBIAN - mainWidget.showMaximized(); -#else mainWidget.show(); -#endif return app.exec(); } diff --git a/examples/draganddrop/draggabletext/draggabletext.pro b/examples/draganddrop/draggabletext/draggabletext.pro index 38c20663a2..1fd8e5ce6e 100644 --- a/examples/draganddrop/draggabletext/draggabletext.pro +++ b/examples/draganddrop/draggabletext/draggabletext.pro @@ -11,10 +11,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.txt *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/draggabletext INSTALLS += target sources -symbian { - TARGET.UID3 = 0xA000CF64 - CONFIG += qt_example -} QT += widgets -maemo5: CONFIG += qt_example -simulator: warning(This example might not fully work on Simulator platform) + diff --git a/examples/draganddrop/draggabletext/main.cpp b/examples/draganddrop/draggabletext/main.cpp index 0ae794b280..4d0a121337 100644 --- a/examples/draganddrop/draggabletext/main.cpp +++ b/examples/draganddrop/draggabletext/main.cpp @@ -47,10 +47,6 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); DragWidget window; -#ifdef Q_OS_SYMBIAN - window.showMaximized(); -#else window.show(); -#endif return app.exec(); } diff --git a/examples/draganddrop/dropsite/dropsite.pro b/examples/draganddrop/dropsite/dropsite.pro index c725992f26..8198b19e79 100644 --- a/examples/draganddrop/dropsite/dropsite.pro +++ b/examples/draganddrop/dropsite/dropsite.pro @@ -10,9 +10,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/dropsite INSTALLS += target sources -symbian: CONFIG += qt_example QT += widgets -maemo5: CONFIG += qt_example -symbian: warning(This example might not fully work on Symbian platform) -maemo5: warning(This example might not fully work on Maemo platform) simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp index 3dcd406174..44b377ab89 100644 --- a/examples/draganddrop/fridgemagnets/dragwidget.cpp +++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp @@ -65,11 +65,7 @@ DragWidget::DragWidget(QWidget *parent) wordLabel->show(); wordLabel->setAttribute(Qt::WA_DeleteOnClose); x += wordLabel->width() + 2; -#if defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) - if (x >= 345) { -#else if (x >= 245) { -#endif x = 5; y += wordLabel->height() + 2; } @@ -78,12 +74,10 @@ DragWidget::DragWidget(QWidget *parent) //! [1] //! [2] - #ifndef Q_WS_S60 //Fridge magnets is used for demoing Qt on S60 and themed backgrounds look better than white QPalette newPalette = palette(); newPalette.setColor(QPalette::Window, Qt::white); setPalette(newPalette); - #endif setMinimumSize(400, qMax(200, y)); setWindowTitle(tr("Fridge Magnets")); diff --git a/examples/draganddrop/fridgemagnets/fridgemagnets.pro b/examples/draganddrop/fridgemagnets/fridgemagnets.pro index 481fffd5fe..2bbfdf0b3a 100644 --- a/examples/draganddrop/fridgemagnets/fridgemagnets.pro +++ b/examples/draganddrop/fridgemagnets/fridgemagnets.pro @@ -11,11 +11,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.txt sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/fridgemagnets INSTALLS += target sources -symbian { - TARGET.UID3 = 0xA000C610 - CONFIG += qt_example -} - QT += widgets -maemo5: CONFIG += qt_example diff --git a/examples/draganddrop/fridgemagnets/main.cpp b/examples/draganddrop/fridgemagnets/main.cpp index 623e6d2718..ae2ecb4bde 100644 --- a/examples/draganddrop/fridgemagnets/main.cpp +++ b/examples/draganddrop/fridgemagnets/main.cpp @@ -51,15 +51,11 @@ int main(int argc, char *argv[]) #endif DragWidget window; -#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) - window.showMaximized(); -#else bool smallScreen = QApplication::arguments().contains("-small-screen"); if (smallScreen) window.showFullScreen(); else window.show(); -#endif return app.exec(); } diff --git a/examples/draganddrop/puzzle/main.cpp b/examples/draganddrop/puzzle/main.cpp index b432ddc40e..60341948ab 100644 --- a/examples/draganddrop/puzzle/main.cpp +++ b/examples/draganddrop/puzzle/main.cpp @@ -49,10 +49,6 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); MainWindow window; window.openImage(":/images/example.jpg"); -#ifdef Q_OS_SYMBIAN - window.showMaximized(); -#else window.show(); -#endif return app.exec(); } diff --git a/examples/draganddrop/puzzle/mainwindow.cpp b/examples/draganddrop/puzzle/mainwindow.cpp index c00892a098..800213e442 100644 --- a/examples/draganddrop/puzzle/mainwindow.cpp +++ b/examples/draganddrop/puzzle/mainwindow.cpp @@ -138,11 +138,7 @@ void MainWindow::setupWidgets() { QFrame *frame = new QFrame; QHBoxLayout *frameLayout = new QHBoxLayout(frame); -#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR) - puzzleWidget = new PuzzleWidget(260); -#else puzzleWidget = new PuzzleWidget(400); -#endif piecesList = new PiecesList(puzzleWidget->pieceSize(), this); diff --git a/examples/draganddrop/puzzle/puzzle.pro b/examples/draganddrop/puzzle/puzzle.pro index d084827a45..7c69a41a39 100644 --- a/examples/draganddrop/puzzle/puzzle.pro +++ b/examples/draganddrop/puzzle/puzzle.pro @@ -15,17 +15,9 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/puzzle INSTALLS += target sources -symbian:{ - TARGET.UID3 = 0xA000CF65 - CONFIG += qt_example - addFile.files = example.jpg - addFile.path = . - DEPLOYMENT += addFile -} wince*: { addFile.files = example.jpg addFile.path = . DEPLOYMENT += addFile } QT += widgets -maemo5: CONFIG += qt_example -- cgit v1.2.3