missing qDebug output when creating QT applications

Bug #1731646 reported by Dimitar Petrovski on 2017-11-11
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Undecided
Unassigned

Bug Description

This bug seems to be connected to:
https://bugzilla.redhat.com/show_bug.cgi?id=1227295

in the above link I have found a workaround for the problem. I have created an empty file in:
~/.config/QtProject called qtlogging.ini and the problem is resolved.

the problem was not present in ubuntu 17.04

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: libqt5core5a 5.9.1+dfsg-10ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.1
Architecture: amd64
CurrentDesktop: KDE
Date: Sat Nov 11 16:59:49 2017
InstallationDate: Installed on 2016-11-09 (366 days ago)
InstallationMedia: Kubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.1)
SourcePackage: qtbase-opensource-src
UpgradeStatus: Upgraded to artful on 2017-10-30 (11 days ago)

Dimitar Petrovski (dimeptr) wrote :
Dmitry Shachnev (mitya57) wrote :

It is not a bug. We intentionally disable debug output in Debian/Ubuntu (Fedora also does the same thing). It was done in order to solve https://bugs.debian.org/805399.

There are easy workarounds: either what you suggested, or exporting QT_LOGGING_RULES="*.debug=true".

Changed in qtbase-opensource-src (Ubuntu):
status: New → Invalid
Dimitar Petrovski (dimeptr) wrote :

Should have been at least documented somehow, but OK.

Dmitry Shachnev (mitya57) wrote :

It is nowhere documented that debug output will be shown. Please see http://doc.qt.io/qt-5/qloggingcategory.html.

Dimitar Petrovski (dimeptr) wrote :

according to this documentation:
http://doc.qt.io/qt-5/qtglobal.html#qDebug
which is also referenced in the link you provided it says that if you write:
qDebug() << "Debug" there should be output unless QT_NO_DEBUG_OUTPUT is defined.
there is no mention that the logging category filters this messages, I guess in this case the category is "default"
If you consider this a QT documentation problem, I will write a separate report to QT bug tracking system.

Yusef Maali (usef) wrote :

I upgraded from 17.04 to 17.10 just yesterday and I was affected from the same issue.

I'm sorry to say, @mitya57, you intentionally broke the qDebug _default_ behaviour (and Fedora as well).
qDebug()'ing something should result in printing in the console output.

If there's issues with some applications that result in too much verbose output, should be fixed in those applications, not shutting up the whole QT qDebug.

Anyway, this should be warned to the user in some way during the upgrade.

just my 2 cents.

Dmitry Shachnev (mitya57) wrote :

The qt.conf file will be removed in Ubuntu 18.04, see https://bugs.debian.org/886437. Already fixed in bionic-proposed.

Changed in qtbase-opensource-src (Ubuntu):
status: Invalid → Fix Committed
Dmitry Shachnev (mitya57) wrote :

This was fixed in qtbase-opensource-src 5.9.3+dfsg-0ubuntu2 and newer versions in Ubuntu 18.04.

Changed in qtbase-opensource-src (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.