[WIP]Show more details in warning dialog shown before starting a privileged operation
Needs RevisionPublic

Authored by chinmoyr on Jun 13 2019, 4:13 PM.

Details

Summary

Currently it uses the dialog from D21782 to provide the current action being performed, the source file and any
action specific detail.

The initial plan was to show all the files needing elevated privileges but due to KIO jobs processing one file at
a time only limited info could be provided. There's also the option for determing this during the stat phase but it
caused my VM to slow down to a crawl. Any more ideas here?

Diff Detail

Repository
R241 KIO
Branch
arcpatch-D21783
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17705
Build 17723: arc lint + arc unit
chinmoyr created this revision.Jun 13 2019, 4:13 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 13 2019, 4:13 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
chinmoyr requested review of this revision.Jun 13 2019, 4:13 PM

Thanks! Is this for T8075?

Thanks! Is this for T8075?

Yes it is.

Totally awesome :)

chinmoyr planned changes to this revision.Jun 15 2019, 8:08 AM

TODO

  • Change the UI of the warning dialog
  • We still need more details
dfaure requested changes to this revision.Jun 22 2019, 8:25 AM
dfaure added inline comments.
src/core/slavebase.cpp
1511

INF is for one-way information, isn't it? Why isn't this MSG_ like the one above?

src/core/slavebase.h
972

Missing "m" prefix like the other members, but wait.... isn't this BIC? Adding a new member to an exported class certainly is. This needs to go into the SlaveBasePrivate class instead.

src/ioslaves/file/file_unix.cpp
85

all those { ... } braces are unnecessary in this switch, which doesn't define any new variables

chinmoyr updated this revision to Diff 67955.Oct 15 2019, 9:43 AM
chinmoyr marked 3 inline comments as done.

Addressed the comments.

chinmoyr added inline comments.Oct 15 2019, 9:44 AM
src/core/slavebase.h
972

Since we need details from the ioslave somehow, I deprecated requestPrivilegeOperation() in favor of an overload that accepts details as argument.

dfaure requested changes to this revision.Oct 16 2019, 8:58 PM
dfaure added inline comments.
src/core/jobuidelegateextension.h
279

Sorry, you can't add a new virtual method to an exported+installed class.

BIC rules (where "rules" is a noun, not a verb...) ;-)

Possible solutions:

  • creating a new, separate, type of extension, say JobUiDelegatePrivilegeExtension. This requires adding another defautFoo() and setFoo() method like this file has at the bottom.
  • creating a "JobUiDelegateExtensionV2", derived from JobUiDelegateExtension, with a KF6 TODO to merge it with JobUiDelegateExtension. Then you can dynamic_cast the result of defaultJobUiDelegateExtension() to V2 to see if the extension implements V2.
src/core/slavebase.h
956

, use requestPrivilegeOperation(QString)

src/ioslaves/file/file_unix.cpp
81

const QVariantList &

87

no space before ':' in English

91

same

121

weird indentation

This revision now requires changes to proceed.Oct 16 2019, 8:58 PM