Bug 385280 - digikam does not use the native Plasma file dialog under Plasma
Summary: digikam does not use the native Plasma file dialog under Plasma
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Ergonomy (show other bugs)
Version: 5.8.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-01 22:29 UTC by Luca Beltrame
Modified: 2018-03-27 15:51 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2017-10-01 22:29:19 UTC
As the subject says, the file dialog is explicitly set as non-native:

https://github.com/KDE/digikam/blob/40b5bdf3139b142f3cbc6df23e10d64d9321fbc8/libs/widgets/files/dfiledialog.cpp#L37

This means that all the advanced features (and desktop consistency) of KFileDialog are unavailable when running on Plasma, since the QPA plugin is not used.

Is there a true, practical reason for this?
Comment 1 Maik Qualmann 2017-10-02 17:19:32 UTC
Yes, we do not use the native file dialogs, because it is e.g. under Ubuntu leads to a crash. However, I have meant that plasma users want native file dialogs. Gilles, therefore my suggestion, we make it as a compile option activatable. Patch is already in process.

Maik
Comment 2 Fabian Vogt 2017-10-02 17:35:18 UTC
(In reply to Maik Qualmann from comment #1)
> Yes, we do not use the native file dialogs, because it is e.g. under Ubuntu
> leads to a crash. However, I have meant that plasma users want native file
> dialogs. Gilles, therefore my suggestion, we make it as a compile option
> activatable. Patch is already in process.

A compile option doesn't make much sense IMO, it needs to do runtime detection.
openSUSE for example offers a multitude of desktops you can run digikam on.
You can probably query whether a metaobject for KFileDialog is registered...
Comment 3 Luca Beltrame 2017-10-02 18:20:18 UTC
(In reply to Maik Qualmann from comment #1)
> Yes, we do not use the native file dialogs, because it is e.g. under Ubuntu
> leads to a crash. However, I have meant that plasma users want native file

Is the crash in Qt, or in KDE software? Has a bug been reported? If it's in our software (KDE) we should *fix* it instead of working it around.
Comment 4 caulier.gilles 2017-10-02 18:29:50 UTC
Hi Maik,

Why not an option in setup/Miscs instead a compilation option ? After all it's a runtime problem...

Gilles
Comment 5 Maik Qualmann 2017-10-02 19:29:04 UTC
Luca,

it crashes into Gtk. Yes Gilles, You're right I'm making an option in setup/Miscs.

Maik
Comment 6 Maik Qualmann 2017-10-03 08:10:18 UTC
Git commit 0467f7c6e2ab191468d8d25061c6afc9b2d32134 by Maik Qualmann.
Committed on 03/10/2017 at 08:09.
Pushed by mqualmann into branch 'master'.

use of native file dialogs is now configurable
FIXED-IN: 5.8.0

M  +2    -3    NEWS
M  +2    -0    libs/settings/applicationsettings.cpp
M  +3    -0    libs/settings/applicationsettings.h
M  +10   -0    libs/settings/applicationsettings_miscs.cpp
M  +3    -0    libs/settings/applicationsettings_p.cpp
M  +6    -3    libs/settings/applicationsettings_p.h
M  +39   -12   libs/widgets/files/dfiledialog.cpp
M  +4    -0    libs/widgets/files/dfiledialog.h
M  +29   -13   showfoto/main/showfotosettings.cpp
M  +6    -3    showfoto/main/showfotosettings.h
M  +13   -7    showfoto/setup/showfotosetupmisc.cpp
M  +6    -0    utilities/setup/setupmisc.cpp

https://commits.kde.org/digikam/0467f7c6e2ab191468d8d25061c6afc9b2d32134
Comment 7 acidrums4 2018-03-27 14:58:56 UTC
Hmmm... At least for me with Digikam 5.9 (updated yesterday), both Digikam (at least when selecting a location for a local collection) and Showfoto (on opening/saving images) are using the default Qt selection dialog rather than Plasma one... This is under Gentoo.

I'm not switching this bug to "reopened" (it would be rude from my part) but hope you take a closer look on this. I really hoped this was fixed on 5.8, but as 5.9 arrived and it's still the same...
Comment 8 Maik Qualmann 2018-03-27 15:44:16 UTC
Did you activate the option for the native file dialog in the digiKam Setup-> Miscellaneous?

Maik
Comment 9 acidrums4 2018-03-27 15:48:31 UTC
(In reply to Maik Qualmann from comment #8)
> Did you activate the option for the native file dialog in the digiKam
> Setup-> Miscellaneous?

Sweet mother of Qt, I'm so embarrased. I didn't noticed that. Thank you so much :)
Comment 10 Maik Qualmann 2018-03-27 15:51:58 UTC
The same for the showFoto setup. :-)

Maik