Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdevelop
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christoph Roick
kdevelop
Commits
0d6cbab6
Commit
0d6cbab6
authored
Sep 01, 2019
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '5.4'
parents
58838e02
0b4ad384
Pipeline
#7406
passed with stage
in 56 minutes and 53 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
0 deletions
+35
-0
kdevplatform/debugger/variable/variablecollection.cpp
kdevplatform/debugger/variable/variablecollection.cpp
+15
-0
kdevplatform/debugger/variable/variablecollection.h
kdevplatform/debugger/variable/variablecollection.h
+3
-0
plugins/contextbrowser/contextbrowser.cpp
plugins/contextbrowser/contextbrowser.cpp
+15
-0
plugins/contextbrowser/contextbrowser.h
plugins/contextbrowser/contextbrowser.h
+2
-0
No files found.
kdevplatform/debugger/variable/variablecollection.cpp
View file @
0d6cbab6
...
...
@@ -476,6 +476,10 @@ void VariableCollection::updateAutoUpdate(IDebugSession* session)
VariableCollection
::~
VariableCollection
()
{
for
(
auto
*
view
:
qAsConst
(
m_textHintProvidedViews
))
{
auto
*
iface
=
qobject_cast
<
KTextEditor
::
TextHintInterface
*>
(
view
);
iface
->
unregisterTextHintProvider
(
&
m_textHintProvider
);
}
}
void
VariableCollection
::
textDocumentCreated
(
IDocument
*
doc
)
...
...
@@ -499,7 +503,18 @@ void VariableCollection::viewCreated(KTextEditor::Document* doc,
if
(
!
iface
)
return
;
if
(
m_textHintProvidedViews
.
contains
(
view
))
{
return
;
}
connect
(
view
,
&
View
::
destroyed
,
this
,
&
VariableCollection
::
viewDestroyed
);
iface
->
registerTextHintProvider
(
&
m_textHintProvider
);
m_textHintProvidedViews
.
append
(
view
);
}
void
VariableCollection
::
viewDestroyed
(
QObject
*
obj
)
{
m_textHintProvidedViews
.
removeOne
(
static_cast
<
KTextEditor
::
View
*>
(
obj
));
}
Locals
*
VariableCollection
::
locals
(
const
QString
&
name
)
const
...
...
kdevplatform/debugger/variable/variablecollection.h
View file @
0d6cbab6
...
...
@@ -238,6 +238,7 @@ private Q_SLOTS:
void
textDocumentCreated
(
KDevelop
::
IDocument
*
);
void
viewCreated
(
KTextEditor
::
Document
*
,
KTextEditor
::
View
*
);
void
viewDestroyed
(
QObject
*
obj
);
private:
VariablesRoot
*
m_universe
;
...
...
@@ -246,6 +247,8 @@ private:
friend
class
VariableProvider
;
VariableProvider
m_textHintProvider
;
QVector
<
KTextEditor
::
View
*>
m_textHintProvidedViews
;
};
}
...
...
plugins/contextbrowser/contextbrowser.cpp
View file @
0d6cbab6
...
...
@@ -325,10 +325,20 @@ ContextBrowserPlugin::ContextBrowserPlugin(QObject* parent, const QVariantList&)
//Needed global action for the context-menu extensions
m_findUses
=
new
QAction
(
i18n
(
"Find Uses"
),
this
);
connect
(
m_findUses
,
&
QAction
::
triggered
,
this
,
&
ContextBrowserPlugin
::
findUses
);
const
auto
documents
=
core
()
->
documentController
()
->
openDocuments
();
for
(
KDevelop
::
IDocument
*
document
:
documents
)
{
textDocumentCreated
(
document
);
}
}
ContextBrowserPlugin
::~
ContextBrowserPlugin
()
{
for
(
auto
*
view
:
qAsConst
(
m_textHintProvidedViews
))
{
auto
*
iface
=
qobject_cast
<
KTextEditor
::
TextHintInterface
*>
(
view
);
iface
->
unregisterTextHintProvider
(
&
m_textHintProvider
);
}
///TODO: QObject inheritance should suffice?
delete
m_nextMenu
;
delete
m_previousMenu
;
...
...
@@ -976,6 +986,7 @@ void ContextBrowserPlugin::viewDestroyed(QObject* obj)
{
m_highlightedRanges
.
remove
(
static_cast
<
KTextEditor
::
View
*>
(
obj
));
m_updateViews
.
remove
(
static_cast
<
View
*>
(
obj
));
m_textHintProvidedViews
.
removeOne
(
static_cast
<
KTextEditor
::
View
*>
(
obj
));
}
void
ContextBrowserPlugin
::
selectionChanged
(
View
*
view
)
...
...
@@ -1024,8 +1035,12 @@ void ContextBrowserPlugin::viewCreated(KTextEditor::Document*, View* v)
if
(
!
iface
)
return
;
if
(
m_textHintProvidedViews
.
contains
(
v
))
{
return
;
}
iface
->
setTextHintDelay
(
highlightingTimeout
);
iface
->
registerTextHintProvider
(
&
m_textHintProvider
);
m_textHintProvidedViews
.
append
(
v
);
}
void
ContextBrowserPlugin
::
registerToolView
(
ContextBrowserView
*
view
)
...
...
plugins/contextbrowser/contextbrowser.h
View file @
0d6cbab6
...
...
@@ -228,6 +228,8 @@ private:
//Holds a list of all active context browser tool views
QList
<
ContextBrowserView
*>
m_views
;
QVector
<
KTextEditor
::
View
*>
m_textHintProvidedViews
;
//Used to override the next declaration that will be highlighted
KDevelop
::
IndexedDeclaration
m_useDeclaration
;
KDevelop
::
IndexedDeclaration
m_lastHighlightedDeclaration
;
...
...
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