tools/designer/src/lib/shared/qtresourceview.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/tools/designer/src/lib/shared/qtresourceview.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/tools/designer/src/lib/shared/qtresourceview.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -377,7 +377,8 @@
     if (!m_resourceModel)
         return;
 
-    const QString root(QLatin1Char(':'));
+    // Resource root up until 4.6 was ':', changed to ":/" as of 4.7
+    const QString root(QLatin1String(":/"));
 
     QMap<QString, QString> contents = m_resourceModel->contents();
     QMapIterator<QString, QString> itContents(contents);
@@ -420,7 +421,7 @@
     // 3) we hide these items which has pathToVisible value false.
 
     const bool matchAll = m_filterPattern.isEmpty();
-    const QString root(QLatin1Char(':'));
+    const QString root(QLatin1String(":/"));
 
     QQueue<QString> pathQueue;
     pathQueue.enqueue(root);
@@ -664,6 +665,8 @@
 
 void QtResourceView::selectResource(const QString &resource)
 {
+    if (resource.isEmpty())
+        return;
     QFileInfo fi(resource);
     QDir dir = fi.absoluteDir();
     if (fi.isDir())