diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2015-02-02 18:49:18 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-02-03 11:49:14 +0000 |
commit | c5db8fc74a9d437a4e7c0af077aed7c1f1bd4e26 (patch) | |
tree | f7d42e0be35dd0ed85e74eaecdbbad4f319bc1d1 /src/widgets/kernel/qtooltip.cpp | |
parent | 611bcc3cd337fe77ea5d3b898d897582da6f7ee2 (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/kernel/qtooltip.cpp')
-rw-r--r-- | src/widgets/kernel/qtooltip.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp index bb095e2ee0..64f08dc0eb 100644 --- a/src/widgets/kernel/qtooltip.cpp +++ b/src/widgets/kernel/qtooltip.cpp @@ -30,7 +30,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifdef Q_WS_MAC +#ifdef Q_DEAD_CODE_FROM_QT4_MAC # include <private/qcore_mac_p.h> #endif @@ -51,7 +51,7 @@ #include <private/qstylesheetstyle_p.h> #ifndef QT_NO_TOOLTIP -#ifdef Q_WS_MAC +#ifdef Q_DEAD_CODE_FROM_QT4_MAC # include <private/qcore_mac_p.h> #include <private/qt_cocoa_helpers_mac_p.h> #endif @@ -279,7 +279,7 @@ void QTipLabel::timerEvent(QTimerEvent *e) || e->timerId() == expireTimer.timerId()){ hideTimer.stop(); expireTimer.stop(); -#if defined(Q_WS_MAC) && !defined(QT_NO_EFFECTS) +#if defined(Q_DEAD_CODE_FROM_QT4_MAC) && !defined(QT_NO_EFFECTS) if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)){ // Fade out tip on mac (makes it invisible). // The tip will not be deleted until a new tip is shown. @@ -299,7 +299,7 @@ void QTipLabel::timerEvent(QTimerEvent *e) bool QTipLabel::eventFilter(QObject *o, QEvent *e) { switch (e->type()) { -#ifdef Q_WS_MAC +#ifdef Q_DEAD_CODE_FROM_QT4_MAC case QEvent::KeyPress: case QEvent::KeyRelease: { int key = static_cast<QKeyEvent *>(e)->key(); @@ -380,7 +380,7 @@ void QTipLabel::placeTip(const QPoint &pos, QWidget *w) #endif //QT_NO_STYLE_STYLESHEET -#ifdef Q_WS_MAC +#ifdef Q_DEAD_CODE_FROM_QT4_MAC // When in full screen mode, there is no Dock nor Menu so we can use // the whole screen for displaying the tooltip. However when not in // full screen mode we need to save space for the dock, so we use @@ -397,7 +397,7 @@ void QTipLabel::placeTip(const QPoint &pos, QWidget *w) QPoint p = pos; p += QPoint(2, -#ifdef Q_WS_WIN +#ifdef Q_DEAD_CODE_FROM_QT4_WIN 21 #else 16 @@ -486,7 +486,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons } if (!text.isEmpty()){ // no tip can be reused, create new tip: -#ifndef Q_WS_WIN +#ifndef Q_DEAD_CODE_FROM_QT4_WIN new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself #else // On windows, we can't use the widget as parent otherwise the window will be @@ -498,7 +498,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons QTipLabel::instance->setObjectName(QLatin1String("qtooltip_label")); -#if !defined(QT_NO_EFFECTS) && !defined(Q_WS_MAC) +#if !defined(QT_NO_EFFECTS) && !defined(Q_DEAD_CODE_FROM_QT4_MAC) if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)) qFadeEffect(QTipLabel::instance); else if (QApplication::isEffectEnabled(Qt::UI_AnimateTooltip)) |