Commit Graph

44854 Commits

Author SHA1 Message Date
Niels Weber
2ab1a77e17 Documentation fix
Felt application startup time should be decreased
not increased.

Change-Id: I67129ad7632836771cdca968e736d03bf34594ea
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-02-18 09:37:28 +00:00
Orgad Shaneh
8b0d849a27 ExtraCompiler: Store contents as Utf8
Avoid conversions when they're not needed.

Change-Id: I7e996bc6e87be4327d75f0d743ff2de38d6ccc32
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-02-18 09:33:04 +00:00
Michal Policht
eba6912e17 Fix qtcreator_process_stub "cannot obtain a handle to the inferior" issue.
Don't close the process/thread handles, so that the kernel doesn't free
the resources before ConsoleProcess is able to obtain handles to them
- this would be a problem if the child process exits very quickly.
Also remove the superfluous free(env) for consistency.

Task-number: QTCREATORBUG-13042
Change-Id: Ie25eeab71cd9dfd69831c37e4f02477446486309
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-18 08:56:25 +00:00
Christian Stenger
97414e654b AutoTest: Add missing break
Change-Id: Iea7511356eb16f9bb6f14ae2504d72922cc2d9c3
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 15:08:52 +00:00
Marco Bubke
1eb0c94f81 Utils: Add SmallString
SmallString is a very simple utf8 string class. It's purpose is performance.
It uses a short string opimization which provides 31 bytes of heap free
memory to save a 30 bytes long string plus null terminator. If the string
gets larger heap is allocated. The grow strategy is 1.5 to improve reuse
of allocated memory.

It uses optionally constexpr to provide string literals.

Change-Id: I7757fb51abfeca200d074cbfce2f1d99edc0ecb0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-17 15:07:01 +00:00
Marco Bubke
7984e928d1 UnitTests: Rename CLANGBACKEND_TESTS in UNIT_TESTS
Change-Id: I26635a0c85edcc90cdffb93d3f9ae4ad4c8cb98e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-17 14:57:53 +00:00
Robert Loehning
122f896548 Squish: Update addHelpDocumentation()
Change-Id: I8b26f1e5efbc51058306ea7183c0b37bcbc49179
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-17 14:52:04 +00:00
Tobias Hunger
998c2a7380 SessionManager: Fix possible crashes in session manager
Change-Id: Icd97c765fb4d5b88ff2986b927433e2583817605
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-17 12:17:42 +00:00
Marco Bubke
8caedbd00d TextEditor: Remove copy and move in AssistProposalItemInterface
You should not not copy it anyway and it provides problems if you use move
only data types.

Change-Id: If9eab1ca265d89ccab9d947a534820da359d6054
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-17 10:36:52 +00:00
Marco Bubke
f8884501c2 Clang: Add Google Benchmark unit tests
Change-Id: I5d137aebd3e94f5d2f867d8ec007973a827491ec
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-17 10:35:34 +00:00
Eike Ziller
1eac1e60a2 Astyle: Fix concurrency issue with updating version
We may not access command() from a different thread, since it is not
thread safe.
We can also report the result just through the function return value.

Change-Id: Ib20c062f6541400040868b65308d9b2d2bd382d8
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-17 08:47:46 +00:00
Alessandro Portale
b01906b799 QtSupport: Compile fix for msvc
parameter cannot be called stderr, if it is not that stderr.

Change-Id: Ifdfbbd650ec7fe6aa9ce560ace96fbe65961c0b5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-16 19:01:54 +00:00
Marco Bubke
b11c14808d Clang: Fix broken windows build
Change-Id: I51b696cbb04e50058ace92a3ead04e3655b0a2f6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-16 18:27:44 +00:00
Nikolai Kosjar
89199b519b Clang: Indicate available "fix its" with a light bulb
...at the end of the line, just like for the "Apply Function Signature
Changes" refactor action.

* Hovering the light bulb shows the tooltip "Inspect available fixits".
* Clicking the light bulb leads to the refactoring menu, as if the user
  hit Alt+Return.

Change-Id: Iaf7b3734c43e21fc28e6b0658f517d98858c0e0c
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-16 18:12:12 +00:00
Eike Ziller
cd94f66af0 Astyle: Read the version also from stdout
Astyle writes it to different streams on different platforms

Change-Id: I3775ec31a9c31574bade79cdd8abfd7d14076859
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-16 17:09:23 +00:00
Ulf Hermann
33916d8078 QmlProfiler: Remove duplicate signal declaration
We want the signal from the base class to be sent.

Change-Id: Ic681b3b8527b849f5edd9fec476e5e9e1768408a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-16 13:47:28 +00:00
Robert Loehning
7aa8dc38e9 Squish: override startApplication in startCreatorTryingClang()
Change-Id: I6cb16c2a93ca46503f056c558eb8a6a2b33153d7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-16 13:16:00 +00:00
Robert Loehning
9d8e4aa922 Squish: Test overwriting of files when adding class
Change-Id: I86ed9a3749f692fe9ead13c31e0ba62c2baa3020
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-16 13:14:35 +00:00
Nikolai Kosjar
985309afbd Clang: Limit number of child diagnostics in tooltips
The number of child diagnostics (notes) can get quite high, consider:

 error: no matching function for call to 'someFunction'
  note: candidate function not viable: no known conversation from 'X' to 'Y1'
  note: candidate function not viable: no known conversation from 'X' to 'Y2'
  ...

If there are more than 10 child diagnostics (notes), show only the first
7, an ellipsis and the last 3 of them.

Change-Id: Id74e60f5872fb9aab0cfcb956e9b740456937dac
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-16 13:08:52 +00:00
Ulf Hermann
90a99bb512 QtSupport: Parse compile errors from qscxmlc
Change-Id: I2dd5051b34bb10be61ee3de8a85a244e7d5dbbe4
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 12:53:26 +00:00
Ulf Hermann
8643877c33 ProjectExplorer: Allow extra compilers to post compile issues
If we have a text editor for the source document the errors will be
highlighted in the editor then.

Change-Id: I02ed24783e7079c3d2cb308d8111b399cd77adb1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 12:53:20 +00:00
Ulf Hermann
2b48a4fa27 QtSupport: Support qscxmlc as extra compiler
Change-Id: Ief4810abe46ce4654f518781ce377e10a8e38ad4
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 12:53:15 +00:00
Ulf Hermann
2e3e060520 Generalize support for extra compilers
Allow for different extra compilers which may get called to generate
additional code for the code model. The build system is expected to
know what files are generated from which source file and the extra
compilers know how to generate the content of those files, without
touching the build directory. the uic adapter is refactored to be
the first such extra compiler.

The extra compiler is run when an editor for its source document
loses focus, or after a timeout of 1s when the source document has
been changed.

Change-Id: I13c110c61120c812f02639a3684144daf8979b37
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 12:53:05 +00:00
Christian Stenger
13e0abf526 AutoTest: Copy parse results only if necessary
Copying of the results is quite costly, so reduce this to a minimum.

Change-Id: I8db3bcd72c34ddd0bdc622ec3f2fd538c9679955
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-16 12:00:42 +00:00
Christian Stenger
ac659dd25a AutoTest: Create new tree items only if necessary...
...otherwise update existing. This reduces the number of items
that would get created or destroyed especially while modifying
code or just open/close test related documents.

Change-Id: Ia6a03ec33550c8c28e5120422e0f68fa428c1020
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-16 11:59:09 +00:00
Christian Stenger
7138d90377 AutoTest: Fix types of TestParseResult
Change-Id: I6a37822efab49164779d3f01c1f1a2390b90e3f9
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-16 11:49:21 +00:00
Christian Stenger
956db366cb AutoTest: Avoid triggering aboutToPerformFullParse twice...
...when switching projects.

Change-Id: Id4c9e4e4691ef93cea1fa7e40643c549634f0215
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-16 11:49:11 +00:00
Ulf Hermann
2e26d4abc8 QmlProfiler: Remove duplicate signal declaration
If the wrong signal was sent the desired slots weren't invoked. The
effect was that clicking on entries in the statistics view didn't take
you to the right source location anymore.

Change-Id: I187c3e53969558fb7992bb44f868c9d8730eaef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-16 11:28:43 +00:00
Niels Weber
d71e513c96 Fix compile with Qt < 5.6
Change-Id: I633d9f85efa709c41ec439f12b8963f612755008
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-16 11:26:30 +00:00
Niels Weber
8ac1f8eb29 Correct capitalization in wizard template and example.
Change-Id: I9a42ea97407179911d1736ba1ca79402d51d24c5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-16 10:59:41 +00:00
Friedemann Kleint
c41abd2b54 DocSettingsPage: Add a filter line edit for the registered documentation.
Change the item view to a QListView and use a model derived from
QAbstractListModel keeping a QVector of entries. Use a QSortFilterProxyModel
for filtering.

This makes cleaning old documentation easier.

Change-Id: I3a0781e0ddff3d0c00126a1b4effe1e1c93e354b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-16 10:06:26 +00:00
Orgad Shaneh
caf2ca0a37 VCS: Chop trailing slash for cache
When the directory is root (on both Windows and Linux), it ends with a slash,
and yet it is valid (although unlikely to be managed by VCS).

Chop the slash to avoid soft assertions.

Change-Id: I0f206b5a7ee70e9c641ff872fa21662f9d92aab2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:42:31 +00:00
Tobias Hunger
181f62c84a Make: Speed up reading compiler flags from build.ninja
Scan through the build.ninja file once for all targets instead once
for each target. This improves CMake project loading speed for
projects with many targets and a large build.ninja considerably.

Change-Id: I857c48a714dbb39a469f81c1f951a77f2f57578e
Reviewed-by: James Legg <jlegg@feralinteractive.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:41:26 +00:00
Niels Weber
68fe98abdf Silence a warning
Change-Id: Ie59da76a14c39208356268e601aef3ba6b5d245a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:39:17 +00:00
Ulf Hermann
bffaf9cc49 Qmake: Retrieve .h and .cpp extension variables with correct names
We will need them for more things than ui_*.h.

Change-Id: I394aa8646095cdafb426c15746243b27c1c1ab1b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:27:04 +00:00
Orgad Shaneh
2d4ea0b623 Git: Shorten grep tree description
Task-number: QTCREATORBUG-15743
Change-Id: I2f18bef84a8284d03d68797d1fb70165df6628d4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-02-16 07:52:12 +00:00
Kevin Funk
0d079062d9 proparser: Make compile
Change-Id: Ifb96fd11f542f9622ea3867c3bf877e722120136
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-15 17:44:14 +00:00
Tobias Hunger
a8c2abeaa5 CMake: Register files with the locator again
Change-Id: Ib3a42c22bfac18630b968cfd78744c7827ef7fad
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-15 15:58:57 +00:00
Eike Ziller
722707b2a1 Remove now usused QtConcurrent run extensions.
QtConcurrent::run is now replaced by Utils::runAsync with more features
and maintainable implementation.

Change-Id: Id7ad1fd723d41cbff62ecc557b85b59d70980934
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-15 14:32:50 +00:00
Friedemann Kleint
ca27222d0f Experimental clang-cl based toolchain: Support MSVC 2013 as well.
Search for MSVC 2013 if MSVC 2015 cannot be found since clang-cl
supports both. Amends change eb4d1584b6.

Task-number: QTBUG-50804
Task-number: QTCREATORBUG-15641
Change-Id: I0e57dfb080292020924cbcb69b87b47743775ec3
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-15 14:23:05 +00:00
Niels Weber
fd085ed268 Use "OS X" correctly in plugin template
Use Apple related terminology correctly.

Change-Id: Ib71fa5a080586027b3be8303ba5b7cf8058e669c
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-15 13:08:37 +00:00
Eike Ziller
6e5d4b892e CppTools/Editor: Use Utils::runAsync
Change-Id: Ifcc2a34e3478eb84f95221b79e39f7a670e6b2e0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-15 12:14:21 +00:00
Eike Ziller
6dbbc96112 ClangCodeModel: Use Utils::runAsync
Avoids global thread pool and is better maintainable

Change-Id: I5d5ffe66918a3e0ec95c1ab7c6b9d964f7a8de2f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-15 12:14:11 +00:00
Tobias Hunger
6c382e134b CMake: Handle deletion of builddir better
Change-Id: Ifeb35b14aba05c0e23a027b71f185ba20eed3e55
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:29 +00:00
Tobias Hunger
4a1a29d9c5 CMake: Fix generator parsing on Windows
Change-Id: I8afc8651fc1299a2a8782749966fd7ba770c9423
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:23 +00:00
Tobias Hunger
0d10ce3834 CMake: Disable BC if there is an error during initial cmake run
* Disable the BC and give report the cmake error
* Show a warning label in the BC

Change-Id: If5737d033fa2682c264ab7ac1189c59947e3b28d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:19 +00:00
Tobias Hunger
744008ccf0 CMake: Store CMake project configuration in CMakeBuildConfiguration
Store CMakeConfig in CMakeBuildConfiguration instead of the list of
initialArguments.

Update initialArguments to a list of settings on load.

Change-Id: If58fc38296a4627f40062dd407e684c8a9477f6e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:15 +00:00
Tobias Hunger
28e4306865 CMake: Add UI to display and edit cmake configuration
Change-Id: I95944dcd58dc86023c2757068979f92b8989011b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:11 +00:00
Tobias Hunger
f71b3652f4 CMake: Read CMakeCache.txt
Read the configuration from CMakeCache.txt files.

Change-Id: I7ddf9c9727420634086c973d0134059aac37ace0
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-15 11:57:08 +00:00
Leena Miettinen
3c484e3013 Doc: using Git Grep to search files
Change-Id: I0927565cf5eb8dd52a6e2daa1a69ea09ca3c5e2c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-15 11:29:22 +00:00