Help: Rename handleHelpRequest to showHelpUrl

Since that is what it does.

Change-Id: I13ffe21cdb625a0df1313f2ff09bf84196f08768
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Eike Ziller
2019-01-24 10:42:24 +01:00
parent bbe0cd68fa
commit 0345bcb7cc
12 changed files with 17 additions and 17 deletions

View File

@@ -96,15 +96,15 @@ QByteArray fileData(const QUrl &url)
return checkInstance() ? m_instance->fileData(url) : QByteArray(); return checkInstance() ? m_instance->fileData(url) : QByteArray();
} }
void handleHelpRequest(const QUrl &url, HelpManager::HelpViewerLocation location) void showHelpUrl(const QUrl &url, HelpManager::HelpViewerLocation location)
{ {
if (checkInstance()) if (checkInstance())
m_instance->handleHelpRequest(url, location); m_instance->showHelpUrl(url, location);
} }
void handleHelpRequest(const QString &url, HelpViewerLocation location) void showHelpUrl(const QString &url, HelpViewerLocation location)
{ {
handleHelpRequest(QUrl(url), location); showHelpUrl(QUrl(url), location);
} }
} // HelpManager } // HelpManager

View File

@@ -66,8 +66,8 @@ CORE_EXPORT void unregisterDocumentation(const QStringList &nameSpaces);
CORE_EXPORT QMap<QString, QUrl> linksForIdentifier(const QString &id); CORE_EXPORT QMap<QString, QUrl> linksForIdentifier(const QString &id);
CORE_EXPORT QByteArray fileData(const QUrl &url); CORE_EXPORT QByteArray fileData(const QUrl &url);
CORE_EXPORT void handleHelpRequest(const QUrl &url, HelpViewerLocation location = HelpModeAlways); CORE_EXPORT void showHelpUrl(const QUrl &url, HelpViewerLocation location = HelpModeAlways);
CORE_EXPORT void handleHelpRequest(const QString &url, HelpViewerLocation location = HelpModeAlways); CORE_EXPORT void showHelpUrl(const QString &url, HelpViewerLocation location = HelpModeAlways);
} // HelpManager } // HelpManager
} // Core } // Core

View File

@@ -42,7 +42,7 @@ public:
virtual void unregisterDocumentation(const QStringList &nameSpaces) = 0; virtual void unregisterDocumentation(const QStringList &nameSpaces) = 0;
virtual QMap<QString, QUrl> linksForIdentifier(const QString &id) = 0; virtual QMap<QString, QUrl> linksForIdentifier(const QString &id) = 0;
virtual QByteArray fileData(const QUrl &url) = 0; virtual QByteArray fileData(const QUrl &url) = 0;
virtual void handleHelpRequest(const QUrl &url, HelpViewerLocation location = HelpModeAlways) = 0; virtual void showHelpUrl(const QUrl &url, HelpViewerLocation location = HelpModeAlways) = 0;
}; };
} // HelpManager } // HelpManager

View File

@@ -114,7 +114,7 @@ DebuggerRunConfigWidget::DebuggerRunConfigWidget(DebuggerRunConfigurationAspect
m_useMultiProcess->setVisible(env.toInt()); m_useMultiProcess->setVisible(env.toInt());
connect(m_qmlDebuggerInfoLabel, &QLabel::linkActivated, connect(m_qmlDebuggerInfoLabel, &QLabel::linkActivated,
[](const QString &link) { Core::HelpManager::handleHelpRequest(link); }); [](const QString &link) { Core::HelpManager::showHelpUrl(link); });
connect(m_useQmlDebugger, &QAbstractButton::toggled, connect(m_useQmlDebugger, &QAbstractButton::toggled,
this, &DebuggerRunConfigWidget::useQmlDebuggerToggled); this, &DebuggerRunConfigWidget::useQmlDebuggerToggled);
connect(m_useQmlDebugger, &QAbstractButton::clicked, connect(m_useQmlDebugger, &QAbstractButton::clicked,

View File

@@ -460,7 +460,7 @@ void QmlEngine::errorMessageBoxFinished(int result)
break; break;
} }
case QMessageBox::Help: { case QMessageBox::Help: {
HelpManager::handleHelpRequest("qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html"); HelpManager::showHelpUrl("qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html");
Q_FALLTHROUGH(); Q_FALLTHROUGH();
} }
default: default:

View File

@@ -1630,7 +1630,7 @@ void WatchModel::inputNewExpression()
connect(buttons, &QDialogButtonBox::accepted, &dlg, &QDialog::accept); connect(buttons, &QDialogButtonBox::accepted, &dlg, &QDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, &dlg, &QDialog::reject); connect(buttons, &QDialogButtonBox::rejected, &dlg, &QDialog::reject);
connect(hint, &QLabel::linkActivated, [](const QString &link) { connect(hint, &QLabel::linkActivated, [](const QString &link) {
HelpManager::handleHelpRequest(link); }); HelpManager::showHelpUrl(link); });
if (dlg.exec() == QDialog::Accepted) if (dlg.exec() == QDialog::Accepted)
m_handler->watchExpression(lineEdit->text().trimmed()); m_handler->watchExpression(lineEdit->text().trimmed());

View File

@@ -366,7 +366,7 @@ void FormEditorData::fullInit()
// Connect Qt Designer help request to HelpManager. // Connect Qt Designer help request to HelpManager.
QObject::connect(m_integration, &QtCreatorIntegration::creatorHelpRequested, QObject::connect(m_integration, &QtCreatorIntegration::creatorHelpRequested,
HelpManager::Signals::instance(), HelpManager::Signals::instance(),
[](const QUrl &url) { HelpManager::handleHelpRequest(url, HelpManager::HelpModeAlways); }); [](const QUrl &url) { HelpManager::showHelpUrl(url, HelpManager::HelpModeAlways); });
/** /**
* This will initialize our TabOrder, Signals and slots and Buddy editors. * This will initialize our TabOrder, Signals and slots and Buddy editors.

View File

@@ -247,7 +247,7 @@ QByteArray HelpManager::fileData(const QUrl &url)
return d->m_helpEngine->fileData(url); return d->m_helpEngine->fileData(url);
} }
void HelpManager::handleHelpRequest(const QUrl &url, Core::HelpManager::HelpViewerLocation location) void HelpManager::showHelpUrl(const QUrl &url, Core::HelpManager::HelpViewerLocation location)
{ {
emit m_instance->helpRequested(url, location); emit m_instance->helpRequested(url, location);
} }

View File

@@ -76,7 +76,7 @@ public:
static void aboutToShutdown(); static void aboutToShutdown();
Q_INVOKABLE void handleHelpRequest( Q_INVOKABLE void showHelpUrl(
const QUrl &url, const QUrl &url,
Core::HelpManager::HelpViewerLocation location = Core::HelpManager::HelpModeAlways) override; Core::HelpManager::HelpViewerLocation location = Core::HelpManager::HelpModeAlways) override;

View File

@@ -328,7 +328,7 @@ void IosDeviceManager::deviceInfo(IosToolHandler *, const QString &uid,
int ret = mBox.exec(); int ret = mBox.exec();
switch (ret) { switch (ret) {
case QMessageBox::Yes: case QMessageBox::Yes:
Core::HelpManager::handleHelpRequest( Core::HelpManager::showHelpUrl(
QLatin1String("qthelp://org.qt-project.qtcreator/doc/creator-developing-ios.html")); QLatin1String("qthelp://org.qt-project.qtcreator/doc/creator-developing-ios.html"));
break; break;
case QMessageBox::No: case QMessageBox::No:

View File

@@ -368,7 +368,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
d->m_profilerConnections->retryConnect(); d->m_profilerConnections->retryConnect();
break; break;
case QMessageBox::Help: case QMessageBox::Help:
HelpManager::handleHelpRequest( HelpManager::showHelpUrl(
"qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html"); "qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html");
Q_FALLTHROUGH(); Q_FALLTHROUGH();
case QMessageBox::Cancel: case QMessageBox::Cancel:

View File

@@ -219,7 +219,7 @@ void ExamplesWelcomePage::openProject(const ExampleItem &item)
ModeManager::activateMode(Core::Constants::MODE_EDIT); ModeManager::activateMode(Core::Constants::MODE_EDIT);
QUrl docUrl = QUrl::fromUserInput(item.docUrl); QUrl docUrl = QUrl::fromUserInput(item.docUrl);
if (docUrl.isValid()) if (docUrl.isValid())
HelpManager::handleHelpRequest(docUrl, HelpManager::ExternalHelpAlways); HelpManager::showHelpUrl(docUrl, HelpManager::ExternalHelpAlways);
ModeManager::activateMode(ProjectExplorer::Constants::MODE_SESSION); ModeManager::activateMode(ProjectExplorer::Constants::MODE_SESSION);
} else { } else {
ProjectExplorerPlugin::showOpenProjectError(result); ProjectExplorerPlugin::showOpenProjectError(result);
@@ -588,7 +588,7 @@ public:
else if (item.hasSourceCode) else if (item.hasSourceCode)
ExamplesWelcomePage::openProject(item); ExamplesWelcomePage::openProject(item);
else else
HelpManager::handleHelpRequest(QUrl::fromUserInput(item.docUrl), HelpManager::showHelpUrl(QUrl::fromUserInput(item.docUrl),
HelpManager::ExternalHelpAlways); HelpManager::ExternalHelpAlways);
} }
} }