diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-01-31 22:07:42 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-02-02 08:43:04 +0000 |
commit | 349f4150672d98ce13c0c5c2232582210451e01e (patch) | |
tree | 82ec26f1812f6bae78646abba485bb8ab55102f6 /src/plugins/valgrind/memcheckerrorview.cpp | |
parent | 1bcfa137a3e625eaafba2e1b5622c87946da7ccc (diff) | |
download | qt-creator-349f4150672d98ce13c0c5c2232582210451e01e.tar.gz |
Valgrind: Replace QDir::separator with slash
Change-Id: I8f8192dc065702cb1c6bb218b8d992bb9775cd10
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/valgrind/memcheckerrorview.cpp')
-rw-r--r-- | src/plugins/valgrind/memcheckerrorview.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/valgrind/memcheckerrorview.cpp b/src/plugins/valgrind/memcheckerrorview.cpp index 69a0803fbd..263a7b1f74 100644 --- a/src/plugins/valgrind/memcheckerrorview.cpp +++ b/src/plugins/valgrind/memcheckerrorview.cpp @@ -92,7 +92,7 @@ static QString makeFrameName(const Frame &frame, const QString &relativeTo, const QString d = frame.directory(); const QString f = frame.file(); const QString fn = frame.functionName(); - const QString fullPath = d + QDir::separator() + f; + const QString fullPath = d + QLatin1Char('/') + f; QString path; if (!d.isEmpty() && !f.isEmpty()) @@ -109,12 +109,12 @@ static QString makeFrameName(const Frame &frame, const QString &relativeTo, if (frame.line() != -1) path += QLatin1Char(':') + QString::number(frame.line()); - path = path.toHtmlEscaped(); + path = QDir::toNativeSeparators(path.toHtmlEscaped()); if (link && !f.isEmpty() && QFile::exists(fullPath)) { // make a hyperlink label path = QString::fromLatin1("<a href=\"file://%1:%2\" %4>%3</a>") - .arg(fullPath, QString::number(frame.line()), path, linkAttr); + .arg(fullPath).arg(frame.line()).arg(path).arg(linkAttr); } if (!fn.isEmpty()) @@ -130,8 +130,9 @@ static QString relativeToPath() const ProjectExplorer::Project *project = ProjectExplorer::SessionManager::startupProject(); QString relativeTo(project ? project->projectDirectory().toString() : QDir::homePath()); - if (!relativeTo.endsWith(QDir::separator())) - relativeTo.append(QDir::separator()); + const QChar slash = QLatin1Char('/'); + if (!relativeTo.endsWith(slash)) + relativeTo.append(slash); return relativeTo; } |