Bug 311151

Summary: Fails to rename class when only changing letter case
Product: [Applications] kdevelop Reporter: Daniel Vrátil <dvratil>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: 4.3.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel Vrátil 2012-12-04 14:58:51 UTC
Renaming class from XRandrMode to XRandRMode fails, because KDevelop fails to rename the source file:

Applying changes failed: Could not rename '/home/progdan/redhat/kde-devel/libkscreen/backends/xrandr/xrandrmode.h' to 'xrandrmode.h'

Reproducible: Always

Steps to Reproduce:
1. Have a class 
2. Rename it just by changing case of some letters

Actual Results:  
Renaming fails
Comment 1 Kevin Funk 2012-12-05 18:57:39 UTC
Git commit 2450103657591152c661a1922aa47184680cdc12 by Kevin Funk.
Committed on 05/12/2012 at 00:54.
Pushed by kfunk into branch 'master'.

Do not bail out on rename if src==dest

* In case source and destination are equal, just return RenameOk
  (this is the same behavior as std::rename has, when src==dest)
* Simplify both folder item's and file item's rename method by
  returning early in case the rename target is invalid
* Add new tests for folder, build folder and file items
REVIEW: 107585

M  +46   -38   project/projectmodel.cpp
M  +29   -4    project/tests/projectmodeltest.cpp

http://commits.kde.org/kdevplatform/2450103657591152c661a1922aa47184680cdc12