Skip to content
Commit 8acf04dd authored by Igor Kushnir's avatar Igor Kushnir
Browse files

cmake: improve spacing in operator<< overloads

Use QDebugStateSaver as Qt documentation recommends and
qtbase/src/corelib/io/qdebug.h does since
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=737635fa56f5e4f50dabb495a5b8087e908b4713

Before this commit the code
    CMakeFile ff;
    qCritical() << 'b' << ff << 'e';
    qCritical().nospace() << 'b' << ff << 'e';
printed:
    b CMakeFile(-I QVector() , -F QVector() , -D QHash() ,  "" )  e
    bCMakeFile(-IQVector(), -FQVector(), -DQHash(), "")e
At this commit:
    b CMakeFile(-I QVector(), -F QVector(), -D QHash(), "") e
    bCMakeFile(-I QVector(), -F QVector(), -D QHash(), "")e

Print CMakeTarget without spaces, for example:
    CMakeTarget::Custom:"My target"
to underscore that a single object is printed.
parent e43c18c5
Pipeline #289508 passed with stage
in 14 minutes and 21 seconds
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