Convert features.statustip to QT_CONFIG
Change-Id: Ic719ab93ed1802fcc713885ad0421cb44c7a998b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
63cc734abb
commit
bf6f91e527
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue