summaryrefslogtreecommitdiff
path: root/src/plugins/find/searchresulttreemodel.cpp
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2009-07-15 15:29:09 +0200
committerdt <qtc-committer@nokia.com>2009-07-15 15:34:59 +0200
commit3607ad172e5b1a1bcb4090d95b28d05f34d1a0ef (patch)
tree1edd0c973eaa4061806c1afa67869b99aaef10e3 /src/plugins/find/searchresulttreemodel.cpp
parent90a5f271ee351266ca5ecae1b30e2ba1e6cd831c (diff)
downloadqt-creator-3607ad172e5b1a1bcb4090d95b28d05f34d1a0ef.tar.gz
Fix opening files from search results didn't get the correct encoding.
Patch based on the analysis by Grigory Zagorodnev. Task-number: 253974
Diffstat (limited to 'src/plugins/find/searchresulttreemodel.cpp')
-rw-r--r--src/plugins/find/searchresulttreemodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/find/searchresulttreemodel.cpp b/src/plugins/find/searchresulttreemodel.cpp
index a53b8fe595..ddb934c1a1 100644
--- a/src/plugins/find/searchresulttreemodel.cpp
+++ b/src/plugins/find/searchresulttreemodel.cpp
@@ -33,6 +33,7 @@
#include <QtGui/QFont>
#include <QtGui/QColor>
+#include <QtCore/QDir>
using namespace Find::Internal;
@@ -187,7 +188,7 @@ QVariant SearchResultTreeModel::data(const SearchResultFile *file, int role) con
result = QColor(qRgb(245, 245, 245));
break;
case Qt::DisplayRole:
- result = QString(file->fileName()
+ result = QString(QDir::toNativeSeparators(file->fileName())
+ " (" + QString::number(file->childrenCount()) + ")");
break;
case ItemDataRoles::FileNameRole: