Can not choose files to compare with "Compare files" on panel. Reproducible: Always Steps to Reproduce: 1. Start Kompare 2. Choose 2 files to compare (ex. txt file foermat) 3. Click "Compare files" on panel 4. Click "Browse file" on Source 5. No ability to choose any txt file Actual Results: No ability to choose files Expected Results: Ability to choose files.
I can confirm. First time you start application, you are able to choose files in dialog. But when you want to compare another files while main window of application exists, you cannot see files in dialog. You can still type file name manually in name field, if you remember how file is named. I suspect that wrong filter (or how it is called) is used. It displays only catalogs, but not files.
Created attachment 99190 [details] Patch to allow selecting files It's the same problem as in bug#351782. Making the same change in slotFileCompareFiles() and slotFileBlendURLAndDiff() (in kompare_shell.cpp) would "fix" it (see attached patch), but then you can't open/compare directories any more. Also, IMHO kompare does nothing wrong. It does set the options to allow selecting files *and* folders, somehow this results in files not being displayed. For me it seems to be a bug in the file dialog/KUrlRequester. Maybe this is not supported any more, KUrlRequester uses QFileDialog in KF5, while it used KFileDialog in KDE4... QFileDialog apparently just does not allow to select files and directories at the same time. Maybe an acceptable fix would be to offer two buttons in the "Compare Files" dialog, one to choose a file and one to choose a directory?
Thank you for patch. I think adding additional button called "Compare Directories" is nice solution for now. But I think the whole behavior of comparing directories should be changed. I mean now when I prompt from terminal "konsole dir_a dir_b", then it only will show one file at a time. I cannot see directory structiure, but can only swith to next file. I saw how it was implemented in Beyond Compare (proprietary analog of Kompare). It uses tree structure view, base directories are located in left and right separated panels (there is such view in dolphin), and directories, which contains not-identical files are markered with special color. And when you click file in that structure, actuall diff will open in new tab. And some other cool features, like choosing what to show: only non-identical, only identical or all. But for now, we should at least recover broken functionality. Do you know how to add a new button? Btw, in start dialog you should be able to start from comparing folder dialog.
You shouldn't be able to select directories. Kompare used to just crash if you tried to compare directories.
(In reply to Kevin Kofler from comment #4) > You shouldn't be able to select directories. Kompare used to just crash if > you tried to compare directories. No, I am able to compare two directories if I use terminal. Also, in wikipedia they say about it: https://en.wikipedia.org/wiki/Kompare#Comparing_directories
(In reply to Wolfgang Bauer from comment #2) > Maybe an acceptable fix would be to offer two buttons in the "Compare Files" > dialog, one to choose a file and one to choose a directory? This has been done now: https://phabricator.kde.org/D5096 And that fixes the problem reported here as well. (it also reverts the "fix" for bug#351782, as it is possible to choose both files *and* folders now)