app: Improve --project handling
ClosedPublic

Authored by kfunk on Nov 16 2017, 1:14 PM.

Details

Summary

Before this patch --project PROJ had several flaws:

  • Could not be used to open the project in an existing instance
  • Could not be used to open a project if there was an already running KDevelop instance

With this change:

  • We'll check which sessions contain PROJ
    • We'll use the first match as the 'target session' to be opened
  • Continue as usual
    • If there's a KDevelop instance with that session open: activate
    • If not: Open a new instance with said session

Diff Detail

Repository
R32 KDevelop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
kfunk created this revision.Nov 16 2017, 1:14 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptNov 16 2017, 1:14 PM
kfunk updated this revision to Diff 22449.Nov 16 2017, 1:33 PM

Add new feature:

kdevelop -p DIR
kfunk added a subscriber: cullmann.Nov 16 2017, 1:34 PM

@cullmann kdevelop -p DIR -- That's something you wanted to have, right? In case you ever wanted to look at KDevelop again :)

;=) Actually I wanted that kdevelop just opened the project in the current working dir, if any if I start it without arguments ;=)
But --project dir is already nice I assume.

kfunk updated this revision to Diff 22455.Nov 16 2017, 1:47 PM

Code cleanup, rebase

kfunk added a comment.EditedNov 16 2017, 1:58 PM

;=) Actually I wanted that kdevelop just opened the project in the current working dir, if any if I start it without arguments ;=)

That defaults to opening the last active session, I don't think we'd like to change that behavior.

But --project dir is already nice I assume.

It's really short now:

kdevelop -p .

<3

;) Yeah, I think the default behavior is ok as it is, you are right.

brauch accepted this revision.Nov 16 2017, 2:00 PM
brauch added a subscriber: brauch.

Fine with me.

This revision is now accepted and ready to land.Nov 16 2017, 2:00 PM
This revision was automatically updated to reflect the committed changes.