Commit 9e6a94e5 authored by Pierre Rossi's avatar Pierre Rossi Committed by Pierre Rossi
Browse files

Use QUrl::fromLocalFile


so that we can open local files on the command line for quick testing.

Change-Id: Ica0fd2242d90e5499c2f1550bc87362f20bf7938
Reviewed-by: default avatarZeno Albisser <zeno.albisser@digia.com>
Reviewed-by: default avatarAndras Becsi <andras.becsi@digia.com>
Showing with 2 additions and 2 deletions
...@@ -50,7 +50,7 @@ QUrl urlFromUserInput(const QString& userInput) ...@@ -50,7 +50,7 @@ QUrl urlFromUserInput(const QString& userInput)
{ {
QFileInfo fileInfo(userInput); QFileInfo fileInfo(userInput);
if (fileInfo.exists()) if (fileInfo.exists())
return QUrl(fileInfo.absoluteFilePath()); return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
return QUrl::fromUserInput(userInput); return QUrl::fromUserInput(userInput);
} }
......
...@@ -50,7 +50,7 @@ QUrl urlFromUserInput(const QString& userInput) ...@@ -50,7 +50,7 @@ QUrl urlFromUserInput(const QString& userInput)
{ {
QFileInfo fileInfo(userInput); QFileInfo fileInfo(userInput);
if (fileInfo.exists()) if (fileInfo.exists())
return QUrl(fileInfo.absoluteFilePath()); return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
return QUrl::fromUserInput(userInput); return QUrl::fromUserInput(userInput);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment