Compiled from git master today. Debian testing/unstable. When I call File -> Open, Save, Export, the file dialog: 1. Does not show anything in file list pane, whatever I select in "files type" combobox. 2. Shows only some file types available for export to. Reproducible: Always Steps to Reproduce: 1. Launch krita 2. draw something 3. go to file -> export or file -> save
Created attachment 98466 [details] Export file dialog example Selected directory actually contains a lot of files in different formats.
Fragment of stderr output: ("image/webp", "image/x-r16", "image/x-xbitmap", "image/openraster", "text/x-qml", "image/tiff", "application/x-extension-exr", "image/png", "image/vnd.adobe.photoshop", "image/x-gimp-brush", "text/csv", "image/vnd.microsoft.icon", "image/x-portable-bitmap", "image/bmp", "application/x-krita", "image/x-portable-pixmap", "image/jpeg", "image/x-gimp-brush-animated", "image/x-exr", "image/x-tga", "image/x-xpixmap", "image/x-portable-graymap", "application/x-spriter", "image/jp2", "image/x-r8") No file found for ".xml" , even though update-mime-info said it would exist. Either it was just removed, or the directory doesn't have executable permission...
Created attachment 98467 [details] Full stderr log Attaching full log from stdout&stderr. The desktop environment is not KDE, but Dolphin (5) launches and works very well, and shows all thumbnails.
Which desktop environment are you using? There are three dialogs possible on Linux, the GTK, Qt and KDE one, and all have different bugs.
This is "self-made" desktop environment. I use XMonad as WM, some KDE apps and some GTK apps. Also, I have XDG_CURRENT_DESKTOP=KDE.
I can't say exactly which dialog is used - it may be Qt's or KDE's one.
The XDG setting means the KDE dialog is selected -- I wonder whether that works. In any case, I'm trying to reproduce and debug.
Git revision bae990e... is "good", file dialog works in it. It seems I have to do git bisect, but building krita each time takes so much time... :/
So, I finally run git bisect, and the result is: 5ef533050cd4206353b44fecd4f06edd6e94e729 is the first bad commit commit 5ef533050cd4206353b44fecd4f06edd6e94e729 Author: Boudewijn Rempt <boud@valdyas.org> Date: Wed Apr 6 20:57:52 2016 +0200 Find all the languages so the language chooser is shown Make sure that on all platforms the local xdg_data_dirs is part of the environment variable, the one that is bin'../share or MacOS/../share. And remove the kauthorized stuff as well. Nobody is going to disable anything in the help menu in krita in any kind of kiosk situation. :040000 040000 1daa8888b4b1c7328743631461c0f7dc61e61905 b89d6b0304263dda7fc9a7ccb4fc14c3f248b00e M libs
"Suspected" part of that commit is + #ifdef Q_OS_LINUX + qputenv("XDG_DATA_DIRS", QFile::encodeName(KoResourcePaths::getApplicationRoot() + "/share") + ":" + qgetenv("XDG_DATA_DIRS")); +#else + qputenv("XDG_DATA_DIRS", QFile::encodeName(KoResourcePaths::getApplicationRoot() + "/share")); +#endif + //qDebug() << "Setting XDG_DATA_DIRS" << qgetenv("XDG_DATA_DIRS"); In my environment, I have XDG_DATA_DIRS not set.
Well, following is pretty simple patch against git master which resolves the bug in my case: diff --git a/krita/main.cc b/krita/main.cc index 7f79ddf..d1752dc 100644 --- a/krita/main.cc +++ b/krita/main.cc @@ -112,7 +112,7 @@ extern "C" int main(int argc, char **argv) KisApplication app(key, argc, argv); #ifdef Q_OS_LINUX - qputenv("XDG_DATA_DIRS", QFile::encodeName(KoResourcePaths::getApplicationRoot() + "share") + ":" + qgetenv("XDG_DATA_DIRS")); + //qputenv("XDG_DATA_DIRS", QFile::encodeName(KoResourcePaths::getApplicationRoot() + "share") + ":" + qgetenv("XDG_DATA_DIRS")); #else qputenv("XDG_DATA_DIRS", QFile::encodeName(KoResourcePaths::getApplicationRoot() + "share")); #endif
But we cannot just not set that because that means the translations cannot be found. And I don't get how this can break the KDE file dialog either...
I think it depends somehow on DE running. Maybe KDE sets XDG_DATA_DIRS somehow. On my configuration XDG_DATA_DIRS is not set and everything works somehow. It may be also important that I install krita by running make install with custom installation directory (smth like /home/portnov/soft/krita).
I still don't know what's up, but the only way I can reproduce it is in a fedora 23 live session. The file dialog is completely broken there.
Git commit 2b35122a513c062a28e302e86c6c5d18cdb3d594 by Boudewijn Rempt. Committed on 02/05/2016 at 10:41. Pushed by rempt into branch 'master'. Remove the shared mime dir when packaging On Redhat-based distributions, having an extra mime dir in the XDG_DATA_DIRS confuses the file dialog into not being able to retrieve any mimetype. Is it a Qt bug? Is it a Redhat bug? I don't know, but removing the mimedir makes everything work again, and we don't use our own mimetype definitions anyway, we have a fallback for them because QMimeDatabase is too stupid to allow us to add mimetypes programmatically. We still want to install our own mimetypes, or rather, I suspect distributions want us to, so we cannot just skip that. But if you build on redhat-derived distributions, you'll have to manually remove the mime dir every time after doing a make install. M +3 -0 linux/build-image.sh http://commits.kde.org/krita/2b35122a513c062a28e302e86c6c5d18cdb3d594
Git commit d9c68ec2f32e7db3564db1f269500ac0fa4bd57b by Boudewijn Rempt. Committed on 02/05/2016 at 12:27. Pushed by rempt into branch 'master'. This should fix bug 361973 even for people who build Krita on their own. It must be a bug somewhere in Qt, and a recent regression, too. Just stopping to use QMimeDataBase doesn't fix it, since it's some Qt-internal usage that breaks everything in QFileDialog if there is a mime directory in the XDG_DATA_DIRS. M +0 -6 CMakeLists.txt M +0 -1 krita/data/CMakeLists.txt D +0 -9 krita/data/mime/CMakeLists.txt D +0 -36 krita/data/mime/krita.xml D +0 -7 krita/data/mime/x-gimp-brush-animated.xml D +0 -8 krita/data/mime/x-gimp-brush.xml M +0 -3 linux/build-image.sh M +0 -5 plugins/flake/vectorshape/CMakeLists.txt D +0 -13 plugins/flake/vectorshape/krita_svm.xml M +0 -5 plugins/impex/ora/CMakeLists.txt D +0 -18 plugins/impex/ora/krita_ora.xml http://commits.kde.org/krita/d9c68ec2f32e7db3564db1f269500ac0fa4bd57b