Commit 7a7d5dfd authored by Olli Werwolff's avatar Olli Werwolff
Browse files

Fixes: Show relative path for file nodes in resource editor

Task:     238307
RevBy:    thorbjorn
AutoTest: -
Details:  -
parent 8c3e2499
......@@ -641,7 +641,8 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const
} else {
// File node
Q_ASSERT(file);
stringRes = QFileInfo(file->name).fileName();
QString conv_file = m_resource_file.relativePath(file->name);
stringRes = conv_file.replace(QDir::separator(), QLatin1Char('/'));
const QString alias = file->alias;
if (!alias.isEmpty())
appendParenthesized(alias, stringRes);
......@@ -661,20 +662,6 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const
}
}
break;
case Qt::ToolTipRole:
if (isFileNode) {
// File node
Q_ASSERT(file);
QString conv_file = m_resource_file.relativePath(file->name);
QString stringRes = conv_file.replace(QDir::separator(), QLatin1Char('/'));
const QString &alias_file = file->alias;
if (!alias_file.isEmpty())
appendParenthesized(alias_file, stringRes);
result = stringRes;
}
break;
default:
break;
}
......
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