D9344: [KDevelop] : consistent use of the project name (WIP)

René J.V. Bertin noreply at phabricator.kde.org
Wed Apr 4 19:21:41 UTC 2018


rjvbb marked 3 inline comments as done.
rjvbb added a comment.


  >   > "Except", are you sure about that? I'm pretty certain I got the override dialog when I forced a new import from, say, the project's CMake file, and <dirname>.kdev4 existed already.
  >   
  >   
  >   Ah, yes - that could be it. Then we should probably change the code to first construct a projectFileUrl that actually points to a .kdev4 file, and then use that in the conditional. And add comments that explain what is going on here.
  
  I don't think that is necessary; will add comments to the code trying to explain what goes and why.
  
  >   Neither according to me, which makes me wonder why the `equalProjectFile` code is apparently broken?
  
  I don't think it is - I didn't see a need to change it after all :)
  It was probably just used in a way that wasn't sufficiently well thought out and worked sufficiently well because the project controller would only create new project files that called <dirname>.kdev4 .
  
  I do wonder now if `equalProjectFile()` is even necessary.
  
  Either way, I just tested again; the changed code allows me to create and reopen multiple projects from the same CMake file as long as I give them different names during the initial import procedure. The project.kdev4 files reflect those names and can thus live in the same directory. I only get the override dialog if I import the CMake file and then specify a name that was already used for a project in that same directory.
  
  >   I agree with what you write. I don't understand why you think what I wrote above is the opposite though? 
  
  Because you said we should post the override dialog EXCEPT (= unless) when we're going to overwrite an existing project file. I think we should only do it WHEN we're going to overwrite.
  
  BTW, here's another interesting observation: the default project file in a directory like kfoo-18.04.2 will be called kfoo-18.04.2.kdev4 . The check `QFileInfo(projectFileUrl.url()).completeSuffix()` is actually broken, because it will return "04.2.kdev4", I'll be fixing that too (the check should use dlg->selectedUrl() anyway).
  
  R

REPOSITORY
  R32 KDevelop

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

To: rjvbb, #kdevelop, mwolff
Cc: mwolff, kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180404/006d0e68/attachment.html>


More information about the KDevelop-devel mailing list