summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
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 fb1a5bb..ca55b15 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;