improve hover detection performance
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Syping 2020-08-24 17:23:10 +02:00
parent 27075778c6
commit 3c124f9f27
1 changed files with 5 additions and 1 deletions

View File

@ -1862,13 +1862,17 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
void ProfileInterface::hoverProfileWidgetCheck()
{
ProfileWidget *pWidget = nullptr;
for (ProfileWidget *widget : widgets.keys())
QMap<ProfileWidget*, QString>::const_iterator it = widgets.constBegin();
QMap<ProfileWidget*, QString>::const_iterator end = widgets.constEnd();
while (it != end)
{
ProfileWidget *widget = it.key();
if (widget->underMouse())
{
pWidget = widget;
break;
}
it++;
}
if (pWidget != nullptr)
{