Bug 354846 - QCollator class name is not colorized in global function
Summary: QCollator class name is not colorized in global function
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-04 18:27 UTC by Piotr Mierzwinski
Modified: 2015-11-10 14:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2015-11-04 18:27:42 UTC
I found issue about not colorizing class name placed in global function. The example you can find in KDevelop project (master and 5.0 branches) in file: "kdevelopsessions.cpp". Properly code is placed on the top of this file and looks like below:
bool kdevelopsessions_runner_compare_sessions(const Session &s1, const Session &s2) {
  QCollator c;
  return c.compare(s1.name, s2.name) < 0;
}
Having bright (white) background in editor one can easily notice then QCollator name is not colorized. To be sure one can move mouse cursor over this class name expecting tool tip helper, whilst nothing will happen. I mean nothing is shown, and should.
When I put there, for example, following declaration: "QWidget w;" then it is properly colorized and helper tool tip is showing after mouse cursor will be over "QWidget".

Reproducible: Always

Steps to Reproduce:
1. Run KDevelop
2. Open KDevelop project (branch master or 5.0)
3. Open kdevelopsessions.cpp file
4. Go on the top to get see function: "kdevelopsessions_runner_compare_sessions"
5. Move mouse cursor over QCollator name

Actual Results:  
Helper tool tip is not shown. Additionally QCollator is not colorized.

Expected Results:  
Should be shown Helper tool tip and name QCollator colorized.

KDevelop and KDevplatform cloned at 28.10.2015
Comment 1 Kevin Funk 2015-11-04 20:31:19 UTC
Can confirm. For some reason, qcollator.h is only half-parsed (already breaks on the copy-ctor decl).
Comment 2 Milian Wolff 2015-11-10 14:09:17 UTC
Git commit 1472719544ed230f15696a6ce793e117ef42ce3d by Milian Wolff.
Committed on 10/11/2015 at 14:09.
Pushed by mwolff into branch '5.0'.

Fallback to non-canonicalized cursor for declaration lookup in use builder.

This fixes a bug where we failed to associate a use with a declaration
when there occurred a friend declaration before the actual declaration.
Related: bug 355004, bug 355007

M  +13   -2    languages/clang/duchain/builder.cpp
M  +13   -0    languages/clang/tests/files/uses.cpp
M  +1    -1    languages/clang/tests/test_duchain.cpp

http://commits.kde.org/kdevelop/1472719544ed230f15696a6ce793e117ef42ce3d