Commit c7f0c4a7 authored by Daniel Teske's avatar Daniel Teske

ResourceNodes: Fix paths in copy url/path actions

Simplify qrc:/// to qrc:/, since that's the documented form. Also work
around QDir::cleanPath() not cleaning up leading '//' on windows.

Task-number: QTCREATORBUG-12299
Change-Id: Ifa75196b8682d4d9e8d5dc6045820000335b26c2
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@digia.com>
parent b79449be
......@@ -65,7 +65,7 @@
using namespace ResourceEditor::Internal;
static const char resourcePrefix[] = ":";
static const char urlPrefix[] = "qrc://";
static const char urlPrefix[] = "qrc:";
class PrefixLangDialog : public QDialog
{
......
......@@ -161,7 +161,10 @@ void ResourceTopLevelNode::update()
// Note: this is wrong, but the qrceditor doesn't allow it either
// only aliases need to be unique
} else {
const QString qrcPath = QDir::cleanPath(prefix + QLatin1Char('/') + alias);
QString prefixWithSlash = prefix;
if (!prefixWithSlash.endsWith(QLatin1Char('/')))
prefixWithSlash.append(QLatin1Char('/'));
const QString qrcPath = QDir::cleanPath(prefixWithSlash + alias);
fileNames.insert(fileName);
filesToAdd[qMakePair(prefix, lang)]
<< new ResourceFileNode(fileName, qrcPath, this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment