make sure the cancel action is last
ClosedPublic

Authored by mart on Feb 23 2017, 12:00 PM.

Details

Summary

when adding extra actions to the drop menu,
even if the menu was already shown, the cancel action should be the
last anyways for usability reasons

Test Plan

drop menu from folderview gets populated correctly

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Feb 23 2017, 12:00 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptFeb 23 2017, 12:00 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dfaure edited edge metadata.Feb 23 2017, 12:13 PM

I like the encapsulation into a different class.

src/widgets/dropjob.cpp
63

nullptr

171

unnecessary copying (refcounting), the two QLists should be passed as const ref.

177

(which would avoid the detaching here)

353–354

please clean up

src/widgets/dropjob.h
38 ↗(On Diff #11674)

I don't think this is needed, nothing else in the header refers to it (I guess it was an initial solution with private slots that you then moved to the private class)

mart updated this revision to Diff 11682.Feb 23 2017, 1:21 PM
  • adress comments
dfaure added inline comments.Feb 23 2017, 1:42 PM
src/widgets/dropjob.h
38 ↗(On Diff #11682)

still here?

mart marked 4 inline comments as done.Feb 28 2017, 11:12 AM
mart added inline comments.
src/widgets/dropjob.h
38 ↗(On Diff #11682)

used for class KIO::DropMenu : public QMenu in dropjob.cpp,
doesn't compile otherwise

dfaure added inline comments.Feb 28 2017, 11:56 AM
src/widgets/dropjob.h
38 ↗(On Diff #11682)

Not a good enough reason to have it in the public header (which doesn't use it anywhere), you can move that fwd decl to the .cpp file.

mart updated this revision to Diff 11942.Feb 28 2017, 12:01 PM

remove dropmenu declaration from public header

mart marked an inline comment as done.Feb 28 2017, 12:01 PM
mart added inline comments.
src/widgets/dropjob.h
38 ↗(On Diff #11682)

done

dfaure accepted this revision.Feb 28 2017, 12:02 PM
This revision is now accepted and ready to land.Feb 28 2017, 12:02 PM
This revision was automatically updated to reflect the committed changes.
mart marked an inline comment as done.