Bug 374248

Summary: importing photo, bad native file selector dialog (GTK based)
Product: [Applications] digikam Reporter: Philippe ROUBACH <philippe.roubach>
Component: Bundle-AppImageAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 5.8.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In: 5.8.0
Sentry Crash Report:
Attachments: digikam file selector
dolphin file selector
true dolphin file_selector
digikam settings miscellaneaous

Description Philippe ROUBACH 2016-12-28 10:53:03 UTC
Created attachment 103039 [details]
digikam file selector

if i import photos or folder
then
i get a file selector which is not dolphin and which is not populated with user or system shortcuts
then
i can't reach:
- easily any folder
- my smartphone connected via wifi with kdeconnect or via bluetooth with bluedevil
Comment 1 Philippe ROUBACH 2016-12-28 10:53:38 UTC
Created attachment 103040 [details]
dolphin file selector
Comment 2 caulier.gilles 2016-12-28 10:55:10 UTC
digiKam use Qt5 dialog to be compatible everywhere. KDE dialog is deprecated since version 5


Gilles Caulier
Comment 3 Philippe ROUBACH 2016-12-28 11:36:55 UTC
ok for a qt file selector
but
you don't answer about populating it with user and system shortcut
and in particular
bluedevil or kdeconnect shortcut
Comment 4 caulier.gilles 2016-12-28 11:49:41 UTC
As i know, Qt5 file dialog do not permit this yet.

If you want this feature report as upstream to Qt bugzilla.

Note : the screenshot that you provide is a dolphin main view, not a file dialog.

Gilles Caulier
Comment 5 Philippe ROUBACH 2016-12-28 11:57:08 UTC
Created attachment 103042 [details]
true dolphin file_selector

treu dolphin file selector

you cab see it is the same thing about shortcuts
Comment 6 Philippe ROUBACH 2016-12-28 13:17:22 UTC
qt answer
here https://bugreports.qt.io/browse/QTBUG-57828

"This is not a Qt problem at all. The KDE theme plugin didn't get loaded."
Comment 7 caulier.gilles 2016-12-28 14:19:55 UTC
I'm not wrong. I check GwenView code. Open/File give a similar dialog that you attach in this report. Gwenview code use KFileDialog, which is relevant of KDELibsSupport.

digiKam is a pure Qt5/KF5 application. We drop all KDE4 deprecated API. We will not go back. Never.

If Qt5::QFileDialog support native theme, why not. But here this do not work.

In digiKam we have QFileDialog option DontUseNativeDialog turned on, which must be disabled in this case. I will patch source code in this way. But as i said, this do not change anything here. Perhaps something need to be installed in Plasma desktop to take effect. I don't know.

Gilles Caulier
Comment 8 caulier.gilles 2016-12-28 14:20:29 UTC
Git commit 0a5615d18d5e697e19e5c90fea1e3e4987e2db2c by Gilles Caulier.
Committed on 28/12/2016 at 14:20.
Pushed by cgilles into branch 'master'.

permit to use native file dialog

M  +0    -1    app/main/digikamapp.cpp
M  +0    -1    libs/dialogs/imagedialog.cpp
M  +7    -4    libs/widgets/common/dwidgetutils.cpp
M  +1    -1    utilities/assistants/firstrun/collectionpage.cpp
M  +0    -1    utilities/imageeditor/editor/editorwindow.cpp

https://commits.kde.org/digikam/0a5615d18d5e697e19e5c90fea1e3e4987e2db2c
Comment 9 Philippe ROUBACH 2016-12-28 15:06:18 UTC
please if you have technical argument please discuss with qt team.
i suppplied the address of the qt answer. there is the address of the person who answered.

don't play ping pong with me.

i am not a techie. i am only a user who want an app easy to use.

thanks
Comment 10 Maik Qualmann 2017-01-03 19:06:13 UTC
Gilles,

The native file dialog works here under openSUSE. I see the KDE file dialog. But see Bug 373820. If the native file dialog under Debian problem makes, we get a problem with digiKam-5.4.0 release. My suggestion, we use for digiKam-5.4.0 the pure Qt file dialog. And look for a way to recognize the running desktop (possible with Qt >= 5.7.0) and use only the native file dialog if a Plasma desktop is present.

Maik
Comment 11 caulier.gilles 2017-01-03 19:35:38 UTC
Hi Maik, and Happy new year...

I don't know if Plasma desktop detection was possible with Qt5.7. This work around is fine for me.

Gilles
Comment 12 Maik Qualmann 2017-01-03 20:44:50 UTC
Gilles,

Thanks, Happy New Year to you. You're right there is no way with Qt-5.7.0 to recognize the desktop. I find another way.

Maik
Comment 13 caulier.gilles 2017-01-03 21:46:52 UTC
Maik,

Dbus can be a solution. Not perfect so far, but look here :

https://cgit.kde.org/digikam.git/tree/libs/notificationmanager/dnotificationwrapper.cpp#n87

Take a care : Dbus is optional in digiKam.

Gilles
Comment 14 Philippe ROUBACH 2017-02-25 12:20:47 UTC
there is no more problem in my case with digikam 5.4.0
Comment 15 Philippe ROUBACH 2017-12-15 12:04:09 UTC
i re-open this bug report

opensuse 42.3
kde apps 17.12.0
kde framework 5.40
qt 5.10.0

problem re-appears with 5.7.0 and still there with 5.8 2017 12 12
Comment 16 Maik Qualmann 2017-12-15 12:10:19 UTC
Please look in the digiKam settings under miscellaneous. There you can activate the system file dialog.

Maik
Comment 17 Philippe ROUBACH 2017-12-15 12:21:09 UTC
Created attachment 109386 [details]
digikam settings miscellaneaous

digikam 5.7.0 (rpm)

there is nothing about "file system dialog" in "miscellaneous"
Comment 18 Maik Qualmann 2017-12-15 12:23:21 UTC
Fixed in digiKam-5.8.0.

Maik
Comment 19 Philippe ROUBACH 2017-12-15 12:38:22 UTC
digikam 5.8.0 2017 12 12 bundle

i check "use system file dialog"
then
i import file or folder
then
no system file dialog
Comment 20 Maik Qualmann 2017-12-15 15:38:16 UTC
I'll check it again with the AppImage tonight. But it works with the native version for Linux / Mac / Windows. I also use the system file dialogs.

Maik
Comment 21 Maik Qualmann 2017-12-15 17:33:48 UTC
Ok, AppImage does not include the Qt-Plugins for native file dialogs. I do not think we will change that, we would also have to include the dialogue for GTK, for example. DigiKam-5.8.0 will be released next week.

Maik
Comment 22 caulier.gilles 2017-12-15 19:46:54 UTC
Maik,

Qt-Plugins for native file dialogs ? I don't know this feature was supported by a plugin.

Which one exactly ? Has i compile the whole Qt5 bundle as well, with some tune at configuration time, this can be certainly fixed quickly if i know which option i need to turn on.

https://cgit.kde.org/digikam-software-compilation.git/tree/project/bundles/3rdparty/ext_qt/CMakeLists.txt

Or perhaps it's an extra source code provided outside Qt ? If yes, it can be easy to add the code to compile from the main rules with cmake. As i use Centos6, all GTK is already here. I think it can be easy to do.

Gilles
Comment 23 Maik Qualmann 2017-12-15 20:12:46 UTC
As an example for my openSUSE:

Support for GTK3:
/usr/lib64/qt5/plugins/platformthemes/libqgtk3.so

GTK2:
/usr/lib64/qt5/plugins/platformthemes/libqgtk2.so

KF5 Plasma:
/usr/lib64/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so

If I remove the KF5 plugin, I only have a Qt file dialog.

Maik
Comment 24 caulier.gilles 2017-12-15 22:18:30 UTC
Ok, i see... I will take a look while this week end.

Gilles
Comment 25 caulier.gilles 2017-12-17 15:08:01 UTC
The *gtk* platforms plugins sound like generated by qt5core if gtk dependencies are enabled (currently no).

I will integrated this for later 5.9.0 release when i will update Qt5 to last stable 5.10.0.

Gilles Caulier