From 1eaa669a6e94124a2644d10acdf890a3c21d1ad4 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Date: Wed, 15 Apr 2009 15:34:59 +0200
Subject: Make choosing a file path for a QUrl-type property work on Windows.

Use QUrl::fromLocalFile to construct the url string.
Reviewed-by: Jarek Kobus <jkobus@trolltech.com>
---
 .../designer/src/components/propertyeditor/designerpropertymanager.cpp  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp b/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 1b267aa..346da18 100644
--- a/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -271,7 +271,7 @@ void TextEditor::fileActionActivated()
     const QString newPath = m_core->dialogGui()->getOpenFileName(this, tr("Choose a File"), oldPath);
     if (newPath.isEmpty() || newPath == oldPath)
         return;
-    const QString newText = QLatin1String("file:") + newPath;
+    const QString newText = QUrl::fromLocalFile(newPath).toString();
     m_editor->setText(newText);
     emit textChanged(newText);
 }
-- 
cgit v0.12