Windows: Don't raise inactive windows when showing a tooltip
The Qt4 Q_WS_WIN ifdef never got ported. Change-Id: Iad1ca1a3e20bd5254895781eee09897520b7d7d1 Task-Id: QTBUG-39147 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
94cf203f36
commit
29f6b50732
@ -493,12 +493,12 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!text.isEmpty()){ // no tip can be reused, create new tip:
|
if (!text.isEmpty()){ // no tip can be reused, create new tip:
|
||||||
#if 1 // Used to be excluded in Qt4 for Q_WS_WIN
|
#ifdef Q_OS_WIN32
|
||||||
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
|
// On windows, we can't use the widget as parent otherwise the window will be
|
||||||
// raised when the tooltip will be shown
|
// raised when the tooltip will be shown
|
||||||
new QTipLabel(text, QApplication::desktop()->screen(QTipLabel::getTipScreen(pos, w)), msecDisplayTime);
|
new QTipLabel(text, QApplication::desktop()->screen(QTipLabel::getTipScreen(pos, w)), msecDisplayTime);
|
||||||
|
#else
|
||||||
|
new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself
|
||||||
#endif
|
#endif
|
||||||
QTipLabel::instance->setTipRect(w, rect);
|
QTipLabel::instance->setTipRect(w, rect);
|
||||||
QTipLabel::instance->placeTip(pos, w);
|
QTipLabel::instance->placeTip(pos, w);
|
||||||
|
@ -5716,6 +5716,8 @@ void tst_QWidget::setToolTip()
|
|||||||
QTest::qWait(2200); // delay is 2000
|
QTest::qWait(2200); // delay is 2000
|
||||||
QTest::mouseMove(popupWindow);
|
QTest::mouseMove(popupWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTRY_COMPARE(QApplication::topLevelWidgets().size(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QWidget::testWindowIconChangeEventPropagation()
|
void tst_QWidget::testWindowIconChangeEventPropagation()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user