Commit a6e6dee0 authored by Adrian Chaves's avatar Adrian Chaves
Browse files

Don’t skip file references from the same line as rc.cpp

Summary: BUG: 277966

Test Plan: Tested manually with a PO file as described in the bug report.

Reviewers: #localization, aacid

Reviewed By: #localization, aacid

Differential Revision: https://phabricator.kde.org/D23643
parent 8eaef8a4
......@@ -378,8 +378,10 @@ QStringList GettextStorage::sourceFiles(const DocPosition& pos) const
bool hasUi = !result.isEmpty();
static const QRegExp cpp_re(QStringLiteral("^#: "));
foreach (const QString &cppLine, commentLines.filter(cpp_re)) {
if (hasUi && cppLine.startsWith(QLatin1String("#: rc.cpp"))) continue;
foreach (const QStringRef &fileRef, cppLine.midRef(3).split(' ')) {
if (hasUi && fileRef.startsWith(QLatin1String("rc.cpp:"))) {
continue;
}
result << fileRef.toString();
}
}
......
Supports Markdown
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