qt5base-lts/src/corelib
Marc Mutz 5a76a3fb03 QtBase: use printf-style qWarning/qDebug where possible (II)
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 second part, replace
   qWarning() << "" << non-QString
with
   qWarning("..%.", non-QString).

QString (and QUrl etc) have special escaping handling when streamed
into QDebug, so leave those alone. They also seem to expand to less
code than the qPrintable() alternative, so there's no reason to
replace them.

Saves 2KiB, 3.4KiB, ~750b and ~450b in text size in QtCore, Gui,
Network and Widgets, resp., on optimized GCC 5.3 AMD64 builds.

Change-Id: Iae6823e543544347e628ca1060d6d51e3b04d3f4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-05-03 04:35:06 +00:00
..
animation Updated license headers 2016-01-15 12:25:24 +00:00
arch QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
codecs QtBase: use printf-style qWarning/qDebug where possible (II) 2016-05-03 04:35:06 +00:00
doc qdoc: Remove Q_QDOC for qRound() and qRound64() 2016-04-08 14:11:32 +00:00
global QOpenGLContext: add a way to disable the thread affinity check 2016-05-02 11:52:00 +00:00
io QtBase: use printf-style qWarning/qDebug where possible (II) 2016-05-03 04:35:06 +00:00
itemmodels QtBase: use erase and std::remove_if with QList and QVector 2016-04-08 19:35:26 +00:00
json Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-03-13 19:27:21 +00:00
kernel QtBase: use printf-style qWarning/qDebug where possible (II) 2016-05-03 04:35:06 +00:00
mimetypes Remove unused variables. 2016-04-10 07:39:14 +00:00
plugin Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
statemachine Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
thread Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
tools Make QSharedPointer without custom deleters call the correct destructor 2016-04-28 12:58:35 +00:00
xml QVector: preserve capacity in clear() 2016-02-29 07:57:47 +00:00
corelib.pro Remove dynamic loading of functions that are present in Windows Vista onwards. 2016-04-19 15:11:06 +00:00
eval.pri Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
Qt5Config.cmake.in Check that files we expect to find actually exist when using a cmake package. 2013-05-20 15:20:26 +02:00
Qt5CoreConfigExtras.cmake.in Merge remote-tracking branch 'origin/5.6' into dev 2016-01-08 12:35:24 +01:00
Qt5CoreConfigExtrasMkspecDir.cmake.in Generate the directory for the mkspec include in a helper file. 2013-06-21 18:58:54 +02:00
Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in Generate the directory for the mkspec include in a helper file. 2013-06-21 18:58:54 +02:00
Qt5CoreMacros.cmake Merge remote-tracking branch 'origin/5.6' into dev 2016-01-12 11:07:56 +01:00
Qt5CTestMacros.cmake Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-04 08:59:18 +02:00
QtCore.dynlist Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtzlib.pro make a proper header-only module for QtZlib 2015-11-17 20:22:17 +00:00