summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2023-03-29 09:10:59 +0300
committerKatja Marttila <katja.marttila@qt.io>2023-03-29 12:45:05 +0300
commitad29c2c9148251ed2d0ca796ebc22ceb1510b271 (patch)
tree07690e4383ef7bff092ec5cbffa5af97ccd8a0af
parent46ca72323018c9e31878bc7629e303fc6c05d073 (diff)
Allow shortcuts for https links in Windows
Task-number: QTIFW-964 Change-Id: If666d7d651f8240e3e7d4c25d9e9d7d81cbe1b39 Reviewed-by: Katarina Behrens <katarina.behrens@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
-rw-r--r--doc/operations.qdoc2
-rw-r--r--src/libs/installer/createshortcutoperation.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/operations.qdoc b/doc/operations.qdoc
index c61e2af0c..14e2c568e 100644
--- a/doc/operations.qdoc
+++ b/doc/operations.qdoc
@@ -149,7 +149,7 @@
\c linkname.
On Windows, this creates a .lnk file which can have
\c arguments. Furthermore, \c filename can be
- an HTTP or FTP URL in which case a URL shortcut is created.
+ an HTTP, HTTPS or FTP URL in which case a URL shortcut is created.
\note If the \c @AllUsersStartMenuProgramsPath@ is used for
placing the shortcut, then due to a problem on Windows, it will
drop any arguments to the target and any description set. In
diff --git a/src/libs/installer/createshortcutoperation.cpp b/src/libs/installer/createshortcutoperation.cpp
index 57f901c2f..f068ba345 100644
--- a/src/libs/installer/createshortcutoperation.cpp
+++ b/src/libs/installer/createshortcutoperation.cpp
@@ -110,6 +110,7 @@ static bool createLink(const QString &fileName, const QString &linkName, QString
IUnknown *iunkn = nullptr;
if (fileName.toLower().startsWith(QLatin1String("http:"))
+ || fileName.toLower().startsWith(QLatin1String("https:"))
|| fileName.toLower().startsWith(QLatin1String("ftp:"))) {
IUniformResourceLocator *iurl = nullptr;
if (FAILED(CoCreateInstance(CLSID_InternetShortcut, nullptr, CLSCTX_INPROC_SERVER,