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
Tobias Hunger
qt-creator
Commits
c37f4d05
Commit
c37f4d05
authored
Dec 04, 2008
by
Patrick Star
Browse files
Fixes: - missing F1 in tooltip on first IDE start
parent
908ee0e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cpphoverhandler.cpp
View file @
c37f4d05
...
...
@@ -60,7 +60,7 @@
using
namespace
CppTools
::
Internal
;
CppHoverHandler
::
CppHoverHandler
(
CppModelManager
*
manager
,
QObject
*
parent
)
:
QObject
(
parent
),
m_manager
(
manager
)
:
QObject
(
parent
),
m_manager
(
manager
)
,
m_helpEngineNeedsSetup
(
false
)
{
QFileInfo
fi
(
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
Core
::
ICore
>
()
->
settings
()
->
fileName
());
m_helpEngine
=
new
QHelpEngineCore
(
fi
.
absolutePath
()
...
...
@@ -68,6 +68,7 @@ CppHoverHandler::CppHoverHandler(CppModelManager *manager, QObject *parent)
//m_helpEngine->setAutoSaveFilter(false);
m_helpEngine
->
setupData
();
m_helpEngine
->
setCurrentFilter
(
tr
(
"Unfiltered"
));
m_helpEngineNeedsSetup
=
m_helpEngine
->
registeredDocumentations
().
count
()
==
0
;
}
void
CppHoverHandler
::
updateContextHelpId
(
TextEditor
::
ITextEditor
*
editor
,
int
pos
)
...
...
@@ -234,6 +235,12 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
}
}
if
(
m_helpEngineNeedsSetup
&&
m_helpEngine
->
registeredDocumentations
().
count
()
>
0
)
{
m_helpEngine
->
setupData
();
m_helpEngineNeedsSetup
=
false
;
}
if
(
!
m_helpId
.
isEmpty
()
&&
!
m_helpEngine
->
linksForIdentifier
(
m_helpId
).
isEmpty
())
{
m_toolTip
=
QString
(
QLatin1String
(
"<table><tr><td valign=middle><nobr>%1</td>"
"<td><img src=
\"
:/cpptools/images/f1.svg
\"
></td></tr></table>"
)).
arg
(
Qt
::
escape
(
m_toolTip
));
...
...
src/plugins/cpptools/cpphoverhandler.h
View file @
c37f4d05
...
...
@@ -68,6 +68,7 @@ private:
QHelpEngineCore
*
m_helpEngine
;
QString
m_helpId
;
QString
m_toolTip
;
bool
m_helpEngineNeedsSetup
;
};
}
// namespace Internal
...
...
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