diff options
author | Daniel Molkentin <daniel.molkentin@nokia.com> | 2010-11-11 16:49:17 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@nokia.com> | 2011-06-29 00:31:47 +0200 |
commit | 497dd323ea550cfc9987b3ee049700986b5d8859 (patch) | |
tree | d602e654adec95d78d4f5e7ce237169641296eb5 /src/plugins/help | |
parent | b23aa108900e32b514e1939494c0d54fa9e75e32 (diff) | |
download | qt-creator-497dd323ea550cfc9987b3ee049700986b5d8859.tar.gz |
Introduce QML-based welcome screen using desktop components
Implements new XML-based format for examples, demos & tutorials
Done-with: Primrose Mbanefo <ext-primrose.mbanefo@nokia.com>
Change-Id: I42c0afdb419cffe5637cd4f298e828d09e0fb15a
Reviewed-on: http://codereview.qt.nokia.com/840
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/help')
-rw-r--r-- | src/plugins/help/helpplugin.cpp | 20 | ||||
-rw-r--r-- | src/plugins/help/helpplugin.h | 1 | ||||
-rw-r--r-- | src/plugins/help/helpviewer_qwv.cpp | 9 |
3 files changed, 25 insertions, 5 deletions
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 611ac2af59..5ae357652c 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -256,6 +256,19 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); #endif + action = new QAction(tr("Technical Support"), this); + cmd = am->registerAction(action, Core::Id("Help.TechSupport"), globalcontext); + am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + connect(action, SIGNAL(triggered()), this, SLOT(slotOpenSupportPage())); + +#ifndef Q_WS_MAC + action = new QAction(this); + action->setSeparator(true); + cmd = am->registerAction(action, Core::Id("Help.Separator2"), globalcontext); + am->actionContainer(M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + connect(action, SIGNAL(triggered()), this, SLOT(activateContext())); +#endif + action = new QAction(this); am->registerAction(action, Core::Constants::PRINT, modecontext); connect(action, SIGNAL(triggered()), m_centralWidget, SLOT(print())); @@ -1121,7 +1134,7 @@ void HelpPlugin::handleHelpRequest(const QUrl &url) if (address.startsWith(HelpViewer::NsNokia) || address.startsWith(HelpViewer::NsTrolltech)) { // local help not installed, resort to external web help - QString urlPrefix = QLatin1String("http://doc.trolltech.com/"); + QString urlPrefix = QLatin1String("http://doc.qt.nokia.com/"); if (url.authority() == QLatin1String("com.nokia.qtcreator")) { urlPrefix.append(QString::fromLatin1("qtcreator")); } else { @@ -1192,6 +1205,11 @@ void HelpPlugin::slotOpenActionUrl(QAction *action) #endif } +void HelpPlugin::slotOpenSupportPage() +{ + switchToHelpMode(QUrl("qthelp://com.nokia.qtcreator/doc/technical-support.html")); +} + void HelpPlugin::openFindToolBar() { if (Find::FindPlugin::instance()) diff --git a/src/plugins/help/helpplugin.h b/src/plugins/help/helpplugin.h index 6b6d2b401f..2700cd6ebf 100644 --- a/src/plugins/help/helpplugin.h +++ b/src/plugins/help/helpplugin.h @@ -115,6 +115,7 @@ private slots: void slotAboutToShowBackMenu(); void slotAboutToShowNextMenu(); void slotOpenActionUrl(QAction *action); + void slotOpenSupportPage(); void openFindToolBar(); diff --git a/src/plugins/help/helpviewer_qwv.cpp b/src/plugins/help/helpviewer_qwv.cpp index 450f9a2422..d74937472c 100644 --- a/src/plugins/help/helpviewer_qwv.cpp +++ b/src/plugins/help/helpviewer_qwv.cpp @@ -49,10 +49,11 @@ #include <QtHelp/QHelpEngine> -#include <QtNetwork/QNetworkAccessManager> #include <QtNetwork/QNetworkReply> #include <QtNetwork/QNetworkRequest> +#include <coreplugin/networkaccessmanager.h> + using namespace Find; using namespace Help; using namespace Help::Internal; @@ -106,7 +107,7 @@ qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen) // -- HelpNetworkAccessManager -class HelpNetworkAccessManager : public QNetworkAccessManager +class HelpNetworkAccessManager : public Core::NetworkAccessManager { public: HelpNetworkAccessManager(QObject *parent); @@ -117,7 +118,7 @@ protected: }; HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent) - : QNetworkAccessManager(parent) + : Core::NetworkAccessManager(parent) { } @@ -125,7 +126,7 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice* outgoingData) { if (!HelpViewer::isLocalUrl(request.url())) - return QNetworkAccessManager::createRequest(op, request, outgoingData); + return Core::NetworkAccessManager::createRequest(op, request, outgoingData); QString url = request.url().toString(); const QHelpEngineCore &engine = LocalHelpManager::helpEngine(); |