forked from qt-creator/qt-creator
Qt Designer integration: Fix Help button in stylesheet editor.
Wire QDesignerIntegration's help signal to help manager. Task-number: QTCREATORBUG-1505 Reviewed-by: kh <qtc-committer@nokia.com>
This commit is contained in:
@@ -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)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
|||||||
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:
|
|||||||
|
|
||||||
QWidget *containerWindow(QWidget *widget) const;
|
QWidget *containerWindow(QWidget *widget) const;
|
||||||
|
|
||||||
bool supportsToSlotNavigation() { return true; };
|
bool supportsToSlotNavigation() { return true; }
|
||||||
|
|
||||||
|
signals:
|
||||||
|
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 ¶meterNames);
|
void slotNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList ¶meterNames);
|
||||||
|
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:
|
|||||||
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:
|
|||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user