Bug 231915

Summary: [Testcase] Native style KFileDialog does not emit fileSelected() on Windows
Product: [Applications] kfile Reporter: Thomas Friedrichsmeier <thomas.friedrichsmeier>
Component: generalAssignee: KDE-Windows <kde-windows>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: Updated (KF5) testcase

Description Thomas Friedrichsmeier 2010-03-23 17:13:07 UTC
Version:            (using KDE 4.4.1)
OS:                MS Windows
Installed from:    MS Windows

Native style KFileDialogs on Windows do not emit KFileDialog::fileSelected(const QString&). Non-native KFileDialogs emit the signal as expected.

Testcase:
See attachment #42205 [details] on bug #231913 .

1) In System settings->Advanced->Platform check "Use native system file dialogs".
2) In the testcase application, click the second button from the top.
3) Select a file.
4) The label in the center of the app remains unchanged.
5) Uncheck "Use native system file dialogs" and restart the test application.
6) Click the second button again, and select a file. The label gets updated as expected.
Comment 1 Nate Graham 2018-04-13 16:39:34 UTC
Is this still an issue with KDE Frameworks 5.44 or greater?
Comment 2 Thomas Friedrichsmeier 2018-04-13 19:49:56 UTC
Created attachment 112014 [details]
Updated (KF5) testcase

This CMakeLists.txt can be used with the testcase save as testcase.cpp:

PROJECT(kfdtest)

FIND_PACKAGE(ECM 0.0.11 REQUIRED NO_MODULE)

SET(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

INCLUDE(KDEInstallDirs)
INCLUDE(KDECMakeSettings)
INCLUDE(KDECompilerSettings)
INCLUDE(FeatureSummary)

FIND_PACKAGE(Qt5 5.2 CONFIG REQUIRED COMPONENTS Widgets Core)
FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS KDELibs4Support)

ADD_EXECUTABLE(kfdtest testcase.cpp)
TARGET_LINK_LIBRARIES(kfdtest Qt5::Widgets KF5::KDELibs4Support)

FEATURE_SUMMARY(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
Comment 3 Thomas Friedrichsmeier 2018-04-13 19:52:20 UTC
Yes, this bug is still present (in KF5 5.43; let's not be silly in asking for the very latest, or it didn't happen).

See updated testcase, above.
Comment 4 Nate Graham 2018-04-16 17:46:55 UTC
Thanks for confirming! But I mean, are these issues still present in Windows if you use the KF5 dialog, not the one from kdelibs4 support?
Comment 5 Thomas Friedrichsmeier 2018-04-16 18:29:02 UTC
Is there any other KFileDialog beyond the one in kdelibs4support? (Which is a KF5 framework, of course; again, my testing was with version 5.43).

https://api.kde.org/frameworks/search.html?query=KFileDialog
Comment 6 Nate Graham 2018-04-16 18:39:17 UTC
These days it's recommended to create a QDialog, and let the KDE QPA theme take care of styling it to be all KDE-ish via plasma-integration: https://cgit.kde.org/plasma-integration.git/tree/src/platformtheme

Take a look at the kdeplatformfiledialogbase and kdeplatformfiledialoghelper files.

Those take care of presenting an appropriate KDE-specific file dialog when the app requests a QDialog.
Comment 7 Thomas Friedrichsmeier 2018-04-16 18:50:32 UTC
Well, this is not what this bug report is about. It is about the KFileDialog class, not about QFileDialog. And yes, I am aware that KFileDialog being in kdelibs4support is probably making this report a WONTFIX (explicitly, or factually), but the KFileDialog class is still alround, and it still has this bug (and also the two other ones I reported).

Note that "native" used to mean "without KDE styling" for KFileDialog. This has never been about KDE styled dialogs.
Comment 8 Nate Graham 2018-04-16 18:52:08 UTC
Yes, then I'm afraid we won't be able to address this, as the KDE4 stuff has been unsupported for several years.