Bug 291074

Summary: KDevelop forgets indentation settings (Tabs) on restart
Product: [Applications] kdevelop Reporter: Alexander <ashaduri>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: VHI    
Version: git master   
Target Milestone: 4.2.3   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alexander 2012-01-09 19:02:03 UTC
Version:           git master (using KDE 4.7.2) 
OS:                Linux

I'm using KDevelop/kdevplatform git master (2012-01-09).

For some time now, KDevelop has been ignoring my indentation settings - it uses spaces instead of tabs.

In "Configure KDevelop -> Source Formatter" I have "Override Kate Indentation Mode" on, Formatter set to "Artistic Style" for C++. The actual style was copied and renamed from "Stroustrup". Inside, I have the indentation set to "Tabs" (I also tried "Force tabs", same results).
Note that the editor is also set to use Tabs.

If I open those settings and press OK, the settings are usually applied - tabs start working. However, after restarting KDevelop, the editor reverts back to using spaces.

This affects C++ files but not text files.

This is a regression from 4.2.

Thanks!

Reproducible: Always

Steps to Reproduce:
Just set the indenter to use tabs and restart the program.


Expected Results:  
Tabs should be inserted instead of spaces when pressing Tab on the keyboard.

openSUSE 12.1 x86-64.
Comment 1 Milian Wolff 2012-01-09 21:23:21 UTC
if someone can reproduce this would be a blocker for 4.3 - please investigate (I'll do as well if I can find the time)
Comment 2 Milian Wolff 2012-01-20 16:41:20 UTC
Git commit 947113c7972f0beb726ea88866851d679bcf10ae by Milian Wolff.
Committed on 20/01/2012 at 17:38.
Pushed by mwolff into branch '1.3'.

work-around incompatibility with kdevelop tab-indentation and kate's
dynamical tab-replacement

when the user has not selected "tabs" or "tabs & spaces" in kate's
indentation settings, but did configure his kdevelop source formatter
to use tabs, then kate would "dynamically" replace these tabs with
spaces again...

this depends on the recent commit to katepart (backported to 4.8 also).

for people with an older kate, please configure your kate editor to
use the above mentioned indentation setting. alternatively try out
kdevelop's 'override kate indentation mode' setting.

M  +15   -0    shell/settings/sourceformattersettings.cpp
M  +14   -1    shell/sourceformattercontroller.cpp

http://commits.kde.org/kdevplatform/947113c7972f0beb726ea88866851d679bcf10ae