From c606dc8403cd3c14368ef45efcd4c6b6be396632 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sat, 17 Jul 2010 20:20:49 +0300 Subject: [PATCH] GUI: Show paths with native separators in result tree. GUI used to show paths with / separator which is not native separator in Windows. So lets convert shown paths to native separators before adding them to the GUI. --- gui/resultstree.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 92ee3da33..ba1729b6a 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -156,7 +156,9 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent, } QList list; - list << CreateItem(item.file); + // Ensure shown path is with native separators + const QString file = QDir::toNativeSeparators(item.file); + list << CreateItem(file); list << CreateItem(tr(item.severity.toLatin1())); list << CreateItem(QString("%1").arg(item.line)); //TODO message has parameter names so we'll need changes to the core @@ -334,6 +336,8 @@ QStandardItem *ResultsTree::EnsureFileItem(const QString &fullpath, bool hide) return item; } + // Ensure shown path is with native separators + name = QDir::toNativeSeparators(name); item = CreateItem(name); item->setIcon(QIcon(":images/text-x-generic.png"));