summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-07-22 12:08:07 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-07-22 12:08:07 (GMT)
commit6c25a7cdea912f212ce00f43c7cfc862c1ecdd50 (patch)
treeb51cd6450b33a98f30402303bbd4513270de1f2b /tools/designer
parent6ecce8dfe0c71bc4dcc510d7920f70f7799cb0a7 (diff)
downloadQt-6c25a7cdea912f212ce00f43c7cfc862c1ecdd50.zip
Qt-6c25a7cdea912f212ce00f43c7cfc862c1ecdd50.tar.gz
Qt-6c25a7cdea912f212ce00f43c7cfc862c1ecdd50.tar.bz2
Designer: Fixed bug in setting QUrl property values from resources.
Setting a file from a resource would result in 'qrc::/file' as the resource browser returns ':/file'. Reviewed-by: Jarek Kobus <jkobus@trolltech.com> Initial-patch-by: andy <qt-info@nokia.com>
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/propertyeditor/designerpropertymanager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp b/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 2f6a51e..1092b92 100644
--- a/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/tools/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -254,8 +254,11 @@ void TextEditor::resourceActionActivated()
{
QString oldPath = m_editor->text();
if (oldPath.startsWith(QLatin1String("qrc:")))
- oldPath = oldPath.mid(4);
- const QString newPath = IconSelector::choosePixmapResource(m_core, m_core->resourceModel(), oldPath, this);
+ oldPath.remove(0, 4);
+ // returns ':/file'
+ QString newPath = IconSelector::choosePixmapResource(m_core, m_core->resourceModel(), oldPath, this);
+ if (newPath.startsWith(QLatin1Char(':')))
+ newPath.remove(0, 1);
if (newPath.isEmpty() || newPath == oldPath)
return;
const QString newText = QLatin1String("qrc:") + newPath;