summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_p.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2016-10-13 15:54:23 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2016-10-14 08:19:29 +0000
commit6a35e77ef3f4eae80ca49937c680836eb4acdbe6 (patch)
tree12462105731748d75d1fa1b7b45daf586b402413 /src/widgets/kernel/qwidget_p.h
parentdcf7da7c93c0d974bfb72ffa677a1d26fb9be5e0 (diff)
Change confusing Q_DEAD_CODE_FROM_QT4_FOO define
Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r--src/widgets/kernel/qwidget_p.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index 3e57f9de41..2720c0dc31 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -189,7 +189,7 @@ struct QTLWExtra {
uint embedded : 1;
// *************************** Platform specific values (bit fields first) **********
-#if defined(Q_DEAD_CODE_FROM_QT4_X11) // <----------------------------------------------------------- X11
+#if 0 /* Used to be included in Qt4 for Q_WS_X11 */ // <----------------------------------------------------------- X11
uint spont_unmapped: 1; // window was spontaneously unmapped
uint dnd : 1; // DND properties installed
uint validWMState : 1; // is WM_STATE valid?
@@ -203,11 +203,11 @@ struct QTLWExtra {
qint32 newCounterValueHi;
quint32 newCounterValueLo;
#endif
-#elif defined(Q_DEAD_CODE_FROM_QT4_WIN) // <--------------------------------------------------------- WIN
+#elif 0 /* Used to be included in Qt4 for Q_WS_WIN */ // <--------------------------------------------------------- WIN
uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered.
HICON winIconBig; // internal big Windows icon
HICON winIconSmall; // internal small Windows icon
-#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <--------------------------------------------------------- MAC
+#elif 0 /* Used to be included in Qt4 for Q_WS_MAC */ // <--------------------------------------------------------- MAC
uint resizer : 4;
uint isSetGeometry : 1;
uint isMove : 1;
@@ -262,15 +262,15 @@ struct QWExtra {
uint hasWindowContainer : 1;
// *************************** Platform specific values (bit fields first) **********
-#if defined(Q_DEAD_CODE_FROM_QT4_WIN) // <----------------------------------------------------------- WIN
+#if 0 /* Used to be included in Qt4 for Q_WS_WIN */ // <----------------------------------------------------------- WIN
#ifndef QT_NO_DRAGANDDROP
QOleDropTarget *dropTarget; // drop target
QList<QPointer<QWidget> > oleDropWidgets;
#endif
-#elif defined(Q_DEAD_CODE_FROM_QT4_X11) // <--------------------------------------------------------- X11
+#elif 0 /* Used to be included in Qt4 for Q_WS_X11 */ // <--------------------------------------------------------- X11
uint compress_events : 1;
WId xDndProxy; // XDND forwarding to embedded windows
-#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <------------------------------------------------------ MAC
+#elif 0 /* Used to be included in Qt4 for Q_WS_MAC */ // <------------------------------------------------------ MAC
// Cocoa Mask stuff
QImage maskBits;
CGImageRef imageMask;
@@ -761,7 +761,7 @@ public:
#if defined(Q_OS_WIN)
uint noPaintOnScreen : 1; // see qwidget.cpp ::paintEngine()
#endif
-#if defined(Q_DEAD_CODE_FROM_QT4_X11) // <----------------------------------------------------------- X11
+#if 0 /* Used to be included in Qt4 for Q_WS_X11 */ // <----------------------------------------------------------- X11
Qt::HANDLE picture;
static QWidget *mouseGrabber;
static QWidget *keyboardGrabber;
@@ -773,7 +773,7 @@ public:
void updateX11AcceptFocus();
QPoint mapToGlobal(const QPoint &pos) const;
QPoint mapFromGlobal(const QPoint &pos) const;
-#elif defined(Q_DEAD_CODE_FROM_QT4_WIN) // <--------------------------------------------------------- WIN
+#elif 0 /* Used to be included in Qt4 for Q_WS_WIN */ // <--------------------------------------------------------- WIN
#ifndef QT_NO_GESTURES
uint nativeGesturePanEnabled : 1;
#endif
@@ -789,7 +789,7 @@ public:
void winSetupGestures();
#elif defined(Q_OS_MAC) // <--------------------------------------------------------- MAC
void macUpdateSizeAttribute();
-#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <--------------------------------------------------------- MAC (old stuff)
+#elif 0 /* Used to be included in Qt4 for Q_WS_MAC */ // <--------------------------------------------------------- MAC (old stuff)
// This is new stuff
uint needWindowChange : 1;