Re: [Development] qDebug()

2018-03-26 Thread Tor Arne Vestbø

> On 26 Mar 2018, at 13:31, Igor Mironchik  wrote:
> 
> 
> 
> On 26.03.2018 14:22, Tor Arne Vestbø wrote:
>> https://bugreports.qt.io/browse/QTBUG-66153 was fixed in 5.11-alpha1.
>> 
>> Which sha1 of qtbase are you building?
> 
> 4ca0d764546908dd31fc3794ddcead5582436097

That’s not the HEAD of the 5.11 branch, that’s from Jan 23, and the fix for 
QTBUG-66153 landed Feb 2. Do a git pull.

Tor Arne 

> 
>> 
>> Tor Arne
>> 
>>> On 26 Mar 2018, at 08:15, Mitch Curtis  wrote:
>>> 
>>> You might be running into https://bugreports.qt.io/browse/QTBUG-66153
>>> 
>>> Try setting QT_LOGGING_TO_CONSOLE=1
>>> 
>>> On 3/26/18, 6:08 AM, "Development on behalf of Igor Mironchik" 
>>> >> igor.mironc...@gmail.com> wrote:
>>> 
>>>Hello,
>>> 
>>>Built sources from git repository (5.11 branch) doesn't print qDebug()
>>>messages to console. What I missed during the configuration process?
>>> 
>>>Thank you.
>>> 
>>>___
>>>Development mailing list
>>>Development@qt-project.org
>>>http://lists.qt-project.org/mailman/listinfo/development
>>> 
>>> 
>>> ___
>>> Development mailing list
>>> Development@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/development
> 

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-26 Thread Igor Mironchik



On 26.03.2018 14:22, Tor Arne Vestbø wrote:

https://bugreports.qt.io/browse/QTBUG-66153 was fixed in 5.11-alpha1.

Which sha1 of qtbase are you building?


4ca0d764546908dd31fc3794ddcead5582436097



Tor Arne


On 26 Mar 2018, at 08:15, Mitch Curtis  wrote:

You might be running into https://bugreports.qt.io/browse/QTBUG-66153

Try setting QT_LOGGING_TO_CONSOLE=1

On 3/26/18, 6:08 AM, "Development on behalf of Igor Mironchik" 
 wrote:

Hello,

Built sources from git repository (5.11 branch) doesn't print qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-26 Thread Tor Arne Vestbø
https://bugreports.qt.io/browse/QTBUG-66153 was fixed in 5.11-alpha1.

Which sha1 of qtbase are you building?

Tor Arne 

> On 26 Mar 2018, at 08:15, Mitch Curtis  wrote:
> 
> You might be running into https://bugreports.qt.io/browse/QTBUG-66153
> 
> Try setting QT_LOGGING_TO_CONSOLE=1
> 
> On 3/26/18, 6:08 AM, "Development on behalf of Igor Mironchik" 
>  igor.mironc...@gmail.com> wrote:
> 
>Hello,
> 
>Built sources from git repository (5.11 branch) doesn't print qDebug() 
>messages to console. What I missed during the configuration process?
> 
>Thank you.
> 
>___
>Development mailing list
>Development@qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development
> 
> 
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-26 Thread Igor Mironchik

Yes, it helped, thanks.


On 26.03.2018 09:15, Mitch Curtis wrote:

You might be running into https://bugreports.qt.io/browse/QTBUG-66153

Try setting QT_LOGGING_TO_CONSOLE=1

On 3/26/18, 6:08 AM, "Development on behalf of Igor Mironchik" 
 wrote:

 Hello,
 
 Built sources from git repository (5.11 branch) doesn't print qDebug()

 messages to console. What I missed during the configuration process?
 
 Thank you.
 
 ___

 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development
 



___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-26 Thread Mitch Curtis
You might be running into https://bugreports.qt.io/browse/QTBUG-66153

Try setting QT_LOGGING_TO_CONSOLE=1

On 3/26/18, 6:08 AM, "Development on behalf of Igor Mironchik" 
 wrote:

Hello,

Built sources from git repository (5.11 branch) doesn't print qDebug() 
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Igor Mironchik

Simple:

#include  #include  #include  #include 
 #include  class Obj     :    public QWidget {     
Q_OBJECT public:     Obj()     {}     ~Obj()     {} public slots:     
void start()     {         show();         QTextStream st( stdout );     
    st << "QTextStream works...";         qDebug() << "Started and 
stopped.";     } }; int main( int argc, char ** argv ) {     
QApplication app( argc, argv );     Obj o;     QTimer::singleShot( 0, 
, ::start );     return app.exec(); } #include "main.moc"


Produces:

Starting /home/igor/Tmp/build-debug-Qt_5_10_0_qt5-Debug/debug...

QTextStream works...

/home/igor/Tmp/build-debug-Qt_5_10_0_qt5-Debug/debug exited with code 0


But it's so only with Qt built from sources (5.11 branch)...

On 26.03.2018 08:50, Timur Pocheptsov wrote:


Have you tried creating an empty qtlogging.ini (as suggested on 
stackowerflow)?


Best regards,

    Timur.


*From:* Development 
<development-bounces+timur.pocheptsov=qt...@qt-project.org> on behalf 
of Igor Mironchik <igor.mironc...@gmail.com>

*Sent:* Monday, March 26, 2018 7:02:28 AM
*To:* Alexander Akulich; inter...@qt-project.org
*Cc:* development@qt-project.org
*Subject:* Re: [Development] qDebug()


On 26.03.2018 07:50, Alexander Akulich wrote:

Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
<https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646> 
(referenced in the stackoverflow answer).


No, this solution didn't help. I guess that there is another reason.



(The subject question belongs to interest@, not development@. Please 
drop development@qt-project.org <mailto:development@qt-project.org> 
in further replies).


On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
<igor.mironc...@gmail.com <mailto:igor.mironc...@gmail.com>> wrote:


Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources
by myself.


See, for example, the solution proposed here:


https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>


<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>

QT qDebug() stopped to work (no more printing to console ...

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>
stackoverflow.com <http://stackoverflow.com>
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug()
macro stopped working and no longer displays the messages on the
console. How can the debug output be re ...

Best regards,

    Timur.


*From:* Development
<development-bounces+timur.pocheptsov=qt...@qt-project.org>
<mailto:development-bounces+timur.pocheptsov=qt...@qt-project.org>
on behalf of Igor Mironchik <igor.mironc...@gmail.com>
<mailto:igor.mironc...@gmail.com>
*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* development@qt-project.org <mailto:development@qt-project.org>
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print
qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org <mailto:Development@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>



___
Development mailing list
Development@qt-project.org <mailto:Development@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>






___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Igor Mironchik



On 26.03.2018 08:50, Timur Pocheptsov wrote:


Have you tried creating an empty qtlogging.ini (as suggested on 
stackowerflow)?




Sure.



Best regards,

    Timur.


*From:* Development 
<development-bounces+timur.pocheptsov=qt...@qt-project.org> on behalf 
of Igor Mironchik <igor.mironc...@gmail.com>

*Sent:* Monday, March 26, 2018 7:02:28 AM
*To:* Alexander Akulich; inter...@qt-project.org
*Cc:* development@qt-project.org
*Subject:* Re: [Development] qDebug()



On 26.03.2018 07:50, Alexander Akulich wrote:

Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
<https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646> 
(referenced in the stackoverflow answer).


No, this solution didn't help. I guess that there is another reason.



(The subject question belongs to interest@, not development@. Please 
drop development@qt-project.org <mailto:development@qt-project.org> 
in further replies).


On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
<igor.mironc...@gmail.com <mailto:igor.mironc...@gmail.com>> wrote:


Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources
by myself.



See, for example, the solution proposed here:



https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>


<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>

QT qDebug() stopped to work (no more printing to console ...

<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>
stackoverflow.com <http://stackoverflow.com>
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug()
macro stopped working and no longer displays the messages on the
console. How can the debug output be re ...

Best regards,

Timur.


*From:* Development
<development-bounces+timur.pocheptsov=qt...@qt-project.org>
<mailto:development-bounces+timur.pocheptsov=qt...@qt-project.org>
on behalf of Igor Mironchik <igor.mironc...@gmail.com>
<mailto:igor.mironc...@gmail.com>
*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* development@qt-project.org <mailto:development@qt-project.org>
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print
qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org <mailto:Development@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>



___
Development mailing list
Development@qt-project.org <mailto:Development@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
<http://lists.qt-project.org/mailman/listinfo/development>






___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Timur Pocheptsov
Have you tried creating an empty qtlogging.ini (as suggested on stackowerflow)?


Best regards,

Timur.


From: Development <development-bounces+timur.pocheptsov=qt...@qt-project.org> 
on behalf of Igor Mironchik <igor.mironc...@gmail.com>
Sent: Monday, March 26, 2018 7:02:28 AM
To: Alexander Akulich; inter...@qt-project.org
Cc: development@qt-project.org
Subject: Re: [Development] qDebug()



On 26.03.2018 07:50, Alexander Akulich wrote:
Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
(referenced in the stackoverflow answer).

No, this solution didn't help. I guess that there is another reason.


(The subject question belongs to interest@, not development@. Please drop 
development@qt-project.org<mailto:development@qt-project.org> in further 
replies).

On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
<igor.mironc...@gmail.com<mailto:igor.mironc...@gmail.com>> wrote:

Hi,

On 26.03.2018 07:33, Timur Pocheptsov wrote:

On which platform is it? Are you sure it's 5.11 only?

I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources by myself.



See, for example, the solution proposed here:


https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

[https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-i...@2.png?v=73d79a89bded]<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>

QT qDebug() stopped to work (no more printing to console 
...<https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu>
stackoverflow.com<http://stackoverflow.com>
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro stopped 
working and no longer displays the messages on the console. How can the debug 
output be re ...

Best regards,

Timur.


From: Development 
<development-bounces+timur.pocheptsov=qt...@qt-project.org><mailto:development-bounces+timur.pocheptsov=qt...@qt-project.org>
 on behalf of Igor Mironchik 
<igor.mironc...@gmail.com><mailto:igor.mironc...@gmail.com>
Sent: Monday, March 26, 2018 6:07:25 AM
To: development@qt-project.org<mailto:development@qt-project.org>
Subject: [Development] qDebug()

Hello,

Built sources from git repository (5.11 branch) doesn't print qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org<mailto:Development@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development


___
Development mailing list
Development@qt-project.org<mailto:Development@qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development



___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Igor Mironchik



On 26.03.2018 07:50, Alexander Akulich wrote:

Hello Igor,

Does the linked solution help? See also comment #2 at 
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646 
 
(referenced in the stackoverflow answer).


No, this solution didn't help. I guess that there is another reason.



(The subject question belongs to interest@, not development@. Please 
drop development@qt-project.org  in 
further replies).


On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
> wrote:


Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources by
myself.



See, for example, the solution proposed here:



https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu






QT qDebug() stopped to work (no more printing to console ...


stackoverflow.com 
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro
stopped working and no longer displays the messages on the
console. How can the debug output be re ...

Best regards,

    Timur.


*From:* Development


on behalf of Igor Mironchik 

*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* development@qt-project.org 
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print
qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org 
http://lists.qt-project.org/mailman/listinfo/development




___
Development mailing list
Development@qt-project.org 
http://lists.qt-project.org/mailman/listinfo/development





___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread aha_1980
Hi Igor,

Which platform are you on? Also, please check the output of configure regarding 
the logger backend (stdout vs. syslog etc.)

It *may* also be a QtCreator bug. I have heard about your problem quite some 
time recently, you might want to use google and co.

Regards,
Andre

Am Montag, 26. März 2018 schrieb Igor Mironchik:
> Hello,
> 
> Built sources from git repository (5.11 branch) doesn't print qDebug() 
> messages to console. What I missed during the configuration process?
> 
> Thank you.
> 
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>

-- 
Von meinem Jolla gesendet
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Alexander Akulich
Hello Igor,

Does the linked solution help? See also comment #2 at
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646
(referenced in the stackoverflow answer).

(The subject question belongs to interest@, not development@. Please drop
development@qt-project.org in further replies).

On Mon, Mar 26, 2018 at 7:36 AM, Igor Mironchik 
wrote:

> Hi,
>
> On 26.03.2018 07:33, Timur Pocheptsov wrote:
>
> On which platform is it? Are you sure it's 5.11 only?
>
>
> I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources by myself.
>
>
> See, for example, the solution proposed here:
>
>
> https://stackoverflow.com/questions/48474897/qt-qdebug-
> stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu
>
> 
> QT qDebug() stopped to work (no more printing to console ...
> 
> stackoverflow.com
> After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro stopped
> working and no longer displays the messages on the console. How can the
> debug output be re ...
> Best regards,
>
> Timur.
> --
> *From:* Development  pocheptsov=qt...@qt-project.org>
>  on behalf of
> Igor Mironchik  
> *Sent:* Monday, March 26, 2018 6:07:25 AM
> *To:* development@qt-project.org
> *Subject:* [Development] qDebug()
>
> Hello,
>
> Built sources from git repository (5.11 branch) doesn't print qDebug()
> messages to console. What I missed during the configuration process?
>
> Thank you.
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
>
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Igor Mironchik

What more interesting that in console applications qDebug() works...


So I guess that this is not a problem of configuration process.


And with Qt 5.9.4 installed with online installer qDebug() works in gui 
mode too.



On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?


See, for example, the solution proposed here:


https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu



QT qDebug() stopped to work (no more printing to console ... 


stackoverflow.com
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro 
stopped working and no longer displays the messages on the console. 
How can the debug output be re ...


Best regards,

    Timur.


*From:* Development 
 on behalf 
of Igor Mironchik 

*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* development@qt-project.org
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Igor Mironchik

Hi,


On 26.03.2018 07:33, Timur Pocheptsov wrote:


On which platform is it? Are you sure it's 5.11 only?



I'm on Kubuntu 16.04. It is on 5.10 and 5.11 build from sources by myself.



See, for example, the solution proposed here:


https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu



QT qDebug() stopped to work (no more printing to console ... 


stackoverflow.com
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro 
stopped working and no longer displays the messages on the console. 
How can the debug output be re ...


Best regards,

    Timur.


*From:* Development 
 on behalf 
of Igor Mironchik 

*Sent:* Monday, March 26, 2018 6:07:25 AM
*To:* development@qt-project.org
*Subject:* [Development] qDebug()
Hello,

Built sources from git repository (5.11 branch) doesn't print qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug()

2018-03-25 Thread Timur Pocheptsov
On which platform is it? Are you sure it's 5.11 only?


See, for example, the solution proposed here:


https://stackoverflow.com/questions/48474897/qt-qdebug-stopped-to-work-no-more-printing-to-console-after-upgrading-to-ubu

[https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-i...@2.png?v=73d79a89bded]

QT qDebug() stopped to work (no more printing to console 
...
stackoverflow.com
After upgrading from Ubuntu 17.04 to 17.10, the QT qDebug() macro stopped 
working and no longer displays the messages on the console. How can the debug 
output be re ...

Best regards,

Timur.


From: Development  
on behalf of Igor Mironchik 
Sent: Monday, March 26, 2018 6:07:25 AM
To: development@qt-project.org
Subject: [Development] qDebug()

Hello,

Built sources from git repository (5.11 branch) doesn't print qDebug()
messages to console. What I missed during the configuration process?

Thank you.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug, qWarning, qCritical, qFatal in Qt source code

2014-05-03 Thread Richard Moore
On 3 May 2014 11:28, Kurt Pattyn pattyn.k...@gmail.com wrote:

 Hi,

 I would like to know if there are any guidelines about using qDebug and
 friends in Qt source code?
 Recently I had to remove qWarning statements from a submit (for very
 plausible reasons), but a quick search through qtbase revealed a lot of
 qWarning statements.

 So are there any rules of thumb?


qWarning - the developer writing an app using Qt has made an error in their
code that has lead to calling Qt with invalid values, for example
connecting to a slot that does not exist.

qDebug - when used in Qt itself, this is stuff to help with debugging of
Qt. Users of Qt will often have Qt itself built without them, so don't rely
on these messages to actually appear to people developing apps.

qFatal - something is so screwed we cannot continue. Prints a message then
aborts.

qCritical - similar to the above but doesn't abort.

Rich.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] qDebug, qWarning, qCritical, qFatal in Qt source code

2014-05-03 Thread Giuseppe D'Angelo
On 3 May 2014 12:28, Kurt Pattyn pattyn.k...@gmail.com wrote:
 Recently I had to remove qWarning statements from a submit (for very 
 plausible reasons), but a quick search through qtbase revealed a lot of 
 qWarning statements.

 So are there any rules of thumb?

Please also cf. the other thread about using categorized logging from within Qt.

It's never good to use qDebug unconditionally, as that's useless
information for the users. qWarning, qCritical, qFatal are fine to
indicate a major problem, usually originating from user code or from
some specific configuration issue.
For instance a failing QObject::connect will print a warning through
qWarning. Running a setuid binary will trigger a qFatal. Q_ASSERTs go
through qFatal if they fail (but they're compiled out in release
mode).
qCritical is not really used in Qt.

qFatal on its own will crash the program; qWarning / qCritical can be
set to do the same by exporting QT_FATAL_WARNINGS=1. In programs we
work on we strive to get 0 warnings by keeping that env variable set
at all times.


About qDebug: usually in Qt source code we had debug statements
wrapped in macros:

[snip]
#ifdef ENGINE_DEBUG
qDebug()  Foo  foo;
#endif
[snip]

or:

[snip]
#ifdef ENGINE_DEBUG
#define engineDebug qDebug
#else
#define engineDebug QT_NO_QDEBUG_MACRO
#endif

engineDebug()  Foo  foo;
[snip]

But for new code we should use categorized logging and its tests.

Hope this helps,
-- 
Giuseppe D'Angelo
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development