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();
}
void handleHelpRequest(const QUrl &url, HelpManager::HelpViewerLocation location)
void showHelpUrl(const QUrl &url, HelpManager::HelpViewerLocation location)
{
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

View File

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

View File

@@ -42,7 +42,7 @@ public:
virtual void unregisterDocumentation(const QStringList &nameSpaces) = 0;
virtual QMap<QString, QUrl> linksForIdentifier(const QString &id) = 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

View File

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

View File

@@ -460,7 +460,7 @@ void QmlEngine::errorMessageBoxFinished(int result)
break;
}
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();
}
default:

View File

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

View File

@@ -366,7 +366,7 @@ void FormEditorData::fullInit()
// Connect Qt Designer help request to HelpManager.
QObject::connect(m_integration, &QtCreatorIntegration::creatorHelpRequested,
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.

View File

@@ -247,7 +247,7 @@ QByteArray HelpManager::fileData(const QUrl &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);
}

View File

@@ -76,7 +76,7 @@ public:
static void aboutToShutdown();
Q_INVOKABLE void handleHelpRequest(
Q_INVOKABLE void showHelpUrl(
const QUrl &url,
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();
switch (ret) {
case QMessageBox::Yes:
Core::HelpManager::handleHelpRequest(
Core::HelpManager::showHelpUrl(
QLatin1String("qthelp://org.qt-project.qtcreator/doc/creator-developing-ios.html"));
break;
case QMessageBox::No:

View File

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

View File

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