aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2016-11-15 11:30:02 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2016-11-15 14:55:58 +0000
commit8aa212528b82384ef839845f989fb694823fca9e (patch)
treeedb00cf248339db5192a2f3090c663f21ddbc51b /src
parentd77dc316283996e5d85a45a62ce413f08a717a9f (diff)
Use https and show message if no file was found
Change-Id: Ib47d7dc4af7e6ee7907d4592293c416cb0f1c282 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qtvstools/QtHelpMenu.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/qtvstools/QtHelpMenu.cs b/src/qtvstools/QtHelpMenu.cs
index 162e4a96..8e125c85 100644
--- a/src/qtvstools/QtHelpMenu.cs
+++ b/src/qtvstools/QtHelpMenu.cs
@@ -245,7 +245,7 @@ namespace QtVsTools
switch (links.Values.Count) {
case 0:
if (!offline) {
- uri = new UriBuilder("http://doc.qt.io/qt-5/search-results.html")
+ uri = new UriBuilder("https://doc.qt.io/qt-5/search-results.html")
{
Query = "q=" + keyword
}.ToString();
@@ -273,7 +273,17 @@ namespace QtVsTools
string.Empty, OLEMSGICON.OLEMSGICON_INFO, OLEMSGBUTTON.OLEMSGBUTTON_OK,
OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
} else {
- VsShellUtilities.OpenSystemBrowser(HelperFunctions.ChangePathFormat(uri));
+ if (uri.StartsWith("file:///", StringComparison.Ordinal)
+ && !File.Exists(uri.Substring("file:///".Length))) {
+ VsShellUtilities.ShowMessageBox(Instance.ServiceProvider,
+ "Your search - " + keyword + " - did match a document, but it could "
+ + "not be found on disk. To use the online help, select: "
+ + "Help | Set Qt Help Preference | Use Online Documentation",
+ string.Empty, OLEMSGICON.OLEMSGICON_INFO, OLEMSGBUTTON.OLEMSGBUTTON_OK,
+ OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
+ } else {
+ VsShellUtilities.OpenSystemBrowser(HelperFunctions.ChangePathFormat(uri));
+ }
}
} catch { }
}