forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/master' into 4.2
Change-Id: I96904f9c65b6c25bb4e04ca34e2d1acb27b8dd58
This commit is contained in:
@@ -622,25 +622,25 @@ void HelpPlugin::handleHelpRequest(const QUrl &url, HelpManager::HelpViewerLocat
|
||||
if (HelpViewer::launchWithExternalApp(url))
|
||||
return;
|
||||
|
||||
QString address = url.toString();
|
||||
if (!HelpManager::findFile(url).isValid()) {
|
||||
const QString address = url.toString();
|
||||
if (address.startsWith("qthelp://org.qt-project.")
|
||||
|| address.startsWith("qthelp://com.nokia.")
|
||||
|| address.startsWith("qthelp://com.trolltech.")) {
|
||||
// local help not installed, resort to external web help
|
||||
QString urlPrefix = "http://doc.qt.io/";
|
||||
if (url.authority() == "org.qt-project.qtcreator")
|
||||
urlPrefix.append(QString::fromLatin1("qtcreator"));
|
||||
else
|
||||
urlPrefix.append("qt-5");
|
||||
address = urlPrefix + address.mid(address.lastIndexOf(QLatin1Char('/')));
|
||||
|| address.startsWith("qthelp://com.nokia.")
|
||||
|| address.startsWith("qthelp://com.trolltech.")) {
|
||||
// local help not installed, resort to external web help
|
||||
QString urlPrefix = "http://doc.qt.io/";
|
||||
if (url.authority() == "org.qt-project.qtcreator")
|
||||
urlPrefix.append(QString::fromLatin1("qtcreator"));
|
||||
else
|
||||
urlPrefix.append("qt-5");
|
||||
QDesktopServices::openUrl(QUrl(urlPrefix + address.mid(address.lastIndexOf(QLatin1Char('/')))));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const QUrl newUrl(address);
|
||||
HelpViewer *viewer = viewerForHelpViewerLocation(location);
|
||||
QTC_ASSERT(viewer, return);
|
||||
viewer->setSource(newUrl);
|
||||
viewer->setSource(url);
|
||||
ICore::raiseWindow(viewer);
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ static QPoint flipPoint(const NSPoint &p)
|
||||
|
||||
NSURL *resolvedURL = data.resolvedUrl.toNSURL();
|
||||
NSString *mimeType = data.mimeType.toNSString();
|
||||
NSData *nsdata = QtMac::toNSData(data.data); // Qt 5.3 has this in QByteArray
|
||||
NSData *nsdata = data.data.toNSData();
|
||||
NSURLResponse *response = [[NSURLResponse alloc] initWithURL:resolvedURL
|
||||
MIMEType:mimeType
|
||||
expectedContentLength:data.data.length()
|
||||
|
||||
@@ -93,7 +93,8 @@ RemoteHelpFilter::RemoteHelpFilter()
|
||||
m_remoteUrls.append("https://www.bing.com/search?q=%1");
|
||||
m_remoteUrls.append("https://www.google.com/search?q=%1");
|
||||
m_remoteUrls.append("https://search.yahoo.com/search?p=%1");
|
||||
m_remoteUrls.append("https://www.cplusplus.com/reference/stl/%1");
|
||||
m_remoteUrls.append("https://stackoverflow.com/search?q=%1");
|
||||
m_remoteUrls.append("http://en.cppreference.com/mwiki/index.php?title=Special%3ASearch&search=%1");
|
||||
m_remoteUrls.append("https://en.wikipedia.org/w/index.php?search=%1");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user