QmlDebug: Enable 'What are the prerequisites?' link in run configuration

DebuggerLanguageChooser is in utils, which is why we cannot directly open
the URL in the help plugin.
This commit is contained in:
Kai Koehne
2011-02-24 14:58:37 +01:00
parent 3930450efb
commit 5d615f7fbf
7 changed files with 21 additions and 2 deletions

View File

@@ -58,7 +58,9 @@ DebuggerLanguageChooser::DebuggerLanguageChooser(QWidget *parent) :
m_debugServerPortLabel->setBuddy(m_debugServerPort);
m_qmlDebuggerInfoLabel = new QLabel(tr("<a href=\"qthelp://com.nokia.qtcreator/doc/creator-qml-debugging.html\">What are the prerequisites?</a>"));
m_qmlDebuggerInfoLabel = new QLabel(tr("<a href=\"qthelp://com.nokia.qtcreator/doc/creator-debugging-qml.html\">What are the prerequisites?</a>"));
connect(m_qmlDebuggerInfoLabel, SIGNAL(linkActivated(QString)),
this, SIGNAL(openHelpUrl(QString)));
connect(m_useQmlDebugger, SIGNAL(toggled(bool)), m_debugServerPort, SLOT(setEnabled(bool)));
connect(m_useQmlDebugger, SIGNAL(toggled(bool)), m_debugServerPortLabel, SLOT(setEnabled(bool)));
@@ -131,4 +133,5 @@ void DebuggerLanguageChooser::onDebugServerPortChanged(int port)
emit qmlDebugServerPortChanged((uint)port);
}
} // namespace Utils

View File

@@ -62,6 +62,7 @@ signals:
void cppLanguageToggled(bool value);
void qmlLanguageToggled(bool value);
void qmlDebugServerPortChanged(uint port);
void openHelpUrl(const QString &url);
private slots:
void useCppDebuggerToggled(bool toggled);

View File

@@ -39,6 +39,7 @@
#include "cmaketarget.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/helpmanager.h>
#include <projectexplorer/debugginghelper.h>
#include <utils/qtcassert.h>
#include <utils/debuggerlanguagechooser.h>
@@ -412,6 +413,8 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
this, SLOT(useQmlDebuggerToggled(bool)));
connect(m_debuggerLanguageChooser, SIGNAL(qmlDebugServerPortChanged(uint)),
this, SLOT(qmlDebugServerPortChanged(uint)));
connect(m_debuggerLanguageChooser, SIGNAL(openHelpUrl(QString)),
Core::HelpManager::instance(), SLOT(handleHelpRequest(QString)));
connect(m_environmentWidget, SIGNAL(userChangesChanged()),
this, SLOT(userChangesChanged()));

View File

@@ -71,7 +71,6 @@ public:
QUrl findFile(const QUrl &url) const;
QByteArray fileData(const QUrl &url) const;
void handleHelpRequest(const QString &url);
QStringList registeredNamespaces() const;
QString namespaceFromFile(const QString &file) const;
@@ -87,6 +86,9 @@ public:
void removeUserDefinedFilter(const QString &filter);
void addUserDefinedFilter(const QString &filter, const QStringList &attr);
public slots:
void handleHelpRequest(const QString &url);
signals:
void setupFinished();
void documentationChanged();

View File

@@ -37,6 +37,7 @@
#include "project.h"
#include "environmentwidget.h"
#include <coreplugin/helpmanager.h>
#include <utils/detailswidget.h>
#include <utils/environment.h>
#include <utils/pathchooser.h>
@@ -49,6 +50,7 @@
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
namespace ProjectExplorer {
namespace Internal {
@@ -166,6 +168,8 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
this, SLOT(useQmlDebuggerToggled(bool)));
connect(m_debuggerLanguageChooser, SIGNAL(qmlDebugServerPortChanged(uint)),
this, SLOT(qmlDebugServerPortChanged(uint)));
connect(m_debuggerLanguageChooser, SIGNAL(openHelpUrl(QString)),
Core::HelpManager::instance(), SLOT(handleHelpRequest(QString)));
connect(m_runConfiguration, SIGNAL(changed()), this, SLOT(changed()));

View File

@@ -36,6 +36,7 @@
#include "qmlprojecttarget.h"
#include "qmlproject.h"
#include <coreplugin/helpmanager.h>
#include <coreplugin/icore.h>
#include <projectexplorer/environmentwidget.h>
#include <projectexplorer/projectexplorer.h>
@@ -139,6 +140,8 @@ QmlProjectRunConfigurationWidget::QmlProjectRunConfigurationWidget(QmlProjectRun
this, SLOT(useQmlDebuggerToggled(bool)));
connect(debuggerLanguageChooser, SIGNAL(qmlDebugServerPortChanged(uint)),
this, SLOT(qmlDebugServerPortChanged(uint)));
connect(debuggerLanguageChooser, SIGNAL(openHelpUrl(QString)),
Core::HelpManager::instance(), SLOT(handleHelpRequest(QString)));
QtVersionManager *qtVersions = QtVersionManager::instance();
connect(qtVersions, SIGNAL(qtVersionsChanged(QList<int>)),

View File

@@ -49,6 +49,7 @@
#include <coreplugin/messagemanager.h>
#include <coreplugin/variablemanager.h>
#include <coreplugin/ifile.h>
#include <coreplugin/helpmanager.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/environmentwidget.h>
#include <projectexplorer/persistentsettings.h>
@@ -307,6 +308,8 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
this, SLOT(useQmlDebuggerToggled(bool)));
connect(m_debuggerLanguageChooser, SIGNAL(qmlDebugServerPortChanged(uint)),
this, SLOT(qmlDebugServerPortChanged(uint)));
connect(m_debuggerLanguageChooser, SIGNAL(openHelpUrl(QString)),
Core::HelpManager::instance(), SLOT(handleHelpRequest(QString)));
connect(m_environmentWidget, SIGNAL(userChangesChanged()),
this, SLOT(userChangesEdited()));