Commit 5123f48b authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Register as handler for qthelp://, remove obsolete started action slot.

parent 1144682d
...@@ -356,6 +356,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -356,6 +356,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
createRightPaneSideBar(); createRightPaneSideBar();
QDesktopServices::setUrlHandler("qthelp", this, "openHelpPage");
return true; return true;
} }
...@@ -523,7 +525,6 @@ void HelpPlugin::extensionsInitialized() ...@@ -523,7 +525,6 @@ void HelpPlugin::extensionsInitialized()
m_bookmarkManager->setupBookmarkModels(); m_bookmarkManager->setupBookmarkModels();
if (Core::Internal::WelcomeMode *welcomeMode = qobject_cast<Core::Internal::WelcomeMode*>(m_core->modeManager()->mode(Core::Constants::MODE_WELCOME))) { if (Core::Internal::WelcomeMode *welcomeMode = qobject_cast<Core::Internal::WelcomeMode*>(m_core->modeManager()->mode(Core::Constants::MODE_WELCOME))) {
connect(welcomeMode, SIGNAL(requestHelp()), this, SLOT(openGettingStarted()));
connect(welcomeMode, SIGNAL(openHelpPage(const QString&)), this, SLOT(openHelpPage(const QString&))); connect(welcomeMode, SIGNAL(openHelpPage(const QString&)), this, SLOT(openHelpPage(const QString&)));
} }
} }
...@@ -722,11 +723,9 @@ void HelpPlugin::addNewBookmark(const QString &title, const QString &url) ...@@ -722,11 +723,9 @@ void HelpPlugin::addNewBookmark(const QString &title, const QString &url)
m_bookmarkManager->showBookmarkDialog(m_centralWidget, title, url); m_bookmarkManager->showBookmarkDialog(m_centralWidget, title, url);
} }
void HelpPlugin::openGettingStarted() void HelpPlugin::openHelpPage(const QUrl& url)
{ {
openHelpPage( openHelpPage(url.toString());
QString("qthelp://com.nokia.qtcreator.%1%2/doc/index.html")
.arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR));
} }
void HelpPlugin::openHelpPage(const QString& url) void HelpPlugin::openHelpPage(const QString& url)
......
...@@ -128,7 +128,7 @@ private slots: ...@@ -128,7 +128,7 @@ private slots:
void slotHideRightPane(); void slotHideRightPane();
void copyFromSideBar(); void copyFromSideBar();
void openGettingStarted(); void openHelpPage(const QUrl& url);
void openHelpPage(const QString& url); void openHelpPage(const QString& url);
private: private:
......
Supports Markdown
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