summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppwriteincludes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/uic/cpp/cppwriteincludes.cpp')
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index 7cf7c4e59e4..8203a033f50 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -11,7 +11,7 @@
#include <qfileinfo.h>
#include <qtextstream.h>
-#include <stdio.h>
+#include <cstdio>
QT_BEGIN_NAMESPACE
@@ -41,7 +41,7 @@ WriteIncludes::WriteIncludes(Uic *uic) : WriteIncludesBase(uic),
for (const auto &e : classInfoEntries()) {
const QString klass = QLatin1StringView(e.klass);
const QString module = QLatin1StringView(e.module);
- QLatin1StringView header = QLatin1StringView(e.header);
+ QLatin1StringView header(e.header);
if (klass.contains(namespaceDelimiter)) {
m_classToHeader.insert(klass, moduleHeader(module, header));
} else {
@@ -73,7 +73,7 @@ void WriteIncludes::acceptUI(DomUI *node)
void WriteIncludes::insertIncludeForClass(const QString &className, QString header, bool global)
{
if (debugWriteIncludes)
- fprintf(stderr, "%s %s '%s' %d\n", Q_FUNC_INFO, qPrintable(className), qPrintable(header), global);
+ std::fprintf(stderr, "%s %s '%s' %d\n", Q_FUNC_INFO, qPrintable(className), qPrintable(header), global);
do {
if (!header.isEmpty())
@@ -91,7 +91,7 @@ void WriteIncludes::insertIncludeForClass(const QString &className, QString head
// Remove namespaces
QString lowerClassName = className.toLower();
static const auto namespaceSeparator = "::"_L1;
- const int namespaceIndex = lowerClassName.lastIndexOf(namespaceSeparator);
+ const auto namespaceIndex = lowerClassName.lastIndexOf(namespaceSeparator);
if (namespaceIndex != -1)
lowerClassName.remove(0, namespaceIndex + namespaceSeparator.size());
if (m_includeBaseNames.contains(lowerClassName)) {