From 3401e91be078b54c8a385757c42da437c24bfc90 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 19 Jun 2012 18:15:48 -0700 Subject: Remove references to Q_WS_QWS Affected code includes: src/widgets/dialogs/qmessagebox.cpp src/widgets/graphicsview/qgraphicsitem.cpp src/widgets/kernel/qapplication_p.h src/widgets/kernel/qwhatsthis.cpp src/widgets/kernel/qwidget.h src/widgets/widgets/qdockwidget.cpp Change-Id: Ib9e920b3cc1253b39e4e00d7137c21321ecc0399 Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qmessagebox.cpp | 6 ++---- src/widgets/graphicsview/qgraphicsitem.cpp | 2 +- src/widgets/kernel/qapplication_p.h | 25 ------------------------- src/widgets/kernel/qwhatsthis.cpp | 2 +- src/widgets/kernel/qwidget.h | 15 --------------- src/widgets/widgets/qdockwidget.cpp | 2 +- 6 files changed, 5 insertions(+), 47 deletions(-) diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index a7173c813a..b9727c814b 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -242,7 +242,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text) label->setOpenExternalLinks(true); #if defined(Q_WS_MAC) label->setContentsMargins(16, 0, 0, 0); -#elif !defined(Q_WS_QWS) +#else label->setContentsMargins(2, 0, 0, 0); label->setIndent(9); #endif @@ -307,7 +307,7 @@ void QMessageBoxPrivate::updateSize() return; QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size(); -#if defined(Q_WS_QWS) || defined(Q_OS_WINCE) +#if defined(Q_OS_WINCE) // the width of the screen, less the window border. int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width()); #else @@ -318,8 +318,6 @@ void QMessageBoxPrivate::updateSize() #endif #ifdef Q_WS_MAC int softLimit = qMin(screenSize.width()/2, 420); -#elif defined(Q_WS_QWS) - int softLimit = qMin(hardLimit, 500); #else // note: ideally on windows, hard and soft limits but it breaks compat #ifndef Q_OS_WINCE diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index cd88a9b142..5e1efd2256 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -7329,7 +7329,7 @@ void QGraphicsItem::setInputMethodHints(Qt::InputMethodHints hints) */ void QGraphicsItem::updateMicroFocus() { -#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS)) +#if !defined(QT_NO_IM) && defined(Q_WS_X11) if (QWidget *fw = QApplication::focusWidget()) { if (scene()) { for (int i = 0 ; i < scene()->views().count() ; ++i) { diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h index 1e5705524e..bc9060a7d5 100644 --- a/src/widgets/kernel/qapplication_p.h +++ b/src/widgets/kernel/qapplication_p.h @@ -100,11 +100,6 @@ extern QSysInfo::WinVersion qt_winver; #elif defined (Q_OS_MAC) extern QSysInfo::MacVersion qt_macver; #endif -#if defined(Q_WS_QWS) -class QWSManager; -class QDirectPainter; -struct QWSServerCleaner { ~QWSServerCleaner(); }; -#endif typedef QHash FontHash; FontHash *qt_app_fonts_hash(); @@ -131,9 +126,6 @@ public: static bool x11_apply_settings(); #endif static void reset_instance_pointer(); -#elif defined(Q_WS_QWS) - static bool qws_apply_settings(); - static QWidget *findWidget(const QObjectList&, const QPoint &, bool rec); #endif #ifdef Q_OS_WINCE static int autoMaximizeThreshold; @@ -227,19 +219,6 @@ public: #if defined(Q_WS_X11) static void applyX11SpecificCommandLineArguments(QWidget *main_widget); -#elif defined(Q_WS_QWS) - static void applyQWSSpecificCommandLineArguments(QWidget *main_widget); -#endif - -#ifdef Q_WS_QWS - QPointer last_manager; - QWSServerCleaner qwsServerCleaner; -# ifndef QT_NO_DIRECTPAINTER - QHash *directPainters; -# endif - QRect maxWindowRect(const QScreen *screen) const { return maxWindowRects[screen]; } - void setMaxWindowRect(const QScreen *screen, int screenNo, const QRect &rect); - void setScreenTransformation(QScreen *screen, int screenNo, int transformation); #endif static QApplicationPrivate *instance() { return self; } @@ -316,10 +295,6 @@ public: QPixmap applyQIconStyleHelper(QIcon::Mode mode, const QPixmap& base) const; private: -#ifdef Q_WS_QWS - QHash maxWindowRects; -#endif - static QApplicationPrivate *self; static void giveFocusAccordingToFocusPolicy(QWidget *w, diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index 7f7d958e70..e135884cff 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -298,7 +298,7 @@ void QWhatsThat::paintEvent(QPaintEvent*) SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0); drawShadow = !shadow; } -#elif defined(Q_WS_MAC) || defined(Q_WS_QWS) +#elif defined(Q_WS_MAC) drawShadow = false; // never draw it on OS X or QWS, as we get it for free #endif diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 0110a3850b..af87612013 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -120,17 +120,6 @@ public: QRect crect; mutable QPalette pal; QFont fnt; -#if defined(Q_WS_QWS) -// QRegion req_region; // Requested region -// mutable QRegion paintable_region; // Paintable region -// mutable bool paintable_region_dirty;// needs to be recalculated -// mutable QRegion alloc_region; // Allocated region -// mutable bool alloc_region_dirty; // needs to be recalculated -// mutable int overlapping_children; // Handle overlapping children - - int alloc_region_index; -// int alloc_region_revision; -#endif QRect wrect; }; @@ -455,10 +444,6 @@ public: inline bool updatesEnabled() const; void setUpdatesEnabled(bool enable); -#if 0 //def Q_WS_QWS - void repaintUnclipped(const QRegion &, bool erase = true); -#endif - #ifndef QT_NO_GRAPHICSVIEW QGraphicsProxyWidget *graphicsProxyWidget() const; #endif diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 4859f5ce73..be216ecf9f 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -207,7 +207,7 @@ bool QDockWidgetLayout::nativeWindowDeco() const bool QDockWidgetLayout::nativeWindowDeco(bool floating) const { -#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_WINCE) +#if defined(Q_WS_X11) || defined(Q_OS_WINCE) Q_UNUSED(floating); return false; #else -- cgit v1.2.3