Bug 481151 - cannot restore ktorrent window after closing
Summary: cannot restore ktorrent window after closing
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 24.01.95
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-10 00:03 UTC by fanzhuyifan
Modified: 2024-02-10 21:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fanzhuyifan 2024-02-10 00:03:31 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open ktorrent through application launcher
2. close the window
3. Repeat steps 1 and 2 until ktorrent window doesn't appear (for me it is always the third try)

OBSERVED RESULT
ktorrent window doesn't appear

EXPECTED RESULT
ktorrent window appears

SOFTWARE/OS VERSIONS

master build of ktorrent

Operating System: Arch Linux 
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.7.0
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i9-13900H
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Zephyrus G16 GU603VV_GU603VV
System Version: 1.0
ADDITIONAL INFORMATION
Comment 1 fanzhuyifan 2024-02-10 00:35:09 UTC
widget->show() is correctly called here: https://invent.kde.org/network/ktorrent/-/blob/master/ktorrent/main.cpp?ref_type=heads#L249
But the window isn't shown. This might be a Qt6.7 issue; would need to test on Qt6.6
Comment 2 Bug Janitor Service 2024-02-10 17:50:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/ktorrent/-/merge_requests/111
Comment 3 Andrius Štikonas 2024-02-10 21:56:12 UTC
Git commit e35b4881605f045ebe8bca2da357c2a3ae2f1e02 by Andrius Štikonas, on behalf of Yifan Zhu.
Committed on 10/02/2024 at 21:50.
Pushed by stikonas into branch 'master'.

Replace QWidget->show() with QWindow()->show()

efe4aa0dcc23e57e68ecd809068f1a49d7705a07 replaces many calls to
QWidget->show() with QWindow()->show(). Since mixing these is not
supported (https://bugreports.qt.io/browse/QTBUG-120316), replace the
remaining QWidget->show() with QWindow()->show() as well.

Test-plan:
- Enable KTorrent's system tray icon
- Close the main KTorrent window
- Execute ktorrent from the command line
- Close the main KTorrent window
- Execute ktorrent from the command line

Previously:
- After a few repeats ktorrent window doesn't show

Now:
- ktorrent window always shows after executing ktorrent

M  +2    -1    ktorrent/main.cpp

https://invent.kde.org/network/ktorrent/-/commit/e35b4881605f045ebe8bca2da357c2a3ae2f1e02