<table><tr><td style="">chinmoyr created this revision.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6829" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This patch adds a method <tt style="background: #ebebeb; font-size: 13px;">execWithElevatedPrivilege()</tt> which can be used by other methods of <tt style="background: #ebebeb; font-size: 13px;">FileProtocol</tt> class when there occurs an error due to insufficient privileges.</p>
<p>It takes the following arguments,</p>
<ol class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">int error</tt> : to check if error == <tt style="background: #ebebeb; font-size: 13px;">EACCES</tt>. otherwise don't continue.</li>
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">ActionType</tt> : the c-library function to execute</li>
<li class="remarkup-list-item">three QVariants: the arguments to the function</li>
</ol>
<p>This method makes use of the signal <tt style="background: #ebebeb; font-size: 13px;">execPrivilegeData</tt> to check if the job requires privileges to be elevated and to ask the job to show a warning/confirmation dialog.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6829" rel="noreferrer">https://phabricator.kde.org/D6829</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/slavebase.cpp<br />
src/core/slavebase.h<br />
src/core/slaveinterface.cpp<br />
src/core/slaveinterface.h<br />
src/ioslaves/file/file.h<br />
src/ioslaves/file/file_unix.cpp<br />
src/ioslaves/file/file_win.cpp</div></div></div><br /><div><strong>To: </strong>chinmoyr<br /><strong>Cc: </strong>Frameworks<br /></div>