summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qsizegrip.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2015-02-02 18:49:18 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-02-03 11:49:14 +0000
commitc5db8fc74a9d437a4e7c0af077aed7c1f1bd4e26 (patch)
treef7d42e0be35dd0ed85e74eaecdbbad4f319bc1d1 /src/widgets/widgets/qsizegrip.cpp
parent611bcc3cd337fe77ea5d3b898d897582da6f7ee2 (diff)
Make it more obvious that Q_WS_ is dead code, and should perhaps be ported
We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qsizegrip.cpp')
-rw-r--r--src/widgets/widgets/qsizegrip.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp
index 184aa37806..ee6a4e3815 100644
--- a/src/widgets/widgets/qsizegrip.cpp
+++ b/src/widgets/widgets/qsizegrip.cpp
@@ -46,7 +46,7 @@
#include "qdebug.h"
#include <QDesktopWidget>
-#ifdef Q_WS_MAC
+#ifdef Q_DEAD_CODE_FROM_QT4_MAC
#include <private/qt_mac_p.h>
#endif
@@ -76,7 +76,7 @@ public:
Qt::Corner m_corner;
bool gotMousePress;
QPointer<QWidget> tlw;
-#ifdef Q_WS_MAC
+#ifdef Q_DEAD_CODE_FROM_QT4_MAC
void updateMacSizer(bool hide) const;
#endif
Qt::Corner corner() const;
@@ -114,7 +114,7 @@ public:
updateTopLevelWidget();
if (tlw && showSizeGrip) {
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
-#ifndef Q_WS_MAC
+#ifndef Q_DEAD_CODE_FROM_QT4_MAC
sizeGripNotVisibleState |= Qt::WindowMaximized;
#endif
// Don't show the size grip if the tlw is maximized or in full screen mode.
@@ -136,7 +136,7 @@ QSizeGripPrivate::QSizeGripPrivate()
{
}
-#ifdef Q_WS_MAC
+#ifdef Q_DEAD_CODE_FROM_QT4_MAC
void QSizeGripPrivate::updateMacSizer(bool hide) const
{
Q_Q(const QSizeGrip);
@@ -219,7 +219,7 @@ void QSizeGripPrivate::init()
Q_Q(QSizeGrip);
m_corner = q->isLeftToRight() ? Qt::BottomRightCorner : Qt::BottomLeftCorner;
-#if !defined(QT_NO_CURSOR) && !defined(Q_WS_MAC)
+#if !defined(QT_NO_CURSOR) && !defined(Q_DEAD_CODE_FROM_QT4_MAC)
q->setCursor(m_corner == Qt::TopLeftCorner || m_corner == Qt::BottomRightCorner
? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
#endif
@@ -432,7 +432,7 @@ void QSizeGrip::moveEvent(QMoveEvent * /*moveEvent*/)
return;
d->m_corner = d->corner();
-#if !defined(QT_NO_CURSOR) && !defined(Q_WS_MAC)
+#if !defined(QT_NO_CURSOR) && !defined(Q_DEAD_CODE_FROM_QT4_MAC)
setCursor(d->m_corner == Qt::TopLeftCorner || d->m_corner == Qt::BottomRightCorner
? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
#endif
@@ -443,7 +443,7 @@ void QSizeGrip::moveEvent(QMoveEvent * /*moveEvent*/)
*/
void QSizeGrip::showEvent(QShowEvent *showEvent)
{
-#ifdef Q_WS_MAC
+#ifdef Q_DEAD_CODE_FROM_QT4_MAC
d_func()->updateMacSizer(false);
#endif
QWidget::showEvent(showEvent);
@@ -454,7 +454,7 @@ void QSizeGrip::showEvent(QShowEvent *showEvent)
*/
void QSizeGrip::hideEvent(QHideEvent *hideEvent)
{
-#ifdef Q_WS_MAC
+#ifdef Q_DEAD_CODE_FROM_QT4_MAC
d_func()->updateMacSizer(true);
#endif
QWidget::hideEvent(hideEvent);
@@ -478,7 +478,7 @@ bool QSizeGrip::eventFilter(QObject *o, QEvent *e)
return QWidget::eventFilter(o, e);
}
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
-#ifndef Q_WS_MAC
+#ifndef Q_DEAD_CODE_FROM_QT4_MAC
sizeGripNotVisibleState |= Qt::WindowMaximized;
#endif
// Don't show the size grip if the tlw is maximized or in full screen mode.