Bug 374016

Summary: Abbreviations not working
Product: [Applications] kile Reporter: Amaro <amaro>
Component: user interfaceAssignee: Michel Ludwig <michel.ludwig>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 2.9.60   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Amaro 2016-12-21 23:32:38 UTC
With the master branch for kile 
Version 2.9.60
Using:
KDE Frameworks 5.27.0
Qt 5.7.1 (built against 5.7.0)

the completion of abbreviations, either auto- or via ctrl+alt+space key-combo isn't working, the abbreviation letters are erased instead. 
The abbreviations are properly listed in the Abbreviation sidebar, so they are being read. For example, the abbreviation q1=\,q_{1}
but if I type q1+ctrl+alt+space, then q1 disappears and no code is inserted.
Comment 1 Amaro 2016-12-22 15:42:06 UTC
Changed in codecompletion.cpp, line 783, 

replace

QString completionText = data(index, Qt::DisplayRole).toString();

by

QString completionText = data(index.sibling(index.row(), Name), Qt::DisplayRole).toString();
Comment 2 Michel Ludwig 2016-12-22 19:55:36 UTC
Git commit f09836151b78181f2d862b94db159db02b021b1b by Michel Ludwig.
Committed on 22/12/2016 at 19:54.
Pushed by mludwig into branch 'master'.

Fix the substitution of abbreviations

Thanks to Amaro!

M  +1    -1    src/codecompletion.cpp

https://commits.kde.org/kile/f09836151b78181f2d862b94db159db02b021b1b