diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-06-12 08:44:53 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-06-29 02:23:52 +0000 |
commit | bf6f91e527e0fec49a8cd82eb4b9a55ff3db6d98 (patch) | |
tree | 06e54ef73b85fd34b52486fc4922fd6420091f82 | |
parent | 63cc734abb7b31a73c60767b9af521783c102bd4 (diff) |
Convert features.statustip to QT_CONFIG
Change-Id: Ic719ab93ed1802fcc713885ad0421cb44c7a998b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r-- | examples/widgets/widgets/tablet/tabletcanvas.cpp | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 6 | ||||
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreewidget.h | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qaction.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 8 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.h | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 2 | ||||
-rw-r--r-- | src/widgets/statemachine/qguistatemachine.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qmainwindow.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qmenubar.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbutton.cpp | 2 |
14 files changed, 25 insertions, 25 deletions
diff --git a/examples/widgets/widgets/tablet/tabletcanvas.cpp b/examples/widgets/widgets/tablet/tabletcanvas.cpp index 03e05e42f6..90b3222970 100644 --- a/examples/widgets/widgets/tablet/tabletcanvas.cpp +++ b/examples/widgets/widgets/tablet/tabletcanvas.cpp @@ -188,7 +188,7 @@ void TabletCanvas::paintPixmap(QPainter &painter, QTabletEvent *event) case QTabletEvent::FourDMouse: { const QString error(tr("This input device is not supported by the example.")); -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) QStatusTipEvent status(error); QApplication::sendEvent(this, &status); #else @@ -199,7 +199,7 @@ void TabletCanvas::paintPixmap(QPainter &painter, QTabletEvent *event) default: { const QString error(tr("Unknown tablet device - treating as stylus")); -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) QStatusTipEvent status(error); QApplication::sendEvent(this, &status); #else diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index e8db228256..c8fdf06d64 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -173,7 +173,7 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index if (index.isValid()) { emit q->entered(index); -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) QString statustip = model->data(index, Qt::StatusTipRole).toString(); if (parent && (shouldClearStatusTip || !statustip.isEmpty())) { QStatusTipEvent tip(statustip); @@ -182,7 +182,7 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index } #endif } else { -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) if (parent && shouldClearStatusTip) { QString emptyString; QStatusTipEvent tip( emptyString ); @@ -1703,7 +1703,7 @@ bool QAbstractItemView::viewportEvent(QEvent *event) break; case QEvent::Leave: d->setHoverIndex(QModelIndex()); // If we've left, no hover should be needed anymore - #ifndef QT_NO_STATUSTIP + #if QT_CONFIG(statustip) if (d->shouldClearStatusTip && d->parent) { QString empty; QStatusTipEvent tip(empty); diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index c31b00959d..6a6991ebb8 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -2664,7 +2664,7 @@ bool QHeaderView::viewportEvent(QEvent *e) } break; } #endif // QT_CONFIG(whatsthis) -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) case QEvent::StatusTip: { QHelpEvent *he = static_cast<QHelpEvent*>(e); int logical = logicalIndexAt(he->pos()); @@ -2675,7 +2675,7 @@ bool QHeaderView::viewportEvent(QEvent *e) setStatusTip(statustip); } return true; } -#endif // QT_NO_STATUSTIP +#endif // QT_CONFIG(statustip) case QEvent::FontChange: case QEvent::StyleChange: d->invalidateCachedSizeHint(); diff --git a/src/widgets/itemviews/qtreewidget.h b/src/widgets/itemviews/qtreewidget.h index d258f76621..3bdeae08d8 100644 --- a/src/widgets/itemviews/qtreewidget.h +++ b/src/widgets/itemviews/qtreewidget.h @@ -224,7 +224,7 @@ inline void QTreeWidgetItem::setText(int column, const QString &atext) inline void QTreeWidgetItem::setIcon(int column, const QIcon &aicon) { setData(column, Qt::DecorationRole, aicon); } -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) inline void QTreeWidgetItem::setStatusTip(int column, const QString &astatusTip) { setData(column, Qt::StatusTipRole, astatusTip); } #endif diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index 4582a55394..7dd2f72f03 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -91,7 +91,7 @@ QActionPrivate::~QActionPrivate() bool QActionPrivate::showStatusText(QWidget *widget, const QString &str) { -#ifdef QT_NO_STATUSTIP +#if !QT_CONFIG(statustip) Q_UNUSED(widget); Q_UNUSED(str); #else diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 9f90fe4d00..6536da4e90 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -3408,7 +3408,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) } break; #endif -#if !defined(QT_NO_STATUSTIP) || QT_CONFIG(whatsthis) +#if QT_CONFIG(statustip) || QT_CONFIG(whatsthis) case QEvent::StatusTip: case QEvent::WhatsThisClicked: { diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 3104f72e82..1265052281 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -8923,7 +8923,7 @@ bool QWidget::event(QEvent *event) break; case QEvent::Enter: -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) if (d->statusTip.size()) { QStatusTipEvent tip(d->statusTip); QApplication::sendEvent(const_cast<QWidget *>(this), &tip); @@ -8933,7 +8933,7 @@ bool QWidget::event(QEvent *event) break; case QEvent::Leave: -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) if (d->statusTip.size()) { QString empty; QStatusTipEvent tip(empty); @@ -11559,7 +11559,7 @@ int QWidget::toolTipDuration() const #endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) /*! \property QWidget::statusTip \brief the widget's status tip @@ -11579,7 +11579,7 @@ QString QWidget::statusTip() const Q_D(const QWidget); return d->statusTip; } -#endif // QT_NO_STATUSTIP +#endif // QT_CONFIG(statustip) #if QT_CONFIG(whatsthis) /*! diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 48bc120324..87a841c729 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -183,7 +183,7 @@ class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip) Q_PROPERTY(int toolTipDuration READ toolTipDuration WRITE setToolTipDuration) #endif -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) Q_PROPERTY(QString statusTip READ statusTip WRITE setStatusTip) #endif #if QT_CONFIG(whatsthis) @@ -386,7 +386,7 @@ public: void setToolTipDuration(int msec); int toolTipDuration() const; #endif -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) void setStatusTip(const QString &); QString statusTip() const; #endif diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index cc0940fc08..da3e9bd2f6 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -694,7 +694,7 @@ public: QString toolTip; int toolTipDuration; #endif -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) QString statusTip; #endif #if QT_CONFIG(whatsthis) diff --git a/src/widgets/statemachine/qguistatemachine.cpp b/src/widgets/statemachine/qguistatemachine.cpp index bbe723a55a..543011b754 100644 --- a/src/widgets/statemachine/qguistatemachine.cpp +++ b/src/widgets/statemachine/qguistatemachine.cpp @@ -223,10 +223,10 @@ static QEvent *cloneEvent(QEvent *e) return new QHelpEvent(*static_cast<QHelpEvent*>(e)); case QEvent::WhatsThis: return new QHelpEvent(*static_cast<QHelpEvent*>(e)); -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) case QEvent::StatusTip: return new QStatusTipEvent(*static_cast<QStatusTipEvent*>(e)); -#endif //QT_NO_STATUSTIP +#endif // QT_CONFIG(statustip) #ifndef QT_NO_ACTION case QEvent::ActionChanged: case QEvent::ActionAdded: diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index c9349ac72d..2cc7ce35da 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -1498,7 +1498,7 @@ bool QMainWindow::event(QEvent *event) } #endif -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) case QEvent::StatusTip: #ifndef QT_NO_STATUSBAR if (QStatusBar *sb = d->layout->statusBar()) @@ -1507,7 +1507,7 @@ bool QMainWindow::event(QEvent *event) #endif static_cast<QStatusTipEvent*>(event)->ignore(); return true; -#endif // QT_NO_STATUSTIP +#endif // QT_CONFIG(statustip) case QEvent::StyleChange: #ifndef QT_NO_DOCKWIDGET diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 0b874cb09a..167a10efc3 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -657,7 +657,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason } } } -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) } else if (previousAction) { previousAction->d_func()->showStatusText(topCausedWidget(), QString()); #endif diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index 8ec2a3ed94..552409a4ed 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -378,7 +378,7 @@ void QMenuBarPrivate::setCurrentAction(QAction *action, bool popup, bool activat q->update(actionRect(currentAction)); popupState = popup; -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) QAction *previousAction = currentAction; #endif currentAction = action; @@ -387,7 +387,7 @@ void QMenuBarPrivate::setCurrentAction(QAction *action, bool popup, bool activat if(popup) popupAction(action, activateFirst); q->update(actionRect(action)); -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) } else if (previousAction) { QString empty; QStatusTipEvent tip(empty); diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp index 1d06f57d7b..13595575e6 100644 --- a/src/widgets/widgets/qtoolbutton.cpp +++ b/src/widgets/widgets/qtoolbutton.cpp @@ -919,7 +919,7 @@ void QToolButton::setDefaultAction(QAction *action) #ifndef QT_NO_TOOLTIP setToolTip(action->toolTip()); #endif -#ifndef QT_NO_STATUSTIP +#if QT_CONFIG(statustip) setStatusTip(action->statusTip()); #endif #if QT_CONFIG(whatsthis) |