Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
b842ea4b
Commit
b842ea4b
authored
Oct 17, 2021
by
Waqar Ahmed
Browse files
Use Hide/Show to add/remove us as active client
Much better than working with focus.
parent
979fe01b
Pipeline
#89303
passed with stage
in 2 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
addons/compiler-explorer/ce_widget.cpp
View file @
b842ea4b
...
...
@@ -156,10 +156,12 @@ void CEWidget::setViewAsActiveXMLGuiClient()
bool
CEWidget
::
eventFilter
(
QObject
*
o
,
QEvent
*
e
)
{
if
(
o
==
m_textEditor
->
focusProxy
()
&&
e
->
type
()
==
QEvent
::
FocusIn
)
{
// We live in a stacked widget in kateviewspace
// use hide/show to figure out when we are not active
if
(
e
->
type
()
==
QEvent
::
Show
)
{
setViewAsActiveXMLGuiClient
();
return
QWidget
::
eventFilter
(
o
,
e
);
}
else
if
(
o
==
m_textEditor
->
focusProxy
()
&&
e
->
type
()
==
QEvent
::
FocusOut
)
{
}
else
if
(
e
->
type
()
==
QEvent
::
Hide
)
{
removeViewAsActiveXMLGuiClient
();
return
QWidget
::
eventFilter
(
o
,
e
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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