D21783: [WIP]Show more details in warning dialog shown before starting a privileged operation

David Faure noreply at phabricator.kde.org
Wed Oct 16 21:58:35 BST 2019


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> jobuidelegateextension.h:279
> +     */
> +    virtual bool askPrivilegeOperationConfirmation(const QString &warningCaption,
> +                                                   const QString &warningMessage,

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.

> slavebase.h:956
> +    /**
> +     * @deprecated since 5.64
> +     */

`, use requestPrivilegeOperation(QString)`

> file_unix.cpp:81
>  
> +static QString actionDetails(ActionType actionType, QVariantList args)
> +{

`const QVariantList &`

> file_unix.cpp:87
> +        action = i18n("Change File Permissions");
> +        detail = i18n("New Permissions : %1", args[1].toInt());
> +        break;

no space before ':' in English

> file_unix.cpp:91
> +        action = i18n("Change File Owner");
> +        detail = i18n("New Owner : UID=%1, GID=%2", args[1].toInt(), args[2].toInt());
> +        break;

same

> file_unix.cpp:121
> +    default:
> +            action = i18n("Unknown Action");
> +            break;

weird indentation

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D21783

To: chinmoyr, #vdg, #frameworks, dfaure
Cc: mreeves, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191016/d185dd27/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list