Commit Graph

188 Commits

Author SHA1 Message Date
Erik Verbruggen
7270633f86 C++: removed pre-defined macros that should come from windows.h
Task-number: QTCREATORBUG-5734
Change-Id: Ie4aa437616955fd65fcc6adbfc0e9f115caf7e1c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-26 15:28:07 +02:00
Thorbjørn Lindeijer
c2f31f16dc Added support for Microsoft-specific inline keywords
__inline is equivalent to inline.
__forceinline is used to override the cost/benefit analysis.

Change-Id: Ifc7c94c1798f98c553ffa979a722ede9df11b3f0
Merge-request: 2206
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Reviewed-on: http://codereview.qt-project.org/4416
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-08 12:02:28 +02:00
Leandro Melo
5d93161248 C++: Add __try, __except, and __finally to configuration
This is not really a direct mapping to the Microsoft specifc
ones, but I guess defining such macros is an acceptable solution.

Change-Id: I17a9414364ef664f2e8afa7ececc6a87f663049e
Reviewed-on: http://codereview.qt.nokia.com/4277
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2011-09-06 17:30:58 +02:00
Leandro Melo
b237464045 C++: Normalize line ending for preprocessing
There is logic in the preprocessor that assumes a normalized line
ending. Other patches have already fixed the issue in other parts.

Change-Id: Iac262da361b6528cc9466a6c87e83da95af9ea04
Reviewed-on: http://codereview.qt.nokia.com/4252
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-09-06 13:58:03 +02:00
Christian Kamm
9f7a2194f7 QmlJS: Fix infinite loop when scanning for exported C++ types.
Setting extra diagnostics would call updateDocument which would in turn
trigger another scan.

Change-Id: I3810a380cdf716a12767d94ff82dc30f8ae3954d
Reviewed-on: http://codereview.qt.nokia.com/3917
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-31 10:53:21 +02:00
Christian Kamm
94a00259ac C++/QmlJS: Warnings if C++ based QML type detection fails.
Change-Id: I1e206e09c4068cc541978ee148f9ed8c4138c249
Reviewed-on: http://codereview.qt.nokia.com/3579
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-30 12:03:34 +02:00
Christian Kamm
6f3dc3198c C++ editor: Prefer to use extra selections to find diagnostics.
Change-Id: I5f1c6e29c8386018cfd4d45d8ee63fc3e24311f6
Reviewed-on: http://codereview.qt.nokia.com/3484
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-25 14:38:08 +02:00
Christian Kamm
93e367ed0c C++: Don't strip comments from preprocessed source code.
Change-Id: I3a4817d36b9c724abca504c42914a73f97ab34c7
Reviewed-on: http://codereview.qt.nokia.com/3480
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-08-25 13:20:09 +02:00
Christian Kamm
27d0830698 QmlJS: Move the exported-C++-type detection out of C++ code.
It now lives in qmljstools/qmljsfindexportedcpptypes, all in one place.

Also ensures that the source code is available when a file is being
scanned for QML exports. This will enable checking comments for
annotations about the URI a plugin is usually imported as.

Change-Id: I1da36d0678e0a8d34b171dbe0f6b5690d89eb18b
Reviewed-on: http://codereview.qt.nokia.com/3392
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-24 12:13:41 +02:00
Erik Verbruggen
7e43490f99 Emit a signal when parsing is finished after updating source files.
Change-Id: I8a8878c420c0f8d24db16d606aace42519ac3047
Reviewed-on: http://codereview.qt.nokia.com/1151
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bill King <bill.king@nokia.com>
2011-07-05 16:10:06 +02:00
Christian Kamm
cf7663b2de QmlJS: Read the 'revision' property generated by qmldump.
Change-Id: Ia31b1845b1e1e5aabc347dc115e580c72e36f4e3
Reviewed-on: http://codereview.qt.nokia.com/200
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-30 09:31:37 +02:00
Leandro Melo
ab40e9c78e C++ editor: Remove scanning/caching of includes
With the completion now in a separate thread this should
no longer be necessary.

Reviewed-by: Roberto Raggi
2011-05-18 12:35:53 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
hjk
f576ad9f2c texteditor: merge ITextEditable into ITextEditor
rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor
rename BaseTextEditor{,Widget} subclasses
rename editableInterface->editorInterface
rename createEditableInterface->createEditor
minor cleanups after renamings
2011-02-22 11:23:53 +01:00
Christian Kamm
187ae1e94a QmlJS: Rework FakeMetaObjects to no longer contain pointers.
Having a duplicate prototype chain - once in FakeMetaObjects and once
in QmlObjectValues was unnecessary. Now FMOs don't contain references
which may allow other simplifications.
2011-02-10 17:04:22 +01:00
Friedemann Kleint
edb4893547 Header cleanup in src, specify module name. 2011-01-24 12:29:48 +01:00
con
a444cdc7aa Limit depth of include scanning to avoid performance problems.
Reviewed-by: Thorbjørn Lindeijer
2011-01-12 10:19:48 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
Christian Kamm
283a3d32cd Qml/C++: Fix performance problem with type extraction.
By moving the offending code into a background thread.

Reviewed-by: Erik Verbruggen
2011-01-06 15:02:06 +01:00
Christian Kamm
ab642bc820 QmlJS: Add refcounting to FakeMetaObjects.
Previously they were leaked when a qmldump or the C++ exported QML
type list updated.

Just deleting the previous FakeMetaObjects is not an option, as they
might still be used in a QmlObjectValue owned by an Engine.

Reviewed-by: Erik Verbruggen
2011-01-06 15:01:09 +01:00
Christian Kamm
12f2a0fbda Qml/C++: Disable qmlRegisterType exposing until performance is better. 2011-01-05 10:29:46 +01:00
Christian Kamm
0194da7300 Qml-C++: Find C++ qmlRegisterType calls and populate QML code model.
Reviewed-by: Erik Verbruggen
2011-01-04 15:58:22 +01:00
Christian Kamm
5f50a6ae34 C++: Move the ModelManagerInterface from CppTools to CPlusPlus. 2011-01-04 15:58:21 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Alessandro Portale
493710c2ac Do not scan "/" for include files
The scanning phase was in some cases insanely long.
Reason was that Creator feeds wrong paths to the
CppModelManager, for example "/".

The scanning phase did what it was told to: scan that whole
Harddrive.

This patch makes sure that the scanning is not done for "/"

Done-With: Roberto
2010-10-03 09:28:03 +02:00
Alessandro Portale
b9d3c1f54a No Samba while including files
(The other Samba is meant. The slow one, not the nice one.)

Creator manages to feed the CppModelManager with all kinds of
wrong include paths. That is usually not a big issue as long
as that path is not a simple "/".

CppManager appended a separator to all incoming include paths.
And when the above "/" was passed in, we had (on my machine)
7 seconds of Samba Network lookup, multiple times during a
parse. And the sad thing was that my dear colleagues in the
Intranet did not even have the searched-for header files on
their shared folders.

This patch makes sure that a separator is only appended if
the path does not already end with one.

The real core of the issue (wrong include paths from Creator)
still needs to be fixed.

Done-with: Roberto Raggi
2010-10-03 09:23:48 +02:00
Roberto Raggi
a340cd118e Get rid of the numeric literals. 2010-09-02 12:51:01 +02:00
Roberto Raggi
0540aa362d Get rid of the old Semantic pass. 2010-08-13 16:55:43 +02:00
ck
46f537e56a Quickfix: Convert underscore notation to camel case.
Reviewed-by: Roberto Raggi
2010-07-20 11:07:14 +02:00
Roberto Raggi
84ebb1048d Moved CheckUndefinedSymbols to the cpptools plug-in. 2010-07-05 17:35:54 +02:00
Erik Verbruggen
e3e8b1a5c0 Removed the TokenCache. 2010-07-02 11:18:51 +02:00
hjk
2f5f358ff4 Core::Context: compile hot fix for Windows. 2010-06-25 17:38:25 +02:00
Erik Verbruggen
e42ca194c5 Introduced token caching to prevent repetetive tokenizing.
Also removed TokenUnderCursor as it's functionality is in the token cache.

Reviewed-by: ckamm
2010-06-14 10:10:05 +02:00
Erik Verbruggen
424b9724d6 Revert "Introduced a token cache for the C++ editor."
This reverts commit c2393df023.
2010-06-04 12:37:26 +02:00
Erik Verbruggen
c2393df023 Introduced a token cache for the C++ editor.
This should speed things up a bit, because before, the line was tokenized at
least 3 times.
2010-06-04 09:36:05 +02:00
Roberto Raggi
1c078ec2a3 Ensure we keep the context around for as long as it is needed. 2010-05-31 12:37:15 +02:00
Roberto Raggi
653ca110fe Removed DeprecatedLookupContext. 2010-05-26 15:56:12 +02:00
Roberto Raggi
405353ab23 Removed the CppBindings. 2010-05-25 17:15:23 +02:00
Roberto Raggi
c5d110d6a3 Don't check for undefined symbols in CppModelManager. 2010-05-25 17:15:21 +02:00
Roberto Raggi
8caff49468 Simplify Process. 2010-05-10 10:19:37 +02:00
Roberto Raggi
dca2e82160 Removed obsolete code. 2010-05-10 10:15:23 +02:00
Roberto Raggi
3e440ec213 Cache the resolved file names. 2010-05-10 09:57:56 +02:00
Roberto Raggi
9e7c13721e Don't use the mime type db to reorder the source files.
It seems that the mime type db got pretty slow, and reordering files
can take minutes.
2010-05-07 11:03:33 +02:00
Roberto Raggi
32a84df5c0 Deprecated the current LookupContext. 2010-05-05 16:36:44 +02:00
Thorbjørn Lindeijer
41ab8fbbf1 Moved TextEditDocumentLayout and related classes to their own file
The Parentheses, TextBlockUserData and TextEditDocumentLayout classes
and their member function implementations were spread around the
BaseTextEditor class. Moving them to their own file to make the code a
bit better organized.

Reviewed-by: mae
2010-04-26 14:42:11 +02:00
dt
f093d0806b Cancel code model indexing on project closing and full code model update
Task-Nr: QTCREATORBUG-1151
2010-04-26 12:29:50 +02:00
Erik Verbruggen
a8fc1f48d4 Fixed icheck build. 2010-04-23 15:25:22 +02:00
con
616cf61f45 Include scanning fixes.
Allow include paths with any suffix, and do some sanity check for
existence of paths.

Reviewed-by: Thorbjørn Lindeijer
2010-04-14 18:07:41 +02:00
con
b4367cb9a0 Some naming of the progress indicators. 2010-04-14 12:59:30 +02:00