Bug 322644 - on drag+drop shows a green + if I do not have write/create permissions
Summary: on drag+drop shows a green + if I do not have write/create permissions
Status: RESOLVED INTENTIONAL
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-21 08:43 UTC by Arne Babenhauserheide
Modified: 2013-08-25 13:53 UTC (History)
1 user (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 Arne Babenhauserheide 2013-07-21 08:43:28 UTC
drag a file from an FTP to a folder where I do not have write permissions. Result: shows a green +. Does not do anything on drop.

Should not show the + or it should indicate that it cannot act.

Reproducible: Always
Comment 1 Emmanuel Pescosta 2013-07-21 09:30:55 UTC
Hello, thanks for the bug report!

I can't reproduce it in Dolphin 4.10.95

Can you please give us some infos about your Dolphin settings (View Mode, ...) and maybe provide a screenshot if possible? - That would be great :)
Comment 2 Christoph Feck 2013-07-21 19:23:29 UTC
I can reproduce on today's master.

Trying to drop anything to / (root) as a user, does not show the "forbidden" drop cursor. Both for dropping into a visible view, as well as dropping on the Root place in the places panel.
Comment 3 Emmanuel Pescosta 2013-07-21 20:42:34 UTC
Thanks for your feedback.

> does not show the "forbidden" drop cursor
Hmm okay, but that is another bug I think, because this bug report is about a green +.

> I can reproduce on today's master.
I can't see a green selection toggle (+) when I drag/drop items onto non-writable items, can you?
Comment 4 Arne Babenhauserheide 2013-07-21 21:35:10 UTC
I drag from an FTP-server to a local disk, maybe that is the difference.
Comment 5 Frank Reininghaus 2013-07-22 16:10:42 UTC
The green "+" (selection toggle) appears when you drag to another Dolphin window.

From

void KItemListWidget::setHovered(bool hovered):

        if (m_enabledSelectionToggle && !(QApplication::mouseButtons() & Qt::LeftButton)) {
            initializeSelectionToggle();
        }

So it seems that QApplication::mouseButtons() returns an incorrect value in the application that something is dragged to. A Qt bug in my opinion. We had the very same problem some time ago with the keyboard modifiers (bug 178679), fixed by dfaure in Qt.

About the "no drop forbidden cursor": to my knowledge, Dolphin has never shown "drop forbidden" cursors anywhere. There was even a good reason for that, I think, but I'm not quite sure at the moment. I'm not entirely sure if there is some report about that already.
Comment 6 Emmanuel Pescosta 2013-07-22 17:34:22 UTC
> drag to another Dolphin window.
Ok when I drag it to another Dolphin window I can reproduce it too, but it works in split view mode.
Comment 7 Christoph Feck 2013-07-23 10:56:51 UTC
Oh, I use a non-standard cursor theme, and had the impression the default copy cursor included a green + (mine has a black +)

Sorry for the confusion :)
Comment 8 Frank Reininghaus 2013-08-24 18:59:30 UTC
Another symptom of the incorrect value returned by QApplication::mouseButtons() is bug 271325.

We should write a simple test case and submit a Qt bug report.
Comment 9 Frank Reininghaus 2013-08-25 12:23:48 UTC
Reported to Qt: https://bugreports.qt-project.org/browse/QTBUG-33161
Comment 10 Frank Reininghaus 2013-08-25 13:53:30 UTC
Apparently the behavior of QApplication::mouseButtons() is intentional. Therefore, we could only fix this by using something different to find the current state of the mouse buttons. I am not planning to do this (I don't even know if there is a good cross-platform way to do that), so the correct resolution is WONTFIX.

Sorry about that.