Commit 3330d159 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Qt Designer integration: Fix Help button in stylesheet editor.

Wire QDesignerIntegration's help signal to help manager.

Task-number: QTCREATORBUG-1505
Reviewed-by: default avatarkh <>
parent 76020b61
...@@ -281,6 +281,15 @@ void FormEditorW::fullInit() ...@@ -281,6 +281,15 @@ void FormEditorW::fullInit()
initDesignerSubWindows(); initDesignerSubWindows();
m_integration = new QtCreatorIntegration(m_formeditor, this); m_integration = new QtCreatorIntegration(m_formeditor, this);
m_formeditor->setIntegration(m_integration); m_formeditor->setIntegration(m_integration);
// Connect Qt Designer help request to HelpManager.
// TODO: Use Core::HelpManager once it has been introduced.
foreach(QObject *object, ExtensionSystem::PluginManager::instance()->allObjects()) {
if (!qstrcmp(object->metaObject()->className(), "Help::HelpManager")) {
connect(m_integration, SIGNAL(creatorHelpRequested(QString)),
object, SLOT(handleHelpRequest(QString)));
/** /**
* This will initialize our TabOrder, Signals and slots and Buddy editors. * This will initialize our TabOrder, Signals and slots and Buddy editors.
...@@ -94,6 +94,14 @@ QtCreatorIntegration::QtCreatorIntegration(QDesignerFormEditorInterface *core, F ...@@ -94,6 +94,14 @@ QtCreatorIntegration::QtCreatorIntegration(QDesignerFormEditorInterface *core, F
setSlotNavigationEnabled(true); setSlotNavigationEnabled(true);
connect(this, SIGNAL(navigateToSlot(QString, QString, QStringList)), connect(this, SIGNAL(navigateToSlot(QString, QString, QStringList)),
this, SLOT(slotNavigateToSlot(QString, QString, QStringList))); this, SLOT(slotNavigateToSlot(QString, QString, QStringList)));
connect(this, SIGNAL(helpRequested(QString,QString)),
this, SLOT(slotDesignerHelpRequested(QString,QString)));
void QtCreatorIntegration::slotDesignerHelpRequested(const QString &manual, const QString &document)
// Pass on as URL.
emit creatorHelpRequested(QString::fromLatin1("qthelp://com.trolltech.%1/qdoc/%2").arg(manual, document));
} }
void QtCreatorIntegration::updateSelection() void QtCreatorIntegration::updateSelection()
...@@ -46,12 +46,18 @@ public: ...@@ -46,12 +46,18 @@ public:
QWidget *containerWindow(QWidget *widget) const; QWidget *containerWindow(QWidget *widget) const;
bool supportsToSlotNavigation() { return true; }; bool supportsToSlotNavigation() { return true; }
void creatorHelpRequested(const QString &url);
public slots: public slots:
void updateSelection(); void updateSelection();
private slots: private slots:
void slotNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList &parameterNames); void slotNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList &parameterNames);
void slotDesignerHelpRequested(const QString &manual, const QString &document);
private: private:
bool navigateToSlot(const QString &objectName, bool navigateToSlot(const QString &objectName,
const QString &signalSignature, const QString &signalSignature,
...@@ -57,8 +57,6 @@ public: ...@@ -57,8 +57,6 @@ public:
void setupGuiHelpEngine(); void setupGuiHelpEngine();
bool guiEngineNeedsUpdate() const; bool guiEngineNeedsUpdate() const;
void handleHelpRequest(const QString &url);
void verifyDocumenation(); void verifyDocumenation();
void registerDocumentation(const QStringList &fileNames); void registerDocumentation(const QStringList &fileNames);
void unregisterDocumentation(const QStringList &nameSpaces); void unregisterDocumentation(const QStringList &nameSpaces);
...@@ -69,6 +67,9 @@ public: ...@@ -69,6 +67,9 @@ public:
static BookmarkManager& bookmarkManager(); static BookmarkManager& bookmarkManager();
public slots:
void handleHelpRequest(const QString &url);
signals: signals:
void helpRequested(const QUrl &url); void helpRequested(const QUrl &url);
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