Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
d37771d7
Commit
d37771d7
authored
Mar 19, 2010
by
Tobias Hunger
Browse files
Fix QTCREATORBUG-1
Do some focus handling hacks on windows (only) Reviewed-by: jbache
parent
f014f3a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/locator/locatorwidget.cpp
View file @
d37771d7
...
...
@@ -102,6 +102,13 @@ public:
void
updatePreferredSize
();
QSize
preferredSize
()
const
{
return
m_preferredSize
;
}
#if defined(Q_OS_WIN)
void
focusOutEvent
(
QFocusEvent
*
event
)
{
if
(
event
->
reason
()
==
Qt
::
ActiveWindowFocusReason
)
hide
();
}
#endif
private:
QSize
m_preferredSize
;
};
...
...
@@ -249,7 +256,6 @@ void CompletionList::updatePreferredSize()
//header()->setStretchLastSection(true);
}
// =========== LocatorWidget ===========
LocatorWidget
::
LocatorWidget
(
LocatorPlugin
*
qop
)
:
...
...
@@ -344,7 +350,12 @@ bool LocatorWidget::eventFilter(QObject *obj, QEvent *event)
break
;
}
}
else
if
(
obj
==
m_fileLineEdit
&&
event
->
type
()
==
QEvent
::
FocusOut
)
{
m_completionList
->
hide
();
#if defined(Q_OS_WIN)
QFocusEvent
*
fev
=
static_cast
<
QFocusEvent
*>
(
event
);
if
(
fev
->
reason
()
!=
Qt
::
ActiveWindowFocusReason
||
(
fev
->
reason
()
==
Qt
::
ActiveWindowFocusReason
&&
!
m_completionList
->
isActiveWindow
()))
#endif
m_completionList
->
hide
();
}
else
if
(
obj
==
m_fileLineEdit
&&
event
->
type
()
==
QEvent
::
FocusIn
)
{
showPopup
();
}
else
if
(
obj
==
this
&&
event
->
type
()
==
QEvent
::
ShortcutOverride
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment