<table><tr><td style="">dfaure created this revision.<br />dfaure added reviewers: ahmadsamir, broulik, meven, kossebau, davidedmundson, nicolasfella, svuorela.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />dfaure requested review of this revision.
</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/D29385">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">KRun::runUrl() is now new OpenUrlJob(url, mimeType).</li>
<li class="remarkup-list-item">new KRun() is now OpenUrlJob(url), which will first determine the mimeType.</li>
<li class="remarkup-list-item">the "open with" dialog is provided by KIOWidgets via JobUiDelegate and an interface defined in kiogui. When not using JobUiDelegate, we'll fall back to QDesktopServices::openUrl, which will call xdg-open, which will call kde-open5, which will prompt an open with dialog :-)</li>
<li class="remarkup-list-item">Running of scripts and executables is off by default, unlike in KRun, since this created a few security bugs in unsuspecting applications in the past. File managers should enable it, apps that can open attachments or similar things should leave it disabled.</li>
<li class="remarkup-list-item">Instead of BrowserRun/KonqRun deriving from KRun, they can use an OpenUrlJob as is, connect to mimeTypeFound and kill the job if they want to take over (to embed the document instead of launching an app)</li>
</ul>
<p>I tried to unittest OpenUrlJob as much as possible. The parts that are<br />
least unittests are those related to remote protocols though, since they<br />
require test servers.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Mostly via unittests, for now</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>BRANCH</strong><div><div>2020_05_openurljob</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29385">https://phabricator.kde.org/D29385</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/CMakeLists.txt<br />
autotests/krununittest.cpp<br />
autotests/openurljobtest.cpp<br />
autotests/openurljobtest.h<br />
src/core/kurlauthorized.h<br />
src/gui/CMakeLists.txt<br />
src/gui/applicationlauncherjob.cpp<br />
src/gui/applicationlauncherjob.h<br />
src/gui/openurljob.cpp<br />
src/gui/openurljob.h<br />
src/gui/openurljobhandlerinterface.cpp<br />
src/gui/openurljobhandlerinterface.h<br />
src/widgets/CMakeLists.txt<br />
src/widgets/jobuidelegate.cpp<br />
src/widgets/kdesktopfileactions.cpp<br />
src/widgets/kopenwithdialog.cpp<br />
src/widgets/kopenwithdialog.h<br />
src/widgets/krun.cpp<br />
src/widgets/widgetsopenurljobhandler.cpp<br />
src/widgets/widgetsopenurljobhandler.h</div></div></div><br /><div><strong>To: </strong>dfaure, ahmadsamir, broulik, meven, kossebau, davidedmundson, nicolasfella, svuorela<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>