Bug 343495 - Files can't be deleted
Summary: Files can't be deleted
Status: RESOLVED DUPLICATE of bug 344969
Alias: None
Product: frameworks-kjobwidgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 343721 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-29 03:24 UTC by Alexander Nestorov
Modified: 2015-10-17 13:38 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nestorov 2015-01-29 03:24:16 UTC
When using Folder View I  can't delete files (not the same as move them to the trash).
Normally I'd "Shift + Del" after selecting a file, but that shortcut just doesn't work in the Folder View, nor there is an option to delete the file (there is an option to send the file to the trash).

Reproducible: Always
Comment 1 Eike Hein 2015-01-29 13:07:32 UTC
This is because we don't have support for KStandardAction in QML and upstream Qt's standard shortcut mechanic that our QPA plugin maps back to KStandardAction doesn't understand the difference between Move to Trash and Delete. I have decided not to hack around this, i.e. we need to fix Qt somehow.
Comment 2 Eike Hein 2015-01-29 13:11:05 UTC
Oh and note you can find "Delete" in the context menu of course if showing it is enabled in Dolphin (all file manager context menus share this config source).
Comment 3 Alexander Nestorov 2015-01-29 13:20:42 UTC
No, I can't. There isn't such an option in the folder view widget, even after enabling it in Dolphin.
Clearly they don't share the same context menu. Please see https://www.youtube.com/watch?v=ekk7YPKxzNs
Comment 4 Eike Hein 2015-01-29 13:28:25 UTC
They don't (yet, although we're working on it); Folder View currently uses KonqOperations from libkonq for the context menu, as does Konqueror, although we hope to have all three use the same implementation by 5.3. That said, they ought to be using the same config source as mentioned (I didn't write "implementation").

Here's a screenshot: http://wstaw.org/m/2015/01/29/ctxt.png
Comment 5 Eike Hein 2015-01-29 13:32:13 UTC
The relevant config key is ShowDeleteCommand in kdeglobals, here's all its users:

http://lxr.kde.org/search?v=kf5-qt5&_filestring=&_string=ShowDeleteCommand
Comment 6 Eike Hein 2015-01-30 17:54:16 UTC
Backtrace, crash is in KDialogJobUiDelegate::Private::next():

Thread 1 (Thread 0x7f443a60b800 (LWP 16793)):
[KCrash Handler]
#6  0x00007f4433e365e7 in QMetaObject::indexOfMethod(char const*) const (this=0x0, method=0x7fff1a5f2f90 "next()") at kernel/qmetaobject.cpp:632
#7  0x00007f4433e38950 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) (obj=0x523bf60, member=0x7f443131a1b5 "next", type=Qt::QueuedConnection, ret=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:1464
#8  0x00007f4431306397 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) (obj=0x523bf60, member=0x7f443131a1b5 "next", type=Qt::QueuedConnection, val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at /home/sho/devel/src/qt5/qtbase/src/corelib/kernel/qobjectdefs.h:391
#9  0x00007f4431305b9e in KDialogJobUiDelegate::Private::next() (this=0x523bf60) at /home/sho/devel/src/frameworks/kjobwidgets/src/kdialogjobuidelegate.cpp:82
#10 0x00007f4431306169 in KDialogJobUiDelegate::Private::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x523bf60, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x46055f0) at /home/sho/devel/build/frameworks/kjobwidgets/src/kdialogjobuidelegate.moc:67
#11 0x00007f4433e68e0d in QMetaCallEvent::placeMetaCall(QObject*) (this=0x4362e90, object=0x523bf60) at kernel/qobject.cpp:485
#12 0x00007f4433e69ed6 in QObject::event(QEvent*) (this=0x523bf60, e=0x4362e90) at kernel/qobject.cpp:1245
#13 0x00007f44349595c8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0xfb9d30, receiver=0x523bf60, e=0x4362e90) at kernel/qapplication.cpp:3722
#14 0x00007f4434956d38 in QApplication::notify(QObject*, QEvent*) (this=0x7fff1a5f4350, receiver=0x523bf60, e=0x4362e90) at kernel/qapplication.cpp:3164
#15 0x00007f4433e2d4be in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7fff1a5f4350, receiver=0x523bf60, event=0x4362e90) at kernel/qcoreapplication.cpp:930
#16 0x00007f4433e3111f in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=0x523bf60, event=0x4362e90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:228
#17 0x00007f4433e2e7f7 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0xfaf6e0) at kernel/qcoreapplication.cpp:1534
#18 0x00007f4433e2e1a6 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1392
#19 0x00007f4433ea5ff2 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x1004430) at kernel/qeventdispatcher_glib.cpp:271
#20 0x00007f442c8c7aeb in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#21 0x00007f442c8c7e88 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#22 0x00007f442c8c7f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#23 0x00007f4433ea67ad in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xff75b0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#24 0x00007f441f3e0c7c in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xff75b0, flags=...) at eventdispatchers/qeventdispatcher_glib.cpp:115
#25 0x00007f4433e2a162 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fff1a5f41d0, flags=...) at kernel/qeventloop.cpp:128
#26 0x00007f4433e2a43b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fff1a5f41d0, flags=...) at kernel/qeventloop.cpp:204
#27 0x00007f4433e2db98 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1183
#28 0x00007f4434215b9e in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1507
#29 0x00007f4434956565 in QApplication::exec() () at kernel/qapplication.cpp:2956
#30 0x000000000046a1ac in main(int, char**) (argc=1, argv=0x7fff1a5f4918) at /home/sho/devel/src/kde/workspace/plasma-workspace/shell/main.cpp:150
Comment 7 Eike Hein 2015-01-30 18:15:20 UTC
Sigh - wrong bug again. I really need to fix my mail client sorry.
Comment 8 Alexander Nestorov 2015-02-02 02:17:11 UTC
Can I get this bug in a "Confirmed" state?
Comment 9 Eike Hein 2015-02-02 14:19:23 UTC
^ No, because "Delete" shows up fine here and changing the preference in Dolphin (the KF5 version of Dolphin, notably) correctly enables/disables it, also at runtime.

I'm not 100% sure what to do about the keyboard shortcut thing. The problem there is that Qt's standard action enum has no entry for it and KStandardActions doesn't either, moreover KStandardActions binds Shift+Del to cut by default - a proper solution will require changes in Qt in any case, but also figuring out how to resolve this conflict. It's more of a general platform problem that just happens to affect Folder, but I need to think a bit more before renaming+reassigning it.
Comment 10 Alexander Nestorov 2015-02-02 16:18:24 UTC
Well... It's not showing here, so the "It works fine on my machine" is not really the answer.
Is there a way I can test this using some kind of "vanilla" LiveCD? IMHO that is the best way to check if the bug is on my side or in Dolphin/Plasma.
Comment 11 Eike Hein 2015-02-02 16:21:00 UTC
The answer is most likely that you have a KDE 4 version of Dolphin and enabling Delete there writes to a config file not relevant to Plasma 5.

Kubuntu has a weekly liveCD built from git called "KCI", that might do the trick.
Comment 12 Eike Hein 2015-02-03 13:38:08 UTC
*** Bug 343721 has been marked as a duplicate of this bug. ***
Comment 13 Janek Bevendorff 2015-10-16 19:02:57 UTC
Is this the same issue as #344969 ?
Comment 14 Eike Hein 2015-10-17 13:38:23 UTC
Yup.

*** This bug has been marked as a duplicate of bug 344969 ***