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

75 commits

Author SHA1 Message Date
Alena Laskavaia
dcc9de7b0e fixed schema validation error on Mars
- more errors...

Change-Id: Iab24ae4f7e95bd674765855b54eeb7de019b2162
2015-03-16 20:10:53 -04:00
Marc-Andre Laperle
afd11359e6 Extract test VM args to common property base.test.vmargs
This makes it easier to change arguments for all tests. As a side-effect,
all tests now enable assertion (-ea) and have the same max heap size, etc.

Change-Id: I0965d40ba3283efe7eacdf927f6c302ee0ab30f0
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2015-02-06 13:02:28 -05:00
Sergey Prigogin
03e69933b1 Bug 459179 - ClassCastException in CPPSemantics.getParentScope
Return proper global scope in QtPDOMLinkage.getGlobalScope() method.
2015-02-04 21:38:28 -08:00
Sergey Prigogin
b465383510 Bug 459179 - ClassCastException in CPPSemantics.getParentScope
Fixed compilation error in QtPDOMLinkage.java.
2015-02-04 21:34:53 -08:00
Sergey Prigogin
252eaf4c0f Incremented CDT feature version to 8.6.0.
Change-Id: Ic90c8e6a68d21e5b90ec3fac997da6a95a29bedf
Signed-off-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Reviewed-on: https://git.eclipse.org/r/39066
Tested-by: Hudson CI
2015-01-06 19:40:38 -05:00
Doug Schaefer
1681eb8676 Revert "Bug 451929 - Leverage p2 ability to express native packages"
This is breaking downstream builds.

This reverts commit 18e6101a53.

Change-Id: I5dd2ee129518757866ab832c683b648d13b07b83
Reviewed-on: https://git.eclipse.org/r/38594
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2014-12-23 00:05:47 -05:00
Pascal Rapicault
18e6101a53 Bug 451929 - Leverage p2 ability to express native packages
Change-Id: I0d2d4b5088a0148d3f0dc7690448fe231ae45103
Signed-off-by: Pascal Rapicault <pascal@rapicorp.com>
Reviewed-on: https://git.eclipse.org/r/38272
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-12-16 17:28:33 -05:00
Doug Schaefer
c8ba1b6c3a Get rid of the extra schema includes to expressions.
This causes build errors when using Mars.

Change-Id: I5b7aaa261e252b7aa7a2afe5a86398c4f24af0aa
Reviewed-on: https://git.eclipse.org/r/38174
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-12-14 17:42:12 -05:00
Alena Laskavaia
b53246227a Optimzed Qt codan checker not to lock the ask if not running
Change-Id: Iff6749ea46f9c6970b4e96e47d8554846feb0dfe
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/37304
2014-12-01 17:00:12 -05:00
Alena Laskavaia
1e517e23e4 another attempt to fix race condition in Qt tests
after tests were fixed found funny bug that was there forever test was
creating incorrect header file because our comment extractor takes
comment from first occurence of function name, it is not actual java
parser. Because indexer was not running test was passing.

Change-Id: Ib0cea722e6c9766949d07b629ef7a9197529ef45
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/37410
Tested-by: Hudson CI
2014-12-01 16:58:28 -05:00
Teodor Madan
660fa3fdfe Include expressionLanguage.exsd - fix occasional PDE errors
"referenced element 'enablement' is not defined"


  
Change-Id: I40a84a249e0e2488e4600a67a9eab935298048e4
Reviewed-on: https://git.eclipse.org/r/33499
Tested-by: Hudson CI
Reviewed-by: Teodor Madan <teodor.madan@freescale.com>
Tested-by: Teodor Madan <teodor.madan@freescale.com>
2014-09-22 02:26:34 -04:00
Marc-Andre Laperle
97079f6ad0 Add missing arg for jacoco in in tests. Update jacoco.
Jacoco arguments are missing when executing certain tests. This happens when
argLine is being overriden. We had the same problem in Linux Tools. We solved
it by prepending the argLine with ${tycho.testArgLine}. This should help
improving the Code coverage metric in Sonar.

Also update the jacoco version to fix a bug when building with Java 8.

Change-Id: I7f73f40488efc01fc7d643940c1ac0d5950c900d
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/32507
Tested-by: Hudson CI
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
2014-08-28 15:40:26 -04:00
Marc Khouzam
1a48e6064b Update pom.xml of features for which version was changed to 8.5
Change-Id: I6c4e258ac7d86a3df7a064614fa80430219d5561
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-07-24 13:35:24 -04:00
Marc Khouzam
4a3ec6cd65 Update remaining feature versions to 8.5
Change-Id: I2f81d61650070353ec86159cfa215d58a0dd2c40
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-07-24 10:50:09 -04:00
Sergey Prigogin
d8154bd340 Inremented branding plugin version to 8.5 2014-07-21 17:39:01 -07:00
Andrew Eidsness
da09460352 Bug 437525: NPE in QMakeProjectInfoManager
This fixes the NPE but not the underlying reason for the Qt plugin to be
activated.  I think that might be happening because of the Codan checker
-- from what I recall, that extension point doesn't have a way to
prevent plugin activation.

The NPE is fixed by checking CACHE for null before using it.  The #stop
method unregisters and sets CACHE to null.  However, unregistering
doesn't prevent notifications that are already in flight.  I suspect
that notification arrives, and then CACHE is null.

My test workspace would throw the NPE on every exit, with this change it
never does.

Change-Id: I01360a4c19c85fba53269d265948daf6d083c8d1
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/28751
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2014-07-07 10:23:45 -04:00
Marc Khouzam
397b269e26 Bug 435998 - Remove 'updateSiteName' string as they are not used
Change-Id: I55485c9cba17f544d50d8e27b77d6644493d8300
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27500
Tested-by: Hudson CI
2014-06-18 15:54:57 -04:00
Marc Khouzam
ce9b270a38 Bug 435998 - Get rid of all "eclipse_update_120.jpg" files in CDT
features

Change-Id: I52a71e62f8161990657e96ef52403fd7f69698a2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27499
2014-06-17 11:33:37 -04:00
Marc Khouzam
2c22479c9e Bug 435309 - Use the shared license file scheme for CDT
This means that:
- feature.xml files now make a reference to the shared license plugin
      using version 0.0.0
- feature.properties files no longer have the text for the license
- license.html and epl-v10.html files are removed as they are part
      of the shared license plugin
- build.properties files no longer reference removed files
- the main pom.xml file references the license repository

Change-Id: Ibd880480de3a07597084d44cce7b822903509079
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27250
2014-05-26 10:03:45 -04:00
Sergey Prigogin
4e6315d501 Added project-specific Java compiler settings. 2014-05-21 11:04:30 -07:00
Marc Khouzam
5806deb5b8 Update to new license text
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-05-20 11:36:39 -04:00
Nathan Ridge
6cbdabfbec Bug 432701 - Move code that determines the value of an initializer to SemanticUtil
Change-Id: I0fcbad27155d875b420ce99cd9e9ba202448cc59
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/26418
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-05-14 12:27:57 -04:00
Marc Khouzam
fa5de3be3b Update license.html files for 2014 version
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-05-02 11:17:44 -04:00
David Kaspar
82853c889d Bug 433869: IQMakeProjectInfo is not updating on active conf. changed
Fixing incorrect eventTypes used for registering
CProjectDescriptionListener in QMakeProjectInfo.start() method.

Change-Id: Ieb602a38999868e3da8487a1757c69bd50cb5837
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/25808
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2014-04-30 15:34:21 -04:00
Doug Schaefer
e907795125 Bug 432839 - Fix out of memory condition with Qt projects.
Turn the cache in QtPDOMLinkage into a WeahHashMap.

Change-Id: I261d3aec5ee6b7537c4bfaa204dadd85b686140c
Reviewed-on: https://git.eclipse.org/r/25064
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
(cherry picked from commit b12b65bfb8)
Reviewed-on: https://git.eclipse.org/r/25069
2014-04-15 12:06:40 -04:00
David Kaspar
698788ea71 Bug 431012: Missing IQMakeProjectInfo.updateQMakeInfo()
Adding IQMakeProjectInfo.updateQMakeInfo():QMakeInfo method to allow
explicit calculation of QMakeInfo at the time of the method call.

Change-Id: I665bedd5e095d1968f0c39ff2abb19c60aac9e14
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/23800
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-03-24 15:01:26 -04:00
David Kaspar
73a912f95b Bug 429488: Fix for deadlock in QMakeProjectInfo.updateActiveConfiguration
To prevent a deadlock between two the workspace and QMakeProjectInfo.sync
locks, QMakeProjectInfo class has been rewritten to not call any method
under sync-lock except for IQMakeEnv.init/destroy method.

All methods should allow calling under workspace lock.

Added a new IQMakeEnv2 interface to provide an explicit init method.

Original QMakeProjectInfo has been split to
QMakeProjectInfo and QMakeProjectInfoManager.

This change is fully backward compatible.

Change-Id: I880f22dd9bd999af1d3f47e4a3c4c0ab216b4ad2
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/23270
Tested-by: Hudson CI
Reviewed-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-03-12 20:50:01 -04:00
Andrew Eidsness
71fa7cf819 Bug 426784: Qt Codan checker uses wrong type
view.connect( view.engine(), SIGNAL( quit() ), ...

The return type of view.engine() should be checked for the quit()
signal.  The implementation was actually checking the type of view.

I've fixed a copy/paste error in a utility function.

Change-Id: Id483015214f04951fb30e3271d43499f31614446
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/21189
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-01-29 16:12:49 -05:00
Andrew Eidsness
d613b149a0 Bug 426781: Qt content assist is too aggressive
In Content Assist cases like:

    q->

(when the cursor is to the right of the arrow operator) the name that is
returned by the content assist context is the empty string.  This was
used to check if the QObject::connect function applied.  Since the empt
string matches all bindings the Qt assistant incorrectly continued.

I've added a check to stop processing when the current name is the empty
string.

Change-Id: I4e5bf52f4ca1ddc33d88a48917213adbbeb81836
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/21188
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-01-28 11:06:40 -05:00
Sergey Prigogin
5d7a19fa6c Enabled JDK 1.7.
Change-Id: Ic2a161ea3c318dc1e8ba01c271c936bf5ed8763d
Reviewed-on: https://git.eclipse.org/r/21020
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-24 13:38:55 -05:00
Sergey Prigogin
1d166260a8 Bumped up CDT version to 8.4.
Change-Id: I1229344feaaed4a3551ceb7b1ef1410545048b55
Reviewed-on: https://git.eclipse.org/r/20908
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-21 17:35:29 -05:00
Andrew Eidsness
fd074ab029 Bug 425102 QObject::connect content assist still broken
The content assistant was treating all function calls in the same way.
Here is an example showing the two cases that should be handled:

    qobj.connect( qobj.func(), SIGNAL( sig() ), SLOT( slot() ) );

In this case sig() applies to the return type of qobj::func() and slot()
applies to qobj (the same instance that connect is called upon).

The previous implementation of the assistant was not making a
distinction between these two cases.

I've added another test case to confirm behaviour in this area.

Change-Id: I8f76a5d5ae7384ea5162c5d36abeebb4c79c394b
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20848
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-20 22:40:56 -05:00
Andrew Eidsness
25a0992a63 Bug 425787: Reindex projects when Qt nature is added
If a project description is changed to add the Qt nature then the PDOM
needs to be rebuilt.

Since index rebuilds are potentially expensive, this first checks to
make sure the PDOM does not already contain the QtLinkage.  If the
linkage already exists, then it will be updated by the normal triggers.

The reindex operation should only be needed to add the linkage the first
time the nature is added.

This does not trigger a reindex if the nature is removed.  Without the
nature, the extra linkage will be safely ignored.  The C++ linkage is
(proportionally) much larger than the Qt linkage, so it doesn't make
sense to spend significant time rebuilding the index just for the small
space savings.

Change-Id: I263b05e4de407775979843f5d6a9c8c172948d72
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20680
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-20 12:11:46 -05:00
Doug Schaefer
801c10d789 Bug 425938 - Make Qt5 template work with 5.2. Remove Qt4 template.
Change-Id: I422a907e9db51be26acd0857d3e9e409bbd3ba2e
Reviewed-on: https://git.eclipse.org/r/20728
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-17 10:06:53 -05:00
David Kaspar
81ebdf8e82 Bug 422797 - API for retrieving QMake information from Qt project
Changes:
* QtPlugin calls QMakeProjectInfo.start/stop to start/stop listening
  on resource changes
* QMakeProjectInfo listens on changes in project description
  e.g. changing natures
* QMakeProjectInfo.getQMakeProjectInfoFor() returns info even for
  project without QtNature - this prevents race-condition that happens
  when opening legacy QML projects where QtNature is added lazily after
  the project is opened and somebody already asks for QMakeProjectInfo
* Fixing QMakeProjectInfo.stop() and
  QMakeProjectInfo.getQMakeProjectInfoFor() to fire notification outside
  of synchronized blocks

Change-Id: Ib49238f252a249d2b5936b6d8344aae93e0ef583
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/20722
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-17 10:01:12 -05:00
Andrew Eidsness
54a0b2dd06 Fix Qt core plugin's provider and plug-in names
Change-Id: Ib38b93cb2e1fef0b1e57cd4afed14c35b4bccb23
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20606
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-14 09:53:09 -05:00
Andrew Eidsness
6873bc9001 Bug 422841 QtIndex accessor for QmlRegistrations of an IQObject
This adds an API method to IQObject that will return the list of QML
registrations for that type.

I've also renamed the previous "QmlRegistered" to "QmlRegistration"
because it makes more sense.

The main part of this patch is a change to the QtPDOMLinkage.  It now
maintains an index of the registrations that are keyed by type.  The
index is a BTree that uses the QObject name as the key and a list of QML
registration PDOMNames as the value.

The list is created in the linkage's onCreate callback.  Old names are
removed in the list's onDelete callback.

This includes a test case for this scenario and also updates the
previous tests to match the new naming.

Change-Id: I4b994a51958c848b4e2a3209165e6e6866e22270
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20527
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-13 10:54:42 -05:00
David Kaspar
5927d7ea30 Bug 422797 - API for retrieving QMake information from Qt project
Adding a new IQMakeInfo getter:
* getQMakeQueryMap()
* getQtDocPath()
* getResourceFiles()
* getFormFiles()

Fixing incorrect parsing of OTHER_FILES variable.

Adding QMakeTests.testQMakeInfo() JUnit test for qmake output parser.

Change-Id: Ic4e0180381967e2a96455d6a3411fe51ce1cef91
Signed-off-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/20500
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-01-13 09:47:43 -05:00
Andrew Eidsness
f531f2f4d8 Bug 425102 New check for Qt Codan checker
The Qt Codan checker for QObject::connect function calls was not
confirming that the SIGNAL and SLOT expansion parameter were Qt signals
and slots.  The checker would allow the function call as long as the
expansion parameter resolved to a C++ method.

This patch changes the behaviour to required signals inside SIGNAL and
slots inside SLOT.

Change-Id: Ieec2f3a7ef4968d45ac3f6323b20c2f195fe3400
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20401
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-10 10:40:14 -05:00
Andrew Eidsness
030bfc50fb Bug 425102 QObject::connect content assist broken
The QObject::connect content assistant does not work when the receiver
of the function call is an implicit this.  E.g.,

class Q : public QObject { Q_OBJECT
    f()
    {
        this->connect( ... );   // works
        connect( ... );         // does not work
        QObject::connect( ... ) // does not work
    }
};

I've changed the Qt's ASTUtil.getReceiverType to navigate to the
ICPPClassType through the IScope's.  The previous implementation was
relying on the connect function call being an IASTField

I've also added a test case for this problem.

Change-Id: I96c29a9a452280068bda39a63414c50008bfad37
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20399
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-10 10:38:13 -05:00
Andrew Eidsness
78fc903d16 Bug 422841 QtIndex API for qmlRegisterType function calls
The Qt spec includes a special function that is used to introduce C++
types to a namespace that is accessible from QML.  E.g.,

	qmlRegisterType<Q>( "uri", 1, 0, "QMLType" );

This will create a QML type called QMLType.  The type will include the
signals, slots, and invokable that are defined in the C++ class Q.  The
type is accessible in QML using the given URI and the version is 1.0.

More information is available at:

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

This patch adds IQmlRegisteredType, a collection of which can be
accessed from a new method in QtIndex.

This also includes new test cases for this feature.

Change-Id: I70c44d1d8d3a0594de44e692a16f7b26396e8464
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20347
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-07 15:21:47 -05:00
Andrew Eidsness
0e196ca5f2 Bug 425002 QObjects cannot be found within namespaces
This changes the Qt PDOM so that QObject's are stored using their fully
qualified name (including leading ::).  IQObject's API has been changed
to return the fully qualified name.  Leading :: is stripped from the
IQObject name so there is no change from the previous implementation for
names that are not inside a namspace.

This includes a new test case to check this fix.

Change-Id: I1786151463e9029cdf1f2c213466adc8c3aa3618
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20328
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-07 11:48:49 -05:00
Andrew Eidsness
9d6055c4a3 Bug 422841: Add Q_GADGET to QtIndex
This extends the QtIndex to support C++ classes that have been annotated
with the Q_GADGET macro.  QGadgets are normal C++ classes that are able
to host Q_ENUMs.

The implementation classes for QObject have been modified to share
common parts with the implementation for QGadget.  The types are
intentionally not related in the QtIndex API.  This allows for divergent
changes in the Qt spec.

This patch includes new tests cases for Q_GADGET.

Change-Id: I59eb745ff5614c2897d67dd7d6807763091120af
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20236
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-06 09:52:15 -05:00
Andrew Eidsness
70f50274b4 Bug 424824: Codan checker for Qt
This implements a Codan checker for QObject::connect and disconnect
function calls.  There are several overloads for each function, but the
basic call looks like:

    Q * q;
    QObject::connect( q, SIGNAL( sign() ), q, SLOT( slot() ) );

This function calls requires that Q have a Qt signal called sign and a
Qt slot called slot, e.g.,

    class Q : public QObject
    {
    Q_OBJECT
    Q_SIGNAL void sign();
    Q_SLOT   void slot();
    };

The Qt checker raises a warning if either condition is not true.

It also raises a warning for SIGNAL or SLOT expansions without a
parameter.

Change-Id: If68a5bcdabb3f118801675e46ae926e6a250378a
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20231
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-02 21:53:46 -05:00
Andrew Eidsness
a512bbb011 Bug 424499: Find References does not work for Qt signals and slots
The QtASTVisitor is trying to use the QtIndex during indexing.  Any
results available at this time are based on the state of the AST the
last time the code was indexed.

This adds a test case to reproduce the problem.  The test cases indexes
the project one time.  It should find two references to the signal.  If
the QtIndex data is stale, then it will find 0 references.

This also replaces the code that looks for QObject::connect function
calls.  The proper behaviour is to find all overloads of #connect as
well as references with QObject::disconnect (all overloads) function
calls.

A new test case checks for references in all overloads of #connect and
#disconnect function calls.

Change-Id: I28fc4213d6dddff10f81a6bd3ef01e24c74f31db
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20223
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-02 21:49:38 -05:00
Andrew Eidsness
2e6729ef6f Fix version number in qt-feature
The version number of the feature should have been changed when the
plugin versions were changed (in commit c6c1ef9).

Change-Id: Ia6cf07edacd8cf2932b496e09c3d0aab579e9eda
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20068
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-02 14:29:50 -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
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