mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-19 20:44:16 +02:00
Previous versions: avoid the trigraph warnings of the file name pattern
The glob "????-??-?? ??-??-??" contains the trigraph "??-", which GCC reports with -Wtrigraphs (8 warnings). The pattern is now written with "\?" escapes, in one place; it is the same string.
This commit is contained in:
@@ -67,8 +67,11 @@ QStringList PreviousVersions::kept(const QString &file_path)
|
|||||||
const QDir dir(folder(file_path));
|
const QDir dir(folder(file_path));
|
||||||
//Each copy has the time its version was saved (keep()); a .qet and
|
//Each copy has the time its version was saved (keep()); a .qet and
|
||||||
//a .qetz of the same project are versions of it alike
|
//a .qetz of the same project are versions of it alike
|
||||||
QStringList names = dir.entryList({versionPrefix(info) + QStringLiteral("????-??-?? ??-??-??*.qet"),
|
//"????-??-?? ??-??-??" written with "\?", so that the compiler doesn't
|
||||||
versionPrefix(info) + QStringLiteral("????-??-?? ??-??-??*.qetz")},
|
//see the trigraph "??-" in it (-Wtrigraphs)
|
||||||
|
const QString stamp_ = QStringLiteral("?\?\?\?-?\?-?\? ?\?-?\?-?\?");
|
||||||
|
QStringList names = dir.entryList({versionPrefix(info) + stamp_ + QStringLiteral("*.qet"),
|
||||||
|
versionPrefix(info) + stamp_ + QStringLiteral("*.qetz")},
|
||||||
QDir::Files, QDir::Time);
|
QDir::Files, QDir::Time);
|
||||||
QStringList paths;
|
QStringList paths;
|
||||||
for (const QString &name : std::as_const(names))
|
for (const QString &name : std::as_const(names))
|
||||||
|
|||||||
Reference in New Issue
Block a user