Manage the use of Shift+F4 when opening a local file that exists, or a remote folder or remote file that exists
ClosedPublic

Authored by asensi on Sat, Feb 8, 7:37 PM.

Details

Summary

This modification achieves that, for example, when users press Shift+F4 and paste the path of a local existent file like /etc/passwd, that file gets edited (instead of not getting opened and the user not getting informed about it). It also manages the cases of remote files.

FIXED: [ 417319 ] Problems when using Shift+F4 to open a local file that exists, or a remote folder or remote file that exists
BUG: 417319

Test Plan

Using Shift+F4 to try to open a:

  • local file that exists: /etc/passwd
  • local file that doesn't exist: /tmp/nonexistent
  • local folder that exists: /etc (Krusader has to say "You cannot edit a folder."
  • remote file that exists: smb://user@IP_ADDRESS/PATH/EXISTENT_FILE
  • remote file that doesn't exist : smb://user@IP_ADDRESS/NONEXISTENT
  • remote file that exists: fish://user@IP_ADDRESS:PORT/PATH/EXISTENT_FILE
  • remote file that doesn't exist : fish://user@IP_ADDRESS:PORT/NONEXISTENT
  • remote folder that exists: smb://user@IP_ADDRESS/PATH/EXISTENT_FOLDER
  • remote folder that exists: fish://user@IP_ADDRESS:PORT/PATH/EXISTENT_FOLDER

Performing the tests using the default internal editor and also /usr/bin/kate.

Performing the tests using a system with a Qt version older than 5.11 (like Kubuntu 18.04 LTS) and a system with a Qt version equal or newer than 5.11 (like Kubuntu 19.10) because of a #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0).

Editing the existing files, but using F4 instead of Shift+F4.

Diff Detail

Repository
R167 Krusader
Lint
Lint Skipped
Unit
Unit Tests Skipped
asensi requested review of this revision.Sat, Feb 8, 7:37 PM
asensi created this revision.
yurchor added a subscriber: yurchor.Sat, Feb 8, 8:24 PM

Tested to work as expected.

+1

gengisdave accepted this revision.Sat, Feb 15, 11:24 AM
gengisdave added a subscriber: gengisdave.

Compiled and tested on QT 5.14.1, QT 5.9.5 (Ubuntu 18.04) and QT 5.12.4 (Ubuntu 19.10); all fine

This revision is now accepted and ready to land.Sat, Feb 15, 11:24 AM
asensi closed this revision.Sat, Feb 15, 5:25 PM

Thanks, Yuri and Davide!

Note: There are related changes in https://phabricator.kde.org/D27446