Fix escape logic for closing find tool bar in mode with editor view

E.g. open context help, press ctrl+f to search in help, press escape
(focus moves to help viewer), press escape: find tool bar should be
hidden, instead it was moving focus to the editor.

Change-Id: Ia5d8563458582e2871afd9e3107e49e71d03b3f5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2014-06-06 16:59:11 +02:00
parent 23d3ada73f
commit a16bab0e9d
3 changed files with 24 additions and 8 deletions

View File

@@ -63,6 +63,20 @@ QWidget *FindToolBarPlaceHolder::owner() const
return m_owner;
}
/*!
* Returns if \a widget is a subwidget of the place holder's owner
*/
bool FindToolBarPlaceHolder::isUsedByWidget(QWidget *widget)
{
QWidget *current = widget;
while (current) {
if (current == m_owner)
return true;
current = current->parentWidget();
}
return false;
}
void FindToolBarPlaceHolder::setWidget(QWidget *widget)
{
if (m_subWidget) {