Commit Graph

45338 Commits

Author SHA1 Message Date
Christian Stenger
a73c824083 TextEditor: Fix compile for Qt < 5.5
Change-Id: I653d76452289a91fdb069be14dd2c8816f856306
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-23 11:45:06 +00:00
Marco Bubke
b21b5bb2ae TextEditor: Add mixins for font settings
You can only set one text style but in many cases like
Function and Declaration it would be nice if they could be merged.

Change-Id: Icda892057b79eef1bea2fa8b2c5f0f7cbc5f518a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-23 08:44:07 +00:00
Orgad Shaneh
d7a43eaa18 Tests: Build clang unit tests when clang is enabled
Change-Id: Ia3a07f73bd39304bb4bf1b67cb662499792fa2ca
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-22 15:57:41 +00:00
Orgad Shaneh
0c575700cb Clang: Fix highlighting of variables in lambda capture
void func() {
    const int var = 42;
    auto lambda = [var](int input) { // var is not highlighted
        return var + input;
    };
}

Change-Id: I95a5732ab8391e1232894e419b081c729e2d1ba1
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-22 15:38:42 +00:00
Marco Bubke
0f61908ab0 Utils: Add sized array
Sometimes you need a very small array which has a size and max size.
QVarLengthArray is simular but has some size and run time overhead and it
has no max size. It will instead malloc. So this array is for very small
collections under 256 values which never allocate and have only a size
overhead of a byte.

Change-Id: Ia392c750d566c4accc6077c3dc4d9d4ae501e599
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-22 14:53:12 +00:00
Orgad Shaneh
c632ce44f7 Qbs: Improve performance even further...
setupFolder is called recursively...

Change-Id: Ief1d1d45294a3821f5496d832a2130a8ff779f44
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-02-22 14:00:10 +00:00
Thomas Hartmann
0642c10512 QmlDesigner: Adding manual test for dummy data
This is a small project that tests the dummydata feature.

Change-Id: I710ec6ac8ebf86c85a155a812e581cca88845666
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-02-22 13:39:03 +00:00
Marco Bubke
7912213894 UnitTests: Use fno-omit-frame-pointer for profiles
Perf is not producing reliable stack traces without.

Change-Id: I5f594d45b06a66d91b0c687937dd948d6c724c62
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-22 13:33:43 +00:00
Eike Ziller
80d93ab52a Fix qtcreator.sh for the new Qt deployment necessary with Qt 5.6
We need to deploy Qt 5.6 into its own directory (lib/Qt/) in the
Qt Creator packages, so the LD_LIBRARY_PATH that is set in
qtcreator.sh needs that too.

Task-number: QTCREATORBUG-15748
Change-Id: I637322dfe5eb669b6447aa2f2b52e3ba2fe2979f
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-22 13:13:48 +00:00
Orgad Shaneh
d1631d695e Qbs: Improve performance of opening project
Task-number: QTCREATORBUG-15559
Change-Id: I5361c9803a9ce86bcfdc66026f946a048c5180e1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-02-22 12:29:13 +00:00
Christian Kandeler
4284a8fec7 Update qbs submodule.
To HEAD of 1.4 branch.

Change-Id: I78d92360ebd6bbf347584e30468ade40f2ce4843
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-02-22 10:42:52 +00:00
Marco Bubke
1c870e8b30 Utils: Fix forgotten header file in qbs
Change-Id: I9dd079e3757f7026e188fab7798f3f4bb7ce30ec
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-22 10:40:00 +00:00
Thomas Hartmann
a709bc3198 QmlDesigner: Improve heuristic to detect signal handlers
<item.onHeightChanged> is also a signal handler.
The old heuristic has to be applied to the last element after splitting
the string by ".".

Change-Id: Ied47bc6acbab32d782f6827cf849711aed600222
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-22 10:33:23 +00:00
Thomas Hartmann
89d93c0154 QmlDesigner: Do not collect the prototypes manually
The PrototypeIterator can handle cycles etc...

Change-Id: Ied47bc6acbab32d782f6827cf849711aed660822
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-22 10:33:15 +00:00
Thomas Hartmann
8aaf3a0922 QmlDesigner: Adding manual test for dummydata context property
This manual tests shows how to add a simple context
properties for the Qt Quick Designer.

Change-Id: Ied47bc6acbab32d782f6827cf849711aed600821
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-22 10:33:04 +00:00
Robert Loehning
e71cb3ae62 Squish: Update expected sizes of project tree in tst_session_handling
Directories in resource files are now displayed as
separate items, adding two more entries to the tree.

Change-Id: I398469bfe7680c73ab0440fdb9dc6f75e101f2f4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-22 10:21:11 +00:00
Christian Stenger
bad4cb4896 Tests: Fix wrong license header
Introduced with b278dc87ca.

Change-Id: I595384b35e9e5f2f319ec4e9c1ad92f7fc4bdcd4
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-22 07:22:36 +00:00
Alexandru Croitor
2a00686c7e TextEditor: Make copyLine action actually select the line.
Change-Id: Ibaeed5997b92b5bbe933dd8123e433fcf197e4fe
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-19 13:03:59 +00:00
Ulf Hermann
b643dc9599 Timeline: updateCursorPosition() also if file is unknown
We still want to synchronize the views in this case.

Change-Id: Ie65bec76b194bb9ac6027f16cbb770787a78d871
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-19 12:06:01 +00:00
Christian Kandeler
7b36dfd99b ModelEditor: Fix qbs build.
Change-Id: If7fa9f7bdd7150363ba35e29ff00f480d3f274a6
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-02-19 12:05:17 +00:00
Orgad Shaneh
c1ccd40af9 Core: Make ProgressTimer more fluent
Change-Id: I3d8995096150a4756ab6ebc2ac33dac695886ffc
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-19 10:21:53 +00:00
Orgad Shaneh
6234511a2c CppTools: Use a shared thread pool
Without this, too many threads are spawned, and loading a project takes
forever.

Change-Id: I3c22557ddd7bfb0c70f7b089c276432e3b003097
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-19 10:21:40 +00:00
Alessandro Portale
9c0faff713 Less "round" error icon
An octagon that occupies 12x12 pixels unfortunately looks like a circle.
This patch tweaks the diagonal to fix that a bit.

Also the hollow triangle gets a small tweak.

Change-Id: I8d69d94e96e7481c5a057926b6e7f933436f8e56
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-18 16:46:57 +00:00
Jochen Becher
9e1a4bdd2e ModelEditor: Destructor shall not throw
Change-Id: I2a565095e841c2a6e70b04ace2cf6f7a2955b583
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-18 16:36:00 +00:00
Jochen Becher
84761ec9f2 ModelEditor: Add UI for custom configuration path
Change-Id: I66fd8a8d89f2a75157d6bf4f6de2a81cc2c93aea
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-18 16:35:51 +00:00
Jochen Becher
bd319da256 ModelEditor: Introduce factory for properties view class
The factory allows usage of inherited view class for easy properties
extensions.

Change-Id: I73303a9c6f96df48dea508eadb9e829af32cdbe5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-18 16:35:36 +00:00
Jochen Becher
9bfd78260e ModelEditor: Support resorting of properties
The feature is not yet used but will be in one of the next changes.

Change-Id: I02fa5e3649fd7c067fae89a3ff4d99610c3386b6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-02-18 16:35:20 +00:00
Jochen Becher
b32988d132 ModelEditor: Fix translatability
Change-Id: I32d4573d24f30347de2f3753b973cf8e454d3378
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-02-18 16:35:08 +00:00
Nikolai Kosjar
a1071b5066 Clang: Handle fixits of main diagnostic in tooltip
So far we have assumed that:
 1) The main diagnostic explains the issue.
 2) The child diagnostics might have fixits attached that use the
    imperative in the text. Because of this we made the fixit texts
    clickable.

As it turns out, the main diagnostic itself also might have fixits
attached, as the following example shows.

  // Parse solely with the warning option "-Weverything"
  template <typename T> struct C {};
  C<C<int>> bla;

...which leads to

  warning: consecutive right angle brackets are incompatible with C++98
  (use '> >')

...which has no further child diagnostics, but provides a fixit.

The problem with this case is that it is not obvious for the user that
clicking the text will fix the issue since no imperative is used at
start of the text. For now, handle this case by making the text of the
main diagnostic clickable, too. But if we encounter more cases like
this, we probably should visualize the "you can apply the fix by
clicking here" concept differently.

Change-Id: Ia64e9821df783cba13d32395fab19251feca0398
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-18 13:01:44 +00:00
Ulf Hermann
3c634554dc Doc: Add section about data granularity in CPU Usage Analyzer
Change-Id: If70cf36387a3c7ca191bd6508d23db40258a2719
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-18 12:35:31 +00:00
Alessandro Portale
02af5d80b6 Themes: Enable UI recoloring for flat themes
Change-Id: I1907c42a769124b7505bd7afaf6c4da910f3f407
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-18 11:37:28 +00:00
Orgad Shaneh
fbffd3abae Git: Reduce grep approximated time to 5 seconds
It typically doesn't take more than that. On Windows it might be more,
but for this we have the slowly increasing progress.

Change-Id: I4cae5ec6d8488f31387a306f841798ca079cdac5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-18 11:13:18 +00:00
Ulf Hermann
14c7e909b3 QmlProfiler: Improve selection handling in FlameGraph view
Selected nodes should have their details displayed if no node is being
hovered. Also, when selecting a node from a different view, any hovered
nodes should be ignored.

Change-Id: I4d68674caa70913d7d0eb24d648562324ebe0d5d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-18 10:53:24 +00:00
Ulf Hermann
e3ce0435e7 QmlProfiler: Clear range restrictions when clearing events views
Range restrictions don't persist across profiling sessions, in contrast
to feature selections.

Change-Id: If98a8dae7eed3019e68e361ea69689658241d39d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-18 10:53:08 +00:00
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