!24 tooltip概率不显示问题

Merge pull request !24 from hanpinlong/temp0609
This commit is contained in:
hanpinlong 2024-06-09 06:25:11 +00:00 committed by openkylin-cibot
parent 1d717560b1
commit 6f7d445a4d
3 changed files with 46 additions and 0 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
qtbase-opensource-src (5.15.10+dfsg-3ok2.6) nile; urgency=medium
* BUG号
* 需求号:无
* 其他更改tooltip概率不显示问题
-- hanpinlong <hanpinlong@kylinos.cn> Sun, 09 Jun 2024 14:19:32 +0800
qtbase-opensource-src (5.15.10+dfsg-3ok2.5) nile; urgency=medium
* BUG号

37
debian/patches/0046-24-tooltip.patch vendored Normal file
View File

@ -0,0 +1,37 @@
From: hanpinlong <hanpinlong@kylinos.cn>
Date: Sun, 9 Jun 2024 06:25:11 +0000
Subject: =?utf-8?b?ITI0IHRvb2x0aXDmpoLnjofkuI3mmL7npLrpl67popggTWVyZ2UgcHVs?=
=?utf-8?b?bCByZXF1ZXN0ICEyNCBmcm9tIGhhbnBpbmxvbmcvdGVtcDA2MDk=?=
---
src/widgets/kernel/qtooltip.cpp | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index 84054d4..add2a44 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -508,15 +508,14 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
else if (!QTipLabel::instance->fadingOut){
// If the tip has changed, reuse the one
// that is showing (removes flickering)
- // QPoint localPos = pos;
- // if (w)
- // localPos = w->mapFromGlobal(pos);
- // if (QTipLabel::instance->tipChanged(localPos, text, w)){
- // QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
- // QTipLabel::instance->setTipRect(w, rect);
- // QTipLabel::instance->placeTip(pos, w);
- // }
- QTipLabel::instance->hideTip();
+ QPoint localPos = pos;
+ if (w)
+ localPos = w->mapFromGlobal(pos);
+ if (QTipLabel::instance->tipChanged(localPos, text, w)){
+ QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
+ QTipLabel::instance->setTipRect(w, rect);
+ QTipLabel::instance->placeTip(pos, w);
+ }
return;
}
}

View File

@ -43,3 +43,4 @@ revert_startBlocking_removal.diff
0043-availablegeometry.patch
0044-Revert-3.patch
0045-rebuild.patch
0046-24-tooltip.patch