D9344: [KDevelop] : [fixed] consistent use of the project name allowing to create multiple projects in a single source tree

René J.V. Bertin noreply at phabricator.kde.org
Tue Oct 9 12:48:32 BST 2018


rjvbb added a comment.


  I'd be pushing less if this hadn't already been committed and then reverted because of an issue that got through the initial review process.
  
  The main purpose of this patch is to make it possible to import (define) multipe projects from a single source directory, for instance for software that can be built either for Qt4 OR Qt5 (or Qt6), or that could use either CMake or QMake. Or a source directory on a NAS that is used from different platforms (Linux, Mac, MS Windows, etc.).
  It does this by using the project name that is entered through the import wizard (1st dialog after the project file/dir selection) as the basis for the .kdev4 project files.
  
  That's the brunt of it really; most of the complexity comes from ensuring that the project files are stored where they should be, and to integrate with the existing optional override. The details of when to ask for overriding have not changed w.r.t. the initial review; basically the override dialog is relevant (and posted) only when the new project name gives a project file (/path/to/src/foo.kdev4) that exists already.
  There's an additional complication compared to the previous commit in the 5.2 branch: Greg Popov's commit that threw out the entire .kdev4 directory when importing a new project. He agreed fully that the issue which led to that change was addressed just as well by deleting the .kdev4/foo.kdev4 file if it exists already and the user chose to override the existing project.
  
  Note that the patch doesn't make it impossible to have multiple projects in a single source tree. One could already clone, rename and edit existing .kdev4 files outside of KDevelop, and then open those. The patch just makes it possible to do this through the import wizard.
  
  HtH...
  
  > Ideally the strategy when it comes to project file names would be documented somewhere to developers in a comment.
  
  I'm tempted to say that the code should speak for itself, combined with runtime behaviour. It always struck me as counter-intuitive that KDevelop asked for a project name, and then used something else for the .kdev4 files.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D9344

To: rjvbb, #kdevelop, mwolff
Cc: kossebau, arrowd, mschwarz, kfunk, mwolff, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181009/12932b59/attachment.html>


More information about the KDevelop-devel mailing list