This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 226216 - Qt5: instead of Qt::AAA code model contains AAA
Summary: Qt5: instead of Qt::AAA code model contains AAA
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Toolchain (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks: 218532
  Show dependency tree
 
Reported: 2013-02-16 21:12 UTC by soldatov
Modified: 2013-06-27 02:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample (20.00 KB, application/x-tar)
2013-02-16 21:12 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2013-02-16 21:12:25 UTC
Created attachment 131474 [details]
sample

Ubuntu 12.10, Qt 5

Scenario:
- Unpack sources
- Create "C/C++ Project with Existing Sources" (automatic mode)
- Check HelloForm.cpp file
==> If I use Qt5, IDE can't recognize Qt::Dialog identifier

Real Qt code contains a lot of Qt::AAA enums. Therefore I see a lot of unresolved identifiers.

P.S. Qt is namespace.
Comment 1 soldatov 2013-02-18 13:59:05 UTC
After preprocessor:

# 46 "/opt/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qbytearray.h" 2
# 1 "/opt/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qnamespace.h" 1
# 43 "/opt/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qnamespace.h"
#define QNAMESPACE_H 









namespace



Qt {
# 106 "/opt/Qt5.0.1/5.0.1/gcc_64/include/QtCore/qnamespace.h"
    enum GlobalColor {
        color0,
        color1,
        black,
        white,
        darkGray,
        gray,
        lightGray,
        red,
        green,
        blue,
        cyan,
        magenta,
        yellow,
        darkRed,
        darkGreen,
        darkBlue,
        darkCyan,
        darkMagenta,
        darkYellow,
        transparent
    };
Comment 2 soldatov 2013-02-18 14:32:52 UTC
Source file: http://qt.gitorious.org/qt/qt/blobs/HEAD/src/corelib/global/qnamespace.h

In NetBeans:
127th line: Qt::KeyboardModifier
150th line: ::MouseButton
Comment 3 Vladimir Voskresensky 2013-06-26 08:02:33 UTC
Issue caused by #error directive
-fPIE option is used, but model has not got associated __pic__, __PIC__, __pie__, __PIE__ macros
Comment 4 soldatov 2013-06-26 08:10:40 UTC
This code can be compiled with -fPIE, but IDE highlights 2nd line as wrong

#if !defined(__PIC__) || !defined(__pic__) || !defined(__PIE__) || !defined(__pie__)
#error wrong error
#endif

int main(int argc, char** argv) {

    return 0;
}
Comment 5 Alexander Simon 2013-06-26 11:20:21 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/3a80dd4f661a
Comment 6 Quality Engineering 2013-06-27 02:16:52 UTC
Integrated into 'main-golden', will be available in build *201306262301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3a80dd4f661a
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #226216 Qt5: instead of Qt::AAA code model contains AAA