Commit 5b945842 authored by Shubham  .'s avatar Shubham .
Browse files

Remove unneeded code

parent 6ebdc012
......@@ -20,7 +20,7 @@
#include "documentationpanelplugin.h"
DocumentationPanelPlugin::DocumentationPanelPlugin(QObject* parent, QList<QVariant> args) : Cantor::PanelPlugin(parent), m_widget(nullptr), m_showAtStart(true)
DocumentationPanelPlugin::DocumentationPanelPlugin(QObject* parent, QList<QVariant> args) : Cantor::PanelPlugin(parent), m_widget(nullptr)
{
Q_UNUSED(args);
}
......@@ -44,12 +44,7 @@ QWidget* DocumentationPanelPlugin::widget()
bool DocumentationPanelPlugin::showOnStartup()
{
return m_showAtStart;
}
void DocumentationPanelPlugin::setShowOnStartup(bool value)
{
m_showAtStart = value;
return true;
}
K_PLUGIN_FACTORY_WITH_JSON(variablemanagerplugin, "documentationpanelplugin.json", registerPlugin<DocumentationPanelPlugin>();)
......
......@@ -36,11 +36,9 @@ class DocumentationPanelPlugin : public Cantor::PanelPlugin
QWidget* widget() override;
bool showOnStartup() override;
void setShowOnStartup(bool);
private:
QPointer<DocumentationPanelWidget> m_widget;
bool m_showAtStart;
};
#endif /* _DOCUMENTATIONPANELPLUGIN_H */
......@@ -79,10 +79,11 @@ DocumentationPanelWidget::DocumentationPanelWidget(QWidget* parent) :QWidget(par
m_textBrowser = new QWebEngineView(this);
const QByteArray contents = m_engine->fileData(QUrl(QLatin1String("qthelp://org.kde.cantor/doc/maxima.html#SEC_Top"))); // set initial page contents
//const QByteArray contents = m_engine->fileData(QUrl(QLatin1String("qthelp://org.kde.cantor/doc/maxima_91.html#SEC433")));
m_textBrowser->setContent(contents, QLatin1String("text/html;charset=UTF-8"));
m_textBrowser->show();
//const QByteArray contents = m_engine->fileData(QUrl(QLatin1String("qthelp://org.kde.cantor/doc/figures/plotting1.png")));
//const QByteArray contents = m_engine->fileData(QUrl(QLatin1String("qthelp://org.kde.cantor/doc/maxima_91.html#SEC433")));
//m_textBrowser->setContent(contents, QLatin1String("image/png;charset=UTF-8"));
m_splitter = new QSplitter(Qt::Horizontal, this);
......@@ -142,10 +143,7 @@ void DocumentationPanelWidget::unloadDocumentation()
//1. Get the backend name
//2. Unload their documentation
//Call this function when the user changes the current backend
const QString backendName = QLatin1String("maxima");
const QString fileName = QStandardPaths::locate(QStandardPaths::AppDataLocation, QLatin1String("documentation/") + backendName + QLatin1String("/help.qch"));
m_engine->unregisterDocumentation(fileName);
m_engine->unregisterDocumentation(QLatin1String("org.kde.cantor"));
}
QIcon DocumentationPanelWidget::icon() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment