QWindowsServices::openUrl(): Don't convert URLs with fragments/queries to local files
Pass the URL instead. Task-number: QTBUG-55300 Change-Id: I4ce9171db5c1a9e07b17911729b165c115329664 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
17d68c4fc3
commit
cc517d7cd9
|
|
@ -51,8 +51,9 @@ enum { debug = 0 };
|
|||
static inline bool shellExecute(const QUrl &url)
|
||||
{
|
||||
#ifndef Q_OS_WINCE
|
||||
const QString nativeFilePath =
|
||||
url.isLocalFile() ? QDir::toNativeSeparators(url.toLocalFile()) : url.toString(QUrl::FullyEncoded);
|
||||
const QString nativeFilePath = url.isLocalFile() && !url.hasFragment() && !url.hasQuery()
|
||||
? QDir::toNativeSeparators(url.toLocalFile())
|
||||
: url.toString(QUrl::FullyEncoded);
|
||||
const quintptr result =
|
||||
reinterpret_cast<quintptr>(ShellExecute(0, 0,
|
||||
reinterpret_cast<const wchar_t *>(nativeFilePath.utf16()),
|
||||
|
|
|
|||
Loading…
Reference in New Issue