1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00
Commit graph

22487 commits

Author SHA1 Message Date
Nathan Ridge
dd7dde956f Bug 417700 - Semantic Error: Invalid overload of 'endl' for a templated
parameter

Change-Id: Icd110a386421d9d5cc9502dd8d4cd56328119a77
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19834
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:55:50 -05:00
Nathan Ridge
d96ec1dfc8 Bug 422505 - Additional fix for unqualified case
Change-Id: Ia2a154c789d1b46643a67958611589e900ae0f18
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19826
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:43:19 -05:00
Nathan Ridge
7f3095be51 Bug 422505 - Name resolution problem with template friend method
Change-Id: I1cb70755042572272cb38382795caa98f9d463ff
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19825
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:41:35 -05:00
Nathan Ridge
c126fade3d Bug 419938 - [fp] Pure virtual implementation not recognized if only one
path implements it

Change-Id: I90732a87d8d6b4ad2a84aa3c8b09b10727afa994
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19823
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:40:02 -05:00
Sergey Prigogin
09773cc341 Added JavaDoc for BaseTestCase.INDEXER_TIMEOUT_SEC. 2013-12-15 10:57:16 -08:00
Nathan Ridge
48d5341bf7 Bug 401820 - Explicit specialization of template declared in header
Change-Id: Ibf2156f880d42e87b1d954772b0faae384f9784b
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19742
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-15 02:12:57 -05:00
Doug Schaefer
f6957b73ab Clean up the API around QtNature. Add isProject expr def. 2013-12-13 17:03:52 -05:00
Doug Schaefer
c0b973880f Bug 418536 Add static method to add Qt nature to a project. 2013-12-13 10:25:38 -05:00
Vladimir Prus
99b34b3352 Bug 390827 - Trace View enhancement
Create necessary button.

Signed-off-by: Vladimir Prus <vladimir@codesourcery.com>
2013-12-13 05:44:21 -05:00
Marc Khouzam
7bbbbcf7a8 Missing @since tag
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-12-12 16:15:02 -05:00
Doug Schaefer
5e999c4da5 Forgot run goal on repo unzip. 2013-12-12 16:08:21 -05:00
Doug Schaefer
4b264d19c3 Add copying over of production bits to downloads dir. 2013-12-12 15:27:21 -05:00
Doug Schaefer
6512af4277 Add copying over of production bits to downloads dir. 2013-12-12 15:22:27 -05:00
Andrew Eidsness
ff690ab953 Content assistant for Qt elements
This adds content assistants for QObject::connect function calls and
Q_PROPERTY expansions.

QObject::connect function calls look like:

    QObject::connect(
        sender,   SIGNAL(someSignalFunction(int),
        receiver, SLOT(someSlotFunction(int));

The assistant provides proposals in the SIGNAL and SLOT expansions.  The
QObject for the corresponding type is used to create a list of signal or
slot function signatures.

Q_PROPERTY expansions look like:

    Q_PROPERTY( type name READ someFunction ... )

[The ... is a list of optional attributes.]  The assistant proposes
attribute names that have not yet been added.  It also proposals
appropriate values for the attribute.

This patch also adds test cases for this feature.

Change-Id: I0eb25235bb423c1cfcd743075331f90f269afea7
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19721
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-12 14:05:53 -05:00
Andrew Eidsness
c6c1ef94fc Fix Qt plugin's project structure
The Qt plugins have been naming internal packages using two different
prefixes:

    cdt.qt.internal
    cdt.internal.qt

This renames all packages to cdt.internal.qt, which seems to be the
convention for other projects.

I've increased the Qt plugin versions because alot of new API has been
added, especially to the qt.core plugin.  I increased the version in the
MANIFEST.MF and pom.xml files.

I've also fixed the MANIFEST.MF files to take CDT out of the plugin
names.

I've also replaced a call to CCorePlugin.log(Exception) with a call to
QtUIPlugin.log (and added the logging functions to QtUIPlugin.

Change-Id: I1e3e7b2a42c2eb79fe33608c14a1abcf013a9f2c
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19698
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-12 11:12:13 -05:00
Marc-Andre Laperle
5428ad5001 Bug 422962 - Boost Testrunner: BOOST_PARAM_TEST_CASE not working
Change-Id: I8815163c15ba9cd1c2fd0b5ba4ffe7a701fb6b3c
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19679
Tested-by: Hudson CI
2013-12-11 23:03:06 -05:00
Andrew Eidsness
1b42998e47 Bug 422841: Add IQMethod to the QtIndex
This adds support for Qt slots, signals, and invokables to the QtIndex.

This does not yet generate PDOM references for QObject::connection
function calls and the Content Assistant is not contributed yet.

This also fixes a problem in the GNUCPPSourceParser class (internal to
cdt.core).  The class has a protected method that accepts an inner enum
as a parameter.  That enum was marked as private, meaning the method
could not actually be used by subclasses.  I've updated the enum to
match the visibility of the method.

There are three big areas needed to support Qt methods:

1) Slot and signal regions must be identified in the C++ class
definition.  These regions are introduced with special macros and the
region extends to the next region or to the next visibility label.

   Single methods can also be marked with (different) special macros.
This only applies outside of a slot/signal region.

   I've created QtASTClass which examines the input class spec in order
to identify all such regions.  This information is used when creating
the QtPDOM nodes for these methods.

2) Some places in Qt use type information embedded as macro expansion
parameters.  The values are lost by the standard C++ parser (since they
are just text in the expansion).  I've added an extension to the
GNUCPPSourceParser that accepts an input string (the macro expansion
parameter) and produces an appropriate IASTNode if possible.

3) The Qt moc follows specific and non-standard rules when matching
method signatures inside of QObject::connect function calls.  I've added
a utility that creates the same signature using the CDT AST as input.

   I learned the rules used by the moc by observing it's output for
significant cases.  Those cases have been put into a test case that is
included in this patch.

Change-Id: If812558db315abec637653cc974abf1c0c13d95b
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19672
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-11 20:59:16 -05:00
Sergey Prigogin
2e0bd2e95b Added ICElement.EMPTY_ARRAY constant. 2013-12-11 15:29:22 -08:00
Sergey Prigogin
bdde88fd2a Cosmetics. 2013-12-11 15:28:58 -08:00
Marc Khouzam
3649ffac46 Bug 423731, Bug 421541 - Accept failures of GDB commands when setting
memory info.

Change-Id: I28d332365c5b2e01f7df9d269a1f805a586a1563
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19639
Tested-by: Hudson CI
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2013-12-11 11:35:42 -05:00
Marc-Andre Laperle
475d44a366 Bug 423731 - Cannot start debugging with Apple-gdb, -gdb-set language
fails

Change-Id: Ifd0cb77a0b3c9142f0ee60cf9a6477ebbfefe323
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19629
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-12-11 09:23:59 -05:00
Andrew Eidsness
2d9f3f1028 Bug 422841: Add Q_PROPERTY to the QtIndex
This extends IQObject so that it can return the list of Q_PROPERTY
expansions.  Each Q_PROPERTY is represented by the new IQProperty.  The
attributes of the property are stored in IQProperty.Attribute.

Where applicable, the attributes insert a reference from the associated
C++ binding.  This means that the Q_PROPERTY expansion will be included
in the list of references for the C++ binding.

This also simplifies the process for adding new PDOMBindings to the Qt
linkage.  New instances are stored in an implementation of IQtASTName
and able to directly create and return a new QtPDOMBinding.  This avoids
creating three parallel inheritance hierachies (compared to the previous
Qt PDOM implementations).

The patch includes test cases to check handling of Q_PROPERTY
expansions.

Change-Id: I7d256d1a938d24a9eb726c472fb150a02f26eb32
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19602
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-10 20:39:41 -05:00
Marc-Andre Laperle
431dff5671 Bug 421289 - Preferences for indexing all versions of all or specific
headers

Change-Id: If0788d35af7aea0f95ffbff10b4e5d1b9f30ba62
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19033
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-10 14:48:56 -05:00
Marc-Andre Laperle
3c01b0d5f1 Bug 423396 - Indexer can't evaluate operator value
Change-Id: I8edcc66e24c95d4fb0113df8a7f0c21cbf378155
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19482
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-09 14:34:00 -05:00
Sergey Prigogin
498762b021 Code streamlining. 2013-12-06 12:47:28 -08:00
Sergey Prigogin
b40827283d Cosmetics. 2013-12-06 12:17:26 -08:00
Sergey Prigogin
ecf7d25dd9 Cosmetics. 2013-12-06 12:01:12 -08:00
Sergey Prigogin
1a4e509e0d Bug 423471 - ClassCastException in CPPASTTemplateIDAmbiguity 2013-12-06 11:38:43 -08:00
Sergey Prigogin
aa9dd95996 Cosmetics. 2013-12-06 11:28:24 -08:00
Sergey Prigogin
ff49775235 Bug 400073 - More robust clearing of results cache. 2013-12-06 11:16:59 -08:00
David Kaspar
20a6412247 Bug 422797 - Improved JavaDoc for IQMakeProjectInfoListener.qmakeChanged()
Change-Id: I36ad640cefae08d5ebb2b7e6a566e7e385d9036a
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/19427
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-12-06 10:28:29 -05:00
Sergey Prigogin
3fbe0d12af Bug 400073 - Indexer runs out of memory.
Fixed a soft memory leak caused by accumulation of data in
PDOM.fResultCache when several consecutive files fail to parse.
2013-12-05 20:40:15 -08:00
Sergey Prigogin
fb08c843e9 Bug 400073 - Indexer runs out of memory.
An attempt to reduce memory consumption.
2013-12-05 19:47:34 -08:00
Sergey Prigogin
b52beeb11b Cosmetics. 2013-12-05 18:29:13 -08:00
Sergey Prigogin
2668018f30 Fixed a warning in Codan. 2013-12-05 18:25:04 -08:00
David Kaspar
4546692659 Bug 422797 - Fix for synchronization and update in QMakeProjectInfo
handleEvent method updates for related project only
and does not fire listeners under 'sync' lock.

Change-Id: Id9726925ff9c044a3c13238406bdf3228ccf2933
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/19361
Reviewed-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-12-05 18:33:54 -05:00
Jeff Johnston
bd84e07bc6 Bug 423192 - Fix AutotoolsNewMakeGenerator getWinOSType method
- Fix AutotoolsNewMakeGenerator.getWinOSType method to
  use the build env variables when invoking the sh
  command because the path to "sh" may be specified there

Change-Id: Ibcde5de924c50b6557fb4264572ddd59b02bb99a
Reviewed-on: https://git.eclipse.org/r/19400
Tested-by: Hudson CI
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
IP-Clean: Jeff Johnston <jjohnstn@redhat.com>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
2013-12-05 17:28:40 -05:00
Andrew Eidsness
4dab99404c Bug 422681: Load the correct binding for cross-linkage references
The test case in the previous commit was invalid.  The test case did not
modify the binding that was referenced by the name and it was checking
for the wrong binding after reading the reference from the Database.
Further, the test case had a hole where the type of binding that was
being used happens to have same node type in both the C and C++
linkages.

I've fixed the test case as follows:

1) The test type is now an enum which has a different nodeType in the C
and C++ linkages.  The test case will now be able to catch cases where
the wrong linkage is used when reading the binding.

2) The test case now changes the name to reference a binding in a
different linkage.  This means the later code (in the test case) is
expected to actually load a binding from a different linkage.

3) The test case now checks that the loaded binding really did come from
the other linkage.  The previous implementation of the test case was
using the wrong binding for the checks.

I've also updated the implementation so that the updated test case
passes.

As an aside, during this update we (Doug and I) noticed that PDOMNames
unnecessarily store a PDOMLinkage.  Bindings come from languages, and
therefore need a PDOMLinkage (so that the proper type can be loaded).
Names reference bindings and therefore should not have a linkage.  The
motivating example is that there should be one binding for the printf
function, but it could be referenced using names that are created by
different parsers.  This can be fixed in a later change.

The major change to implementation is that PDOMNode now stores an
identifier for the factory to use when loading the node.  PDOMNode was
already using an int to store the nodeType.  I've split this to store
the factoryId as a short and the nodeType as a short.  The highest
nodeType currently in use is 58 -- a short should provide ample room for
expansion.

Since PDOMNode is now able to pick the proper factory for loading, we no
longer need the PDOMLinkage.getNode(long) method and I've marked it
deprecated.  Instead there is a new method PDOMNode.load(PDOM, long).
Nodes read their factoryId from the database, so the PDOMLinkage is not
needed.

Later commits should cleanup the following:

    a) Remove PDOMLinkage from PDOMNode (and related)
    b) Change return type of PDOMNode.getNodeType to short
    c) Replace deprecated calls to PDOMLinkage.getNode

Among these changes, (a) should allow removal of the external references
list.  If names can be loaded without a linkage, then there would be no
reason to store the linkage when storing the name.

Change-Id: Ife2b21cb21ed1ac6d6c361d0ffb8c7434832c79c
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19377
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-05 13:39:03 -05:00
Marc Khouzam
85cbac3dd0 Typos
Change-Id: I0e19143c5450f96e4551adf65c69fbb128fbf618
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-12-05 06:45:41 -05:00
Marc Khouzam
9e3d6af77f Bug 418710 - Fix PDA example by adding proper dependency.
Change-Id: Ibdaea7c0b36931078befedd23e3b3cbbdeced072
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-12-05 05:43:17 -05:00
Sergey Prigogin
424c2898fe Bug 423127 - Template resolution gets confused by "void" in a parameter
list

Change-Id: I6d2510ce7f1c8007da7121855bc4870e4a57d15d
Reviewed-on: https://git.eclipse.org/r/19355
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-05 00:54:07 -05:00
Sergey Prigogin
ff8baa2754 Cosmetics. 2013-12-04 19:46:34 -08:00
Sergey Prigogin
5adfb67a9d Added toString method. 2013-12-03 18:18:50 -08:00
Sergey Prigogin
772f6c1643 Bug 423126 - Extract Function refactoring misses additional occurrences
of the extracted code
2013-12-03 18:16:43 -08:00
Sergey Prigogin
090345f405 Cosmetics. 2013-12-03 18:05:48 -08:00
Sergey Prigogin
bd0e88a3e2 Code streamlining. 2013-12-03 17:31:52 -08:00
Sergey Prigogin
3a7a88486b Cosmetics. 2013-12-03 17:29:36 -08:00
Andrew Eidsness
45c388b77e Bug 418406: Qt4 and Qt5 specific HelloWorld project wizards
This replaces the QtQuick2 project wizard with Qt4 and Qt5 wizards that
include the old content as well as:

1) Make targets to build and clean the project
2) Sample interaction between C++ and QML
3) A Qt header path provider so that paths from the Qt installation are
properly resolved in the project.

Item 3 is particularly important for using the 'New Class' wizard with
QObject as the base class.  Unless the Qt paths are pre-populated the
QObject base class will not be found and the New Class wizard's Finish
button will be disabled.

The Qt headers are resolved by running `qmake -query QT_INSTALL_HEADERS`
and then creating IncludePath entries for all sub-folders.  This list of
include paths is persisted with other shared language settings into a
file in the workspace metadata area.

The persisted data is reloaded when any of the following change:
- the modification time of the qmake binary
- the modification time of the reported QT_INSTALL_HEADERS folder

The persisted node is ignored when the target qmake binary no longer
exists.  The node is removed from the persisted form the next time that
the shared settings are persisted.

Change-Id: Ic82fdb147e6a69060f93e2e9aed2e919139a0ae9
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/16909
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-12-03 18:51:38 -05:00
Xavier Raynaud
778e234e67 Avoid duplicating fields in FinalLaunchSequence sub-classes
(add protected accessors)

Change-Id: I7e4e7ada8ce0f25a94ccec0ffd4311f05f9c4043
Signed-off-by: Xavier Raynaud <xavier.raynaud@kalray.eu>
Reviewed-on: https://git.eclipse.org/r/19241
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-12-03 14:12:35 -05:00
Andrew Eidsness
16083fee1e Bug 422841: Add Q_CLASSINFO to the QtIndex
Qt allows string-based key/value pairs to be inserted into QObject class
definitions.  E.g.,

    class Q : public QObject
    {
    Q_OBJECT
    Q_CLASSINFO( "key1", "value1" )
    };

The class info is accessible in the meta-object system.  See:

    http://qt-project.org/doc/qt-4.8/qmetaclassinfo.html

For more information.

This patch adds the API to access these key/value pairs from the
QtIndex.  The values are stored in a single block in the PDOM record for
the QObject.

The API returns the value for a given key if it is found in the receiver
QObject or any of its base classes.  The API returns the first such
value that is found.

This patch also adds a test case for this functionality.

Change-Id: Ie3f821a0c5f6f1347a0c0c6dafa184510ae26c29
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19154
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-12-03 09:05:53 -05:00