Bug 298263 - KDevelop overwrite project config after reopen a project with a .kdev file
Summary: KDevelop overwrite project config after reopen a project with a .kdev file
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Unclassified
Component: project (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR minor (vote)
Target Milestone: 1.3.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-16 20:44 UTC by Bastian
Modified: 2012-05-03 09:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch with fixed the reported issues (2.16 KB, patch)
2012-04-16 20:48 UTC, Bastian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bastian 2012-04-16 20:44:07 UTC
KDevelop rewrite the .kdev4 file after opening a project.
The project name I entered in the project information dialog is replaced with the directory name.


Reproducible: Always

Steps to Reproduce:
1. Create a project directory names "myproject"
2. Create in the project directory the directories "trunk" and "branches"
3. Create in the "trunk" directory a file names "makefile"
4. Import the Project by selecting the makefile
5. Enter the project name "My Project" in the "Project information" dialog
6. Everything's fine. KDevelop shows in the 'Projects' toolview the correct project name
7. Close the project
8. Reopen the project by selecting the .kdev4 file in the trunk directory
9. Oops...now the project is named "trunk"
10. Look into the .kdev4 file. The project configuration now contains the project name "trunk"

another scenario:
1. Select Project->New From Template
2. Choose a "Standard Terminal" application
3. Use the project name "myproject"
4. Ignore the "Version Control" Page and finish the wizard
5. Use the "build directory" default settings
6. The new project is now shown as "myproject"
7. Close the project
8. Rename the project directory to "foobar"
9. Reopen the project with the .kdev4 file
10. Now the project is names "foobar"


Actual Results:  
The project is named by the directory

Expected Results:  
The entered project name is used
Comment 1 Bastian 2012-04-16 20:48:17 UTC
Created attachment 70441 [details]
Patch with fixed the reported issues
Comment 2 Milian Wolff 2012-04-16 21:56:03 UTC
hey! I've seen this myself, so thanks for looking into it.

but: please create a proper patch (git format-patch e.g. or at least git diff or diff -u) and then upload that on reviewboard: git.reviewboard.kde.org

thanks
Comment 3 Milian Wolff 2012-05-03 09:27:56 UTC
Git commit 2e0a5041d042b12b4c24afe3aa6ab1f590f5d97c by Milian Wolff, on behalf of Bastian Leyer.
Committed on 03/05/2012 at 11:22.
Pushed by mwolff into branch 'master'.

don't overwrite previously defined project name in *.kdev4 file

REVIEW: 104641

M  +28   -24   shell/projectcontroller.cpp

http://commits.kde.org/kdevplatform/2e0a5041d042b12b4c24afe3aa6ab1f590f5d97c
Comment 4 Milian Wolff 2012-05-03 09:28:53 UTC
Git commit fba01eabafea38cf7604c0d9096b68a34094fbff by Milian Wolff, on behalf of Bastian Leyer.
Committed on 03/05/2012 at 11:22.
Pushed by mwolff into branch '1.3'.

backport from master: don't overwrite previously defined project name in *.kdev4 file

REVIEW: 104641

This backports commit g2e0a504 from branch master

M  +28   -24   shell/projectcontroller.cpp

http://commits.kde.org/kdevplatform/fba01eabafea38cf7604c0d9096b68a34094fbff