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
Education
Cantor
Commits
536f7b33
Commit
536f7b33
authored
Jul 16, 2020
by
Shubham .
Browse files
Remove unnecessary code
parent
115966e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/panelplugins/documentationpanel/documentationpanelplugin.cpp
View file @
536f7b33
...
...
@@ -35,6 +35,9 @@ DocumentationPanelPlugin::~DocumentationPanelPlugin()
void
DocumentationPanelPlugin
::
onSessionChanged
()
{
m_backendName
=
session
()
->
backend
()
->
name
();
m_backendIcon
=
session
()
->
backend
()
->
icon
();
if
(
m_widget
)
{
m_widget
->
setBackend
(
m_backendName
);
...
...
@@ -44,9 +47,6 @@ void DocumentationPanelPlugin::onSessionChanged()
QWidget
*
DocumentationPanelPlugin
::
widget
()
{
m_backendName
=
session
()
->
backend
()
->
name
();
m_backendIcon
=
session
()
->
backend
()
->
icon
();
if
(
!
m_widget
)
{
m_widget
=
new
DocumentationPanelWidget
(
m_backendName
,
m_backendIcon
,
parentWidget
());
...
...
src/panelplugins/documentationpanel/documentationpanelwidget.cpp
View file @
536f7b33
...
...
@@ -380,8 +380,7 @@ void DocumentationPanelWidget::downloadResource(QWebEngineDownloadItem* resource
void
DocumentationPanelWidget
::
loadDocumentation
()
{
const
QString
&
backend
=
backendName
();
const
QString
&
fileName
=
QStandardPaths
::
locate
(
QStandardPaths
::
AppDataLocation
,
QLatin1String
(
"documentation/"
)
+
backend
+
QLatin1String
(
"/help.qch"
));
const
QString
&
fileName
=
QStandardPaths
::
locate
(
QStandardPaths
::
AppDataLocation
,
QLatin1String
(
"documentation/"
)
+
m_backend
+
QLatin1String
(
"/help.qch"
));
const
QString
&
nameSpace
=
QHelpEngineCore
::
namespaceName
(
fileName
);
if
(
nameSpace
.
isEmpty
()
||
!
m_engine
->
registeredDocumentations
().
contains
(
nameSpace
))
...
...
@@ -390,8 +389,3 @@ void DocumentationPanelWidget::loadDocumentation()
qWarning
()
<<
m_engine
->
error
();
}
}
QString
DocumentationPanelWidget
::
backendName
()
const
{
return
m_backend
;
}
src/panelplugins/documentationpanel/documentationpanelwidget.h
View file @
536f7b33
...
...
@@ -45,12 +45,8 @@ class DocumentationPanelWidget : public QWidget
~
DocumentationPanelWidget
();
void
setBackend
(
const
QString
&
);
void
setBackendIcon
(
const
QString
&
);
/** @return name of the current backend **/
QString
backendName
()
const
;
void
loadDocumentation
();
Q_SIGNALS:
...
...
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