From 5b24c5793607c809b1bac82c7cc3696001ee9217 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 9 Jun 2009 18:49:40 +0200 Subject: Opening links with cyrillic file names does not work in QLabel. QDestopServices was converting the file names to percentage encoding before calling ShellExecute. This will not work with URLs without a scheme. These are now being treated similar to a file. Task-number: 254501 Reviewed-by: Jens Bache-Wiig --- src/gui/util/qdesktopservices_win.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp index 9f8efb4..a8aa11c 100644 --- a/src/gui/util/qdesktopservices_win.cpp +++ b/src/gui/util/qdesktopservices_win.cpp @@ -165,6 +165,9 @@ static bool launchWebBrowser(const QUrl &url) if (!url.isValid()) return false; + if (url.scheme().isEmpty()) + return openDocument(url); + quintptr returnValue; returnValue = (quintptr)ShellExecute(0, 0, (TCHAR *) QString::fromUtf8(url.toEncoded().constData()).utf16(), 0, 0, SW_SHOWNORMAL); -- cgit v0.12