From: Stephen Kelly Date: Thu, 26 Jul 2012 07:44:05 +0000 (+0200) Subject: Remove some dead code wrapped in Q_WS_QWS. X-Git-Tag: v5.0.0-beta1~448 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbe4b45f9b5149f80f8292b61be68b4020a05b55;p=profile%2Fivi%2Fqtbase.git Remove some dead code wrapped in Q_WS_QWS. Change-Id: Ie1ee8c4af603b924abe40145041357981d174445 Reviewed-by: Paul Olav Tvete --- diff --git a/examples/mainwindows/mainwindow/mainwindow.cpp b/examples/mainwindows/mainwindow/mainwindow.cpp index 4cdc45d..2ac2b56 100644 --- a/examples/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/mainwindows/mainwindow/mainwindow.cpp @@ -335,11 +335,6 @@ void MainWindow::setupDockWidgets(const QMap &customSizeHints) connect(swatch, SIGNAL(topLevelChanged(bool)), titlebar, SLOT(updateMask())); connect(swatch, SIGNAL(featuresChanged(QDockWidget::DockWidgetFeatures)), titlebar, SLOT(updateMask()), Qt::QueuedConnection); -#ifdef Q_WS_QWS - QPalette pal = palette(); - pal.setBrush(backgroundRole(), QColor(0,0,0,0)); - swatch->setPalette(pal); -#endif } QString name = QString::fromLatin1(sets[i].name); diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index 65571f1..0fad243 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -171,14 +171,14 @@ void tst_QImage::swap() void tst_QImage::create() { bool cr = true; -#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) QT_TRY { #endif //QImage image(7000000, 7000000, 8, 256, QImage::IgnoreEndian); QImage image(7000000, 7000000, QImage::Format_Indexed8); image.setColorCount(256); cr = !image.isNull(); -#if !defined(Q_WS_QWS) && !defined(Q_OS_WINCE) +#if !defined(Q_OS_WINCE) } QT_CATCH (...) { } #endif diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 6fe8727..6835474 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -63,9 +63,6 @@ #include #endif -#ifdef Q_WS_QWS -#include -#endif Q_DECLARE_METATYPE(QImage::Format) diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 2ff6098..bd075eb 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -3580,9 +3580,6 @@ void tst_QPainter::linearGradientSymmetry_data() void tst_QPainter::linearGradientSymmetry() { -#ifdef Q_WS_QWS - QSKIP("QWS has limited resolution in the gradient color table"); -#else QFETCH(QGradientStops, stops); QImage a(64, 8, QImage::Format_ARGB32_Premultiplied); @@ -3604,7 +3601,6 @@ void tst_QPainter::linearGradientSymmetry() b = b.mirrored(true); QCOMPARE(a, b); -#endif } void tst_QPainter::gradientInterpolation() diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp index eeda46d..8807195 100644 --- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp @@ -763,18 +763,12 @@ void tst_QLocalSocket::processConnection() QStringList serverArguments = QStringList() << SRCDIR "lackey/scripts/server.js" << QString::number(processes); QProcess producer; producer.setProcessChannelMode(QProcess::ForwardedChannels); -#ifdef Q_WS_QWS - serverArguments << "-qws"; -#endif QList consumers; producer.start("lackey/lackey", serverArguments); QVERIFY2(producer.waitForStarted(-1), qPrintable(producer.errorString())); QTest::qWait(2000); for (int i = 0; i < processes; ++i) { QStringList arguments = QStringList() << SRCDIR "lackey/scripts/client.js"; -#ifdef Q_WS_QWS - arguments << "-qws"; -#endif QProcess *p = new QProcess; p->setProcessChannelMode(QProcess::ForwardedChannels); consumers.append(p); diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index dd0b0dc..0772852 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -851,9 +851,6 @@ void tst_QGL::graphicsViewClipping() // Use Qt::Tool as fully decorated windows have a minimum width of 160 on Windows. view.setWindowFlags(view.windowFlags() | Qt::Tool); view.setBackgroundBrush(Qt::white); -#ifdef Q_WS_QWS - view.setWindowFlags(Qt::FramelessWindowHint); -#endif view.resize(2*size, 2*size); QGLWidget *viewport = new QGLWidget; @@ -1036,9 +1033,6 @@ public: void tst_QGL::glWidgetRendering() { GLWidget w; -#ifdef Q_WS_QWS - w.setWindowFlags(Qt::FramelessWindowHint); -#endif w.resize(256, 128); w.show(); @@ -1276,9 +1270,6 @@ void tst_QGL::glFBOUseInGLWidget() QSKIP("QGLFramebufferObject not supported on this platform"); FBOUseInGLWidget w; -#ifdef Q_WS_QWS - w.setWindowFlags(Qt::FramelessWindowHint); -#endif w.resize(100, 100); w.show(); @@ -1650,9 +1641,6 @@ protected: void tst_QGL::replaceClipping() { ReplaceClippingGLWidget glw; -#ifdef Q_WS_QWS - glw.setWindowFlags(Qt::FramelessWindowHint); -#endif glw.resize(300, 300); glw.show(); @@ -1764,9 +1752,6 @@ protected: void tst_QGL::clipTest() { ClipTestGLWidget glw; -#ifdef Q_WS_QWS - glw.setWindowFlags(Qt::FramelessWindowHint); -#endif glw.resize(220, 220); glw.show(); diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 8dac4bd..ab18033 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -2264,9 +2264,6 @@ void tst_QGraphicsItem::zValue() QVERIFY(QTest::qWaitForWindowExposed(&view)); QApplication::processEvents(); -#ifdef Q_WS_QWS - QApplication::sendPostedEvents(); //glib workaround -#endif QTRY_VERIFY(!_paintedItems.isEmpty()); QVERIFY((_paintedItems.size() % 4) == 0); diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp index 7a8e6f1..b731bec 100644 --- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2951,8 +2951,8 @@ protected: void tst_QGraphicsWidget::respectHFW() { -#if defined(Q_OS_WINCE) || defined(Q_OS_MAC) || defined(Q_WS_QWS) - qDebug("This test is platform dependent, it fails on wince, mac and qws. Please fix."); +#if defined(Q_OS_WINCE) || defined(Q_OS_MAC) + QSKIP("This test is platform dependent, it fails on wince and mac. Please fix."); #else QGraphicsScene scene; HFWWidget *window = new HFWWidget; diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp index 6f4faf8..b212a6f 100644 --- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp @@ -896,9 +896,6 @@ void tst_QAbstractItemView::dragAndDrop() { // From Task 137729 -#ifdef Q_WS_QWS - QSKIP("Embedded drag-and-drop not good enough yet..."); -#endif const int attempts = 10; int successes = 0; @@ -937,9 +934,6 @@ void tst_QAbstractItemView::dragAndDrop() void tst_QAbstractItemView::dragAndDropOnChild() { -#ifdef Q_WS_QWS - QSKIP("Embedded drag-and-drop not good enough yet..."); -#endif const int attempts = 10; int successes = 0; diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp index 2e126f4..e2e5fac 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp @@ -468,9 +468,6 @@ void tst_QItemDelegate::font() table.setItem(0, 0, item); QApplication::processEvents(); -#ifdef Q_WS_QWS - QApplication::sendPostedEvents(); //glib workaround -#endif QTRY_COMPARE(delegate->displayText, item->text()); if (properties.contains("italic")) { diff --git a/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp index d4531bc..b9d2596 100644 --- a/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp +++ b/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp @@ -148,9 +148,6 @@ void tst_QDesktopWidget::screenNumberForQPoint() int screen; screen = desktopWidget->screenNumber(allScreens.topLeft() - QPoint(1, 1)); -#ifdef Q_WS_QWS - QEXPECT_FAIL("", "Task 151710", Abort); -#endif QVERIFY(screen >= 0 && screen < desktopWidget->numScreens()); screen = desktopWidget->screenNumber(allScreens.topRight() + QPoint(1, 1)); QVERIFY(screen >= 0 && screen < desktopWidget->numScreens()); diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 85c8a4a..12cdbf5 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -750,13 +750,6 @@ void tst_QStyleSheetStyle::focusColors() widgets << combobox; widgets << new QLabel("TESTING TESTING"); -#ifdef Q_WS_QWS - // QWS has its own special focus logic which is slightly different - // and I don't dare change it at this point, because someone will - // be relying on it. It means that setFocus() on a NoFocus widget (i.e. - // a QLabel) will not work before the window is activated. - widgets[2]->setFocusPolicy(Qt::StrongFocus); -#endif foreach (QWidget *widget, widgets) { QDialog frame; @@ -826,10 +819,6 @@ void tst_QStyleSheetStyle::hoverColors() frame.setLayout(layout); frame.show(); -#ifdef Q_WS_QWS -//QWS does not implement enter/leave when windows are shown underneath the cursor - QCursor::setPos(QPoint(0,0)); -#endif QApplication::setActiveWindow(&frame); QVERIFY(QTest::qWaitForWindowActive(&frame)); diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index a6880bc..dd15080 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -513,9 +513,6 @@ void tst_QMdiArea::subWindowActivated2() QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort); #endif QVERIFY(QTest::qWaitForWindowExposed(&mdiArea)); -#if defined(Q_WS_QWS) - QEXPECT_FAIL("", "task 168682", Abort); -#endif #ifdef Q_OS_WINCE QSKIP("Not fixed yet. See Task 197453"); #endif diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp index 97c740b..f676e88 100644 --- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp +++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp @@ -134,9 +134,6 @@ void tst_QToolButton::triggered() tb.setMenu(menu); tb.setDefaultAction(def); -#ifdef Q_WS_QWS - QApplication::processEvents(); //wait for the window system to show the tool button -#endif def->trigger(); QCOMPARE(spy.count(),1);