summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcollator_win.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-10-17 17:48:34 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-03-11 10:56:15 +0000
commit134cad32d73c776ffdc9db89a24f582bb847f165 (patch)
treeee04e32e8437223750e02f276851cf3661d1fad9 /src/corelib/tools/qcollator_win.cpp
parent5bc54c878f012e7a2569c2e3cee87be90a38af21 (diff)
QtCore: use printf-style qWarning/qDebug where possible (I)
The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Saves ~750b in text size on optimized GCC 5.3 AMD64 builds. Change-Id: I8bf3e46cd5a6b2cae0ceb3e355a50f61925c63d3 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/corelib/tools/qcollator_win.cpp')
-rw-r--r--src/corelib/tools/qcollator_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qcollator_win.cpp b/src/corelib/tools/qcollator_win.cpp
index 30e358c3f9..fcd8d069eb 100644
--- a/src/corelib/tools/qcollator_win.cpp
+++ b/src/corelib/tools/qcollator_win.cpp
@@ -73,7 +73,7 @@ void QCollatorPrivate::init()
if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7)
collator |= SORT_DIGITSASNUMBERS;
else
- qWarning() << "Numeric sorting unsupported on Windows versions older than Windows 7.";
+ qWarning("Numeric sorting unsupported on Windows versions older than Windows 7.");
}
if (ignorePunctuation)