Bug 355007 - QDateTime is not properly parsed by new CLang parser
Summary: QDateTime is not properly parsed by new CLang parser
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: git master
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-07 19:56 UTC by Piotr Mierzwinski
Modified: 2015-11-10 14:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Very simple project using QDateTime (548 bytes, application/gzip)
2015-11-07 19:57 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2015-11-07 19:56:11 UTC
I extended a bit my the simplest project ever I met the issue that QDateTime is not properly parsed.
First manifestation is "bad" colorizing. Class name has the same color as preprocesor directive. Second manifestation is that when I move mouse cursor over this class name then nothing happen.
Because QDateTime is located in QtCore I also added into Includes/Imports (in project configuration) path to QtCore (for me this is /usr/include/Qt/QtCore where is bunch of headers) and reparsed the project. Not helped.

Below please find the only one function from this project. For your convenience I also attached archive containing this project.

#include <QCoreApplication>
#include <QDateTime>
#include <QString>

int main(int argc, char** argv)
{
	QCoreApplication app(argc, argv);

	QDateTime dt;
	dt.addDays(1);

	QString s;

	return app.exec();
}

Please note that when I write "dt." then I'm getting the list of method from QDateTime class.
Of course method "addDays" is also not parsed and when I move mouse cursor over it then nothing happen.

Reproducible: Always

Steps to Reproduce:
1. Clear ~/.cache/kdevduchain cache
2. Run KDevelop
3. Open attached project
4. Open file main.cpp
5. Move mouse cursor over QDateTime

Actual Results:  
nothing happen

Expected Results:  
should be shown tool tip referring to QDateTime

Kate, KTextEditor, KDevelop, KDevplatform cloned at 04.11.2015

I'm not sure, but maybe the reason is the same like in Bug 354846 - QCollator class name is not colorized in global function
Comment 1 Piotr Mierzwinski 2015-11-07 19:57:06 UTC
Created attachment 95373 [details]
Very simple project using QDateTime
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 354846, bug 355004

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