[kdevelop] [Bug 397062] missing Qt5 QDebug output

2020-09-17 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=397062

Igor Kushnir  changed:

   What|Removed |Added

 CC||igor...@gmail.com

--- Comment #8 from Igor Kushnir  ---
Created attachment 131727
  --> https://bugs.kde.org/attachment.cgi?id=131727=edit
[PATCH] Execute Launch: show Qt log output in Run tool view

I have spent several hours testing when the output appears or not until I found
this bug report. This bug only happens if KDevelop itself is started from a
graphical environment rather than from a terminal, and the user launches a Qt
application via "Execute Launch" KDevelop action rather than "Debug Launch"
action. The issue is inherited by another KDevelop instance Execute-Launched
from KDevelop (a recursion of sorts).

I just implemented a fix for this issue that sets QT_FORCE_STDERR_LOGGING to 1
in the initial default environment profile and when the user creates a new
environment profile: see the attached
0001-Execute-Launch-show-Qt-log-output-in-Run-tool-view.patch.

However now I realize that a better fix is possible: add a checkbox on Launch
Configuration page with text "Show Qt log messages in Run tool view" and a
tooltip "Sets QT_FORCE_STDERR_LOGGING environment variable to 1" (or maybe a
more detailed explanation in the tooltip). The checkbox should be checked by
default. When KDevelop applies the selected environment profile to a launched
program and this new option in its launch configuration is on, it will silently
set one more hidden environment variable. This way the fix is retroactively
applied to all existing launch configurations without the need to manually add
the environment variable to all environment profiles configured in the past.
Plus the checkbox provides an opportunity to explain why the environment
variable is needed, as opposed to simply specifying it in the unconfigured
default and new environment profiles.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-16 Thread Matthew Woehlke
https://bugs.kde.org/show_bug.cgi?id=397062

--- Comment #7 from Matthew Woehlke  ---
> Presumably, if you run your app like `theapp >&- 2>&-` it will write to 
> journald

Well, I thought that would work, but apparently not. I did confirm, however,
that a simple app for me is *not* producing output that is visible in KDevelop
(I *do* see the output in journalctl). I also see the output if I run the app
from Konsole (i.e. "a real tty"), or if I set QT_LOGGING_TO_CONSOLE=1.

In any case, I'm getting at least some output from KDevelop itself in
journalctl; if you're running that, and especially if you're running plasma and
other KDE apps, it should be pretty obvious if you have QDebug stuff going to
journald. If you *don't* see bunches of Qt/KDE stuff in journalctl, you
probably don't have QDebug using journald.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-16 Thread Matthew Woehlke
https://bugs.kde.org/show_bug.cgi?id=397062

--- Comment #6 from Matthew Woehlke  ---
Presumably, if you run your app like `theapp >&- 2>&-` it will write to
journald, and thus you could do so and expect that you can see your message in
`journalctl`. (For that matter, there should be a bunch of Qt/KDE stuff in
there, *if* Qt is using it.)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-16 Thread Omar
https://bugs.kde.org/show_bug.cgi?id=397062

--- Comment #5 from Omar  ---
KDevelop spits this while compiling
`g++ -Wl,-O1 -o second build/main.o   -lQt5Widgets -lQt5Gui -lQt5Core -lGL
-lpthread `
so this should be a is a qt5 project

I could not find a way of knowing whether Qt was build with journald support or
not, so...I might use a little help. I am running KDE Neon Dev edition, if that
might help. I suppose that I could just test on a fedora VM just to be sure.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-16 Thread Matthew Woehlke
https://bugs.kde.org/show_bug.cgi?id=397062

--- Comment #4 from Matthew Woehlke  ---
Omar, is your test app Qt4 or Qt5? If Qt5, was Qt built with journald support?
Qt4 works, Qt5 depends on if it was built with journald support (as e.g.
Fedora's package is).

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-15 Thread Omar
https://bugs.kde.org/show_bug.cgi?id=397062

--- Comment #3 from Omar  ---
Is this what the bug is about, because it seems to be working fine for me.

here KDevelop is writing the qDebug output to the application output without
setting any env vars.

I am on KDE Neon unstable, KDevelop v5.2.3

---
Please excuse any silly mistakes, this is my fist time using Qt or C++, and my
first day being evolved with KDE.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-15 Thread Omar
https://bugs.kde.org/show_bug.cgi?id=397062

Omar  changed:

   What|Removed |Added

 CC||elrefaei.o...@gmail.com

--- Comment #2 from Omar  ---
Created attachment 114450
  --> https://bugs.kde.org/attachment.cgi?id=114450=edit
kdevelop-qdebug-output-working

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-15 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=397062

Kevin Funk  changed:

   What|Removed |Added

 Status|UNCONFIRMED |CONFIRMED
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 397062] missing Qt5 QDebug output

2018-08-15 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=397062

Kevin Funk  changed:

   What|Removed |Added

   Keywords||junior-jobs

--- Comment #1 from Kevin Funk  ---
Happy to receive patches for this!

-- 
You are receiving this mail because:
You are watching all bug changes.