Commit Graph

1332 Commits

Author SHA1 Message Date
Oswald Buddenhagen
6d1d5dd470 replace platform conditional with QMAKE_DIRLIST_SEP
Change-Id: I2646a2c30573417ba9da4b57b100d33144cef349
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-04-14 21:02:59 +02:00
Oswald Buddenhagen
1283859116 fix qt4 build: remove extra spaces
qt4 qmake does not like spaces between 'for' and the opening paren.

Task-number: QTCREATORBUG-12024
Change-Id: I8697272b4f752495f3bf6ff2c6d01c4ac2ea837f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-04-14 11:27:21 +02:00
Oswald Buddenhagen
1fb187f513 fix use of $$split()
it takes a variable, not a value.

the spec_pre.prf part is cherry-picked from qtbase/89a558d6b0fac.

Change-Id: Ie7e551cf0b889d7682f032124dd0466ada6972e4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-04-14 09:01:46 +02:00
Oswald Buddenhagen
039c7bed1a remove stray semicolon
Change-Id: I9b98ddc6f3efdf8d16a373fa6e3d92480c8629d6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-04-11 16:22:50 +02:00
Orgad Shaneh
530332c255 CppTools: Replace Method with Function
Change-Id: I6405c4dfa07eba1ea09ba23fe20667769eaca748
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-03-31 19:59:39 +02:00
Erik Verbruggen
b0618281ec C++: Do type and name equality checking in a safe manner.
Change the TypeMatcher to also match names, and use two "block" lists
in SafeMatcher to prevent infinite recursion.

Task-number: QTCREATORBUG-11240
Change-Id: I0367ae795ee6be579b83aeb8d46723c877e4aa75
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-03-27 13:46:55 +01:00
Nikolai Kosjar
0d84603c41 CodeModel(s): Unify name/values of accessed environment variables
Format: QTC_*=(1|0).

Now it's easier to change them in the Run Configuration of Qt Creator.

Change-Id: Ifc45cecb89b33a31942b4c3e2d03851a1d72d0bf
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-26 15:57:21 +01:00
Erik Verbruggen
ae24a88e90 Clang: never include a define for __cplusplus.
The flags used by the project explorer to interrogate the toolchain for
compiler-defined #defines always indicate a C++ file. So, this will
always include a #define for __cplusplus. When editing C code with
the clang code model, this results in extern "C" linkage specifications,
which result in warnings or errors.

The proper fix is described in QTCREATORBUG-11709, but is too big to be
done within the 3.1 timeframe.

Task-number: QTCREATORBUG-11501
Change-Id: Id9e261fa8d429fead4a2cd5fd7398aa6e1e8c13d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-03-18 11:08:20 +01:00
Nikolai Kosjar
332caf38be Clang: Print cmd line equivalent if using QTC_CLANG_VERBOSE
...so we can easily check if the bug is in (lib)clang itself.

Change-Id: Id6dfd8014efc1c7704265b99697f19ab990286a7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-17 14:48:33 +01:00
Nikolai Kosjar
5031c49cfe Clang: Fix crash if updating pch info
Function-local variable 'updateParams' was referenced after destruction.

Change-Id: Iac9663ba4ca9c3a603bc530f57f419b734782694
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-07 13:19:35 +01:00
Nikolai Kosjar
a723205f6c Clang: Do not use Core::MessageManager from worker thread
...since that's not thread-safe and thus leads to crashes from time to
time.

Change-Id: I907ae8b5c4d60bfc82bc97b55cc5d62d8bbeae04
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-05 13:16:27 +01:00
Friedemann Kleint
249a8b2d24 tr()-Fixes in CLANG code model.
Do not use QObject::tr(), use native file paths,
use complete contexts.

Change-Id: Icc4990b4c2ca5b9ae6f6b639db9e1a45a93e0a65
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-03-03 18:11:22 +01:00
Erik Verbruggen
346e84d219 C++: introduce a project config file field in the projectPart.
This field is used by the generic project manager which passes the
".config" file in it. The advantage is that both the SnapshotUpdater and
the clang code model do not need to do anything smart, but can pass it
directly to the preprocessor.

Task-number: QTCREATORBUG-11390
Change-Id: I44fc7b20afd28fb59608412f2cce86af6f7e7d6b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-02-27 15:58:17 +01:00
Erik Verbruggen
e6c32fe940 Clang: add back flag indicating incomplete translation units.
This speeds up the semantic highlighting significantly.

Task-number: QTCREATORBUG-11346
Change-Id: I968f066fff7002a9cc10dd9577a750644efe026b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-02-25 13:29:44 +01:00
Erik Verbruggen
31d051a52a Clang: tune include paths used by clang
Do not search the standard system directories for include files, but do
search compiler builtin include directories. To make sure that the
include files for intrinsics are the ones clang can parse, put that
path first on the command-line.

Change-Id: I2ada992b58203d1c3dbd55851c5f195c12572943
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-12 11:52:58 +01:00
Orgad Shaneh
7ed1576083 Clean up single namespace forward-declarations
Done using the following ruby script:

Dir.glob('**/*.h').each { |file|
  if File.file?(file)
    s = File.read(file)
    t = s.gsub(/^namespace .+ \{\n\s*class .*;\n\s*\}.*$/) { |m| m.gsub(/\n\s*/, ' ').gsub(/\s*\/\/.*$/, '') }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  end
}

Change-Id: Iffcb966e90eb8e1a625eccd5dd0b94f000ae368e
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-02-12 09:30:37 +01:00
hjk
b7ec5fb375 Clang: Coding style
Change-Id: Ib7dc759e8db7cf37fbcd7f75d28b29bf95593d6c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-05 11:18:51 +01:00
hjk
944d80dcdc Clang: Adjust singleton access style to more recent use.
Change-Id: I7d98f598b1c7f7b871a862ec121b83128d8b2752
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-05 11:18:44 +01:00
hjk
bb44eca27d ClangCodeModel.pluginspec: s/Nok/Dig/
Change-Id: I3e7bc182350702c72a99389ff4b92ad58de8efe6
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-05 11:18:16 +01:00
hjk
0edf62e533 Clang: Simplify some condition
Change-Id: I4d68734b2d30d7922359020ea2c64d764d6efb7a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-05 11:18:05 +01:00
Thiago Macieira
f1606a9f58 Normalize signal & slot signatures in connection
Profiling shows Qt Creator spends 2% of its load time normalizing

Change-Id: I7c38825875c8db58813792dcb86b3a88945466f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-02-03 20:19:44 +01:00
hjk
4d96fa7aba Core: Merge Find and Locator into Core plugin
Change-Id: I7053310272235d854c9f409670ff52a10a7add8b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-14 07:43:00 +01:00
Erik Verbruggen
a4b6e35ac4 Clang: clean up unit handling.
- Use a QSharedPointer instead of an explicitly shared pointer.
- Remove the LiveUnitManager.

Change-Id: I05bf32c1f77c17f42ee1da39f1353cff580fa6eb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-01-10 15:33:50 +01:00
Erik Verbruggen
28180a415a Clang: do not pass the CXTranslationUnit_Incomplete option for parsing.
This flag is meant to be used when generating pre-compiled headers.

Change-Id: I4758f36c5774e7da8c3b6cc401ea4245761d2278
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-01-10 10:15:41 +01:00
Robert Loehning
5292748bf2 Incremented year in copyright info
Change-Id: I6e25ba25aa2898b5382dae7f3751deebb6072efa
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-09 09:41:23 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Christian Kandeler
9fd21d8785 ClangCodeModel: Add qbs project file.
Not all logic present in the qmake project file for determining paths and
library names is replicated here: At the moment, all paths are derived from
the LLVM_INSTALL_DIR environment variable, and the library name is assumed
to be always "clang". Consolidation can be done when stabilizing the
logic.

Change-Id: Ib1ac8cf2465262e90325addb46f821549048a172
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-07 18:05:24 +01:00
Nikolai Kosjar
83bfaa630b Clang: Add README
Change-Id: Ib79cfa43713269e01eea196e035e01afcdd66e12
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-01-06 14:24:09 +01:00
Nikolai Kosjar
91a2141faf Clang: Show LLVM_LIBS and LLVM_INCLUDEPATH
Change-Id: I915a56786f29b2c6bef5b7b31a68c1a8961f241a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-06 14:01:14 +01:00
Nikolai Kosjar
386c37cdec Clang: Always prefer llvm-config* from LLVM_INSTALL_DIR
Change-Id: I981c39fcbb9d17115c62cb88499c2354cffc9fa5
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-06 14:00:56 +01:00
Nikolai Kosjar
a20c874f73 Clang: Fix compilation on Windows
...for LLVM snapshots (http://llvm.org/builds).

Check for lib/libclang.* if lib/clang.* is not found.

Change-Id: I6e24ac0fe696153626ded1ed3a7db85ce8d7b0f2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-06 14:00:48 +01:00
Erik Verbruggen
5beb74fd9d Add experimental clang code-model plug-in.
Previously known as the wip/clang branch.

Contributors (in alphabetical order):
- Christian Kamm <christian.d.kamm@nokia.com>
- Erik Verbruggen <erik.verbruggen@digia.com>
- Leandro Melo <leandro.melo@nokia.com>
- Peter Kuemmel <syntheticpp@gmx.net>
- Sergey Shambir <sergey.shambir.auto@gmail.com>

Change-Id: I4c3ff600a19b6732641c1d5ef28236bf2cc17737
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-12-20 17:05:09 +01:00