Commit 29a7f557 authored by Marc Mutz's avatar Marc Mutz
Browse files

QtWidgets: 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("...");

Change-Id: I1f6869b024103c98262f1deae014e0d7337a541c
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: default avatarOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
parent f8eeabcf
No related merge requests found
Showing with 37 additions and 36 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment