D10567: Remove handling of privilege operation confirmation prompts from KIO::Job
David Faure
noreply at phabricator.kde.org
Fri Feb 16 08:36:48 UTC 2018
dfaure added inline comments.
INLINE COMMENTS
> job.cpp:328
>
> - switch (m_operationType) {
> - case ChangeAttr:
> - m_caption = i18n("Change Attribute");
> - m_message = i18n("Root privileges are required to change file attributes. "
> - "Do you want to continue?");
> - break;
> - case Copy:
> - m_caption = i18n("Copy Files");
> - m_message = i18n("Root privileges are required to complete the copy operation. "
> - "Do you want to continue?");
> - break;
> - case Delete:
> - m_caption = i18n("Delete Files");
> - m_message = i18n("Root privileges are required to complete the delete operation. "
> - "However, doing so may damage your system. Do you want to continue?");
> - break;
> - case MkDir:
> - m_caption = i18n("Create Folder");
> - m_message = i18n("Root privileges are required to create this folder. "
> - "Do you want to continue?");
> - break;
> - case Move:
> - m_caption = i18n("Move Items");
> - m_message = i18n("Root privileges are required to complete the move operation. "
> - "Do you want to continue?");
> - break;
> - case Rename:
> - m_caption = i18n("Rename");
> - m_message = i18n("Root privileges are required to complete renaming. "
> - "Do you want to continue?");
> - break;
> - case Symlink:
> - m_caption = i18n("Create Symlink");
> - m_message = i18n("Root privileges are required to create a symlink. "
> - "Do you want to continue?");
> - break;
> - case Transfer:
> - m_caption = i18n("Transfer data");
> - m_message = i18n("Root privileges are required to complete transferring data. "
> - "Do you want to continue?");
> - default:
> - break;
> - }
> + QDataStream ds(&m_data, QIODevice::WriteOnly);
> + ds << status << m_caption << m_message;
This overwrites m_data everytime, so it might as well be a local variable.
> job_p.h:92
> bool m_privilegeExecutionEnabled;
> - bool m_confirmationAsked;
> + QByteArray m_data;
> QString m_caption, m_message;
Is this variable really necessary? It seems to me that we'd better off without it.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D10567
To: chinmoyr, dfaure
Cc: fvogt, #frameworks, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180216/90e7f7ce/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list