Feature: on DnD of repo urls on window show Open Project dialog for url
ClosedPublic

Authored by kossebau on Jan 29 2017, 3:41 AM.

Details

Summary

When browsing the web for some sources and finding the repo url,
this patch allows to drag and drop the url onto the KDevelop window
and automatically get the Open Project dialog opened, prefilled with
the matching vcs system and the url to use.

Future plans:

  • extend for ProjectProvider plugins
  • install protocol handlers and add app cmdline parameter -> KDevelop would be launched as handler for repo urls
  • detect existing projects using a given repo url and ask if to open instead

Diff Detail

Repository
R33 KDevPlatform
Branch
supportDnDOfRepoUrls
Lint
No Linters Available
Unit
No Unit Test Coverage
kossebau updated this revision to Diff 10670.Jan 29 2017, 3:41 AM
kossebau retitled this revision from to Feature: on DnD of repo urls on window show Open Project dialog for url.
kossebau updated this object.
kossebau added a reviewer: KDevelop.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJan 29 2017, 3:41 AM
kossebau updated this revision to Diff 10676.Jan 29 2017, 3:56 PM

extract urls also out of plain text drops

mwolff requested changes to this revision.Jan 29 2017, 7:57 PM
mwolff added a reviewer: mwolff.
mwolff added a subscriber: mwolff.

various style nitpicks, otherwise lgtm

shell/mainwindow.cpp
239

? please extend this comment, no clue what you mean

241

auto*

242

const auto&

244

don't use foreach in new code, use for (auto* plugin : plugins) {

245

auto

255

dito

shell/openprojectdialog.cpp
72

wrap, & placement

shell/openprojectdialog.h
38

wrap long line

shell/projectcontroller.cpp
416

& placement

835

style: & next to typename

837

const

shell/projectcontroller.h
63

wrap, & next to typename

173

style: & next to typename

shell/projectsourcepage.cpp
34

& placement

73

to *do*?

shell/projectsourcepage.h
32

& placement

51

& placement

shell/tests/test_projectcontroller.cpp
57

& placement, wrap, de-inline or at least move {...} to its own line

vcs/interfaces/ibasicversioncontrol.h
93

de-inline

This revision now requires changes to proceed.Jan 29 2017, 7:57 PM
kossebau updated this revision to Diff 10684.Jan 29 2017, 8:51 PM
kossebau edited edge metadata.
kossebau marked 18 inline comments as done.

include style feedback

shell/projectsourcepage.cpp
73

This is comment from old code just moved around, but now that I look at it I see a flaw, will fix that one as well.

mwolff accepted this revision.Jan 30 2017, 9:44 AM
mwolff edited edge metadata.

minor nitpick, feel free to fix that and push directly then

vcs/interfaces/ibasicversioncontrol.h
84 ↗(On Diff #10670)

Checks whether the given @p remoteLocation is a valid remote repository URL.
<empty line>
...

94 ↗(On Diff #10670)

what external plugins exist? make this = 0; from the start please

This revision is now accepted and ready to land.Jan 30 2017, 9:44 AM
kossebau marked 2 inline comments as done.Jan 30 2017, 2:19 PM

Thanks for review.

vcs/interfaces/ibasicversioncontrol.h
94 ↗(On Diff #10670)

There is a mercurial in playgrounds, but okay, this should be easy enough to fix on updating to kdevplatform master, less effort than to maintain this TODO which will be forgotten anway.

This revision was automatically updated to reflect the committed changes.
kossebau marked an inline comment as done.