diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-13 14:30:28 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-05-02 23:38:45 +0000 |
commit | a0539ed53f45619df7e4aad664369301dd6da091 (patch) | |
tree | 3529ce5147346c7686bc9c901894b88b06a5dcc2 /src/tools/cmake_automoc_parser | |
parent | 8d6eae7ffd1da8322dff7ca87c092232d9a5f7b4 (diff) |
Tools: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.
As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.
Change-Id: Ib9e01ede4e0d7869fc95414d36f37df4a30b16b4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/tools/cmake_automoc_parser')
-rw-r--r-- | src/tools/cmake_automoc_parser/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/cmake_automoc_parser/main.cpp b/src/tools/cmake_automoc_parser/main.cpp index edcb08ef2e..6d8ae5d9fa 100644 --- a/src/tools/cmake_automoc_parser/main.cpp +++ b/src/tools/cmake_automoc_parser/main.cpp @@ -163,7 +163,7 @@ static bool readParseCache(ParseCacheMap &entries, const QString &parseCacheFile QString line; bool mmc_key_found = false; while (textStream.readLineInto(&line)) { - if (!line.startsWith(QLatin1Char(' '))) { + if (!line.startsWith(u' ')) { if (!mocEntries.isEmpty() || mmc_key_found || !mocIncludes.isEmpty()) { entries.insert(source, ParseCacheEntry { std::move(mocEntries), std::move(mocIncludes) }); @@ -348,7 +348,7 @@ int main(int argc, char **argv) const QString base = fileInfo.path() + fileInfo.completeBaseName(); // 1a) erase header for (const auto &ext : headerExtList) { - const QString headerPath = base + QLatin1Char('.') + ext; + const QString headerPath = base + u'.' + ext; auto it = autoGenHeaders.find(headerPath); if (it != autoGenHeaders.end()) { autoGenHeaders.erase(it); @@ -368,7 +368,7 @@ int main(int argc, char **argv) QFileInfo(mocFile.right(mocFile.size() - mocKeyLen)).completeBaseName(); bool breakFree = false; for (auto &ext : headerExtList) { - const QString headerSuffix = headerBaseName + QLatin1Char('.') + ext; + const QString headerSuffix = headerBaseName + u'.' + ext; for (auto it = autoGenHeaders.begin(); it != autoGenHeaders.end(); ++it) { if (it.key().endsWith(headerSuffix) && QFileInfo(it.key()).completeBaseName() == headerBaseName) { |