Commit Graph

44349 Commits

Author SHA1 Message Date
Alessandro Portale
9f53b0e13c ProjectExplorer: Themable miniprojecttargetselector.cpp
Replace some hard-coded colors with theme colors. That is required for
the Flat Light theme.

Change-Id: I2ce289fce8c2e6437148eb691484e0441975979f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 15:30:17 +00:00
Serhii Moroz
cda7a3188f Welcome: Added keyboard hotkeys to open sessions and recent projects
Change-Id: Ia7c1ec11b2fa3e4b61b842fd1e9e4df7aa6f7be3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-28 15:04:55 +00:00
Christian Kandeler
b1477190de Fix qbs build on macOS
"osx" -> "macos"

Change-Id: Ie25e096b2759cf8f96411560fcca337169d80b08
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-07-28 14:45:12 +00:00
Nikolai Kosjar
14428c1586 Clang: Decrease order of snippets
The order is 0 by default and thus the snippet items were at the very
top, e.g.:

  enum EnumType { EnumValue };

  void f()
  {
      EnumType et = // Complete here and see snippet items at top
  }

Change-Id: I70a160d102b91a2589972354c50aa5f0b29323e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 14:42:30 +00:00
Christian Stenger
80352d703c Tests: Disable QTest crashhandler for plugin unit tests
Temporary workaround to avoid dead lock when executing
plugin unit test.

Change-Id: Ie6c3673d756ff3b67320bcc75d590933e58a5276
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-07-28 13:30:01 +00:00
Orgad Shaneh
f398e7d22a TextEditor: Use initial palette for default colors
The theme might be incompatible with the text style settings, especially
those that rely on the default palette (and were designed before themes
were implemented).

Task-number: QTCREATORBUG-16482
Change-Id: I8f63460ad250a494dcafd11366d7bacdbb71c142
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 13:21:49 +00:00
Thomas Hartmann
589aef89e0 QmlDesigner: Remove lines/borders from scrollbars
Change-Id: Iefc1d6a42df2aa858b68d4ce25840c766a8c86cb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 13:16:42 +00:00
Thomas Hartmann
c7ba291c68 QmlDesigner.ItemLibrary: Adding logging category
This makes it possible to debug the .metainfo files in
a release build/package.

Change-Id: Iceae98b0e00b9d4deba0ae3f31b1f55fca2c5cf2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 11:02:54 +00:00
Thomas Hartmann
dd2d17ed36 QmlDesigner.FormEditor: Do not overwrite auxiliaryData width/height
We using F2/goto into component the auxiliaryData is typically
already set.

Change-Id: Ib201198f5fcd7a716fb416b54537488cc5b68afc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 11:01:57 +00:00
Thomas Hartmann
b8a22a5ec1 QmlDesigner: Rework of theming colors
* Use the original fancy toolbar colors by removing the
  Alpha channel.

* Use the splitter colors for borders to avoid white borders
  in light themes.

* Use the FancyToolButtonHoverColor for buttons and combo boxes.

Change-Id: Id636e0713c8e2769c5eb03a115a60ccad8226f23
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 10:59:58 +00:00
Nikolai Kosjar
38f72855b6 Clang: Process distinct documents concurrently
Speed ups the typical use cases that can profit from this:
 * Change a header file and switch then to source file
 * Open documents one after the other (Follow Symbol)
 * Change documents visible in splits (e.g. by refactoring action)
 * Restore a session with multiple splits

Fixes the test ClangIpcServer.GetCodeCompletionDependingOnArgumets.

Change-Id: Ia575bd59780df14146dfc091a4d48794e4a0543d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:31 +00:00
Nikolai Kosjar
90f94363db Clang: Extract TranslationUnitCore and (re)parse explicitly
Extract TranslationUnitCore, which is the API for the high-level
operations we need. TranslationUnit does not call any clang_* functions
anymore, except the one needed for disposing the CXTranslationUnit - for
now, we keep TranslationUnit the owner of TranslationUnitCore.

TranslationUnitCore will be passed on to the worker threads.

With this, the current "TranslationUnit" looses its meaning. We will
rename it to "Document" in a follow-up change.

                            ***

TranslationUnit::cxTranslationUnit does not implicitly
creates/parses/reparses anymore. We use more verbose update operations
now.

The test ClangIpcServer.GetCodeCompletionDependingOnArgumets fails now
because of this - CodeCompleter::completeHelper() does not recreate the
translation unit anymore, thus working on the old data.

This will be addressed in a follow-up change.

Change-Id: I6213d6f1609cd3c9a54666c84cb8b623b2fefe1c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:24 +00:00
Nikolai Kosjar
dc734f45fd Clang: Extract TranslationUnitUpdater
...in preparation for concurrent processing of documents.

Parsing and reparsing is handled by TranslationUnit. Since we will do
this in a different thread, extract the core logic into the new class
TranslationUnitUpdater, so that we can prepare the necessary data for
the run and then later incorporate the results of the parse/reparse.

Change-Id: Ic9d936d193ee6795a755f0cfc38c0b2a7bd402cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:18 +00:00
Nikolai Kosjar
606d41187c Clang: Prepare for multi-threading
* Make the necessary data implicitly shared since it might get
  accessed/modified from two different threads with follow-up changes.
  This applies for UnsavedFiles/UnsavedFile and ProjectPart::arguments().

* Avoid returning references.

Change-Id: I98842c1cb90ae0d344a15c63b72cbc89568722d3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:14 +00:00
Thomas Hartmann
876ec5996c QmlDesigner.FormEditor: Adjust CSS for LineEdit
Change-Id: I7d4fbb3c16747f6d2b290db18b7c48b63a23bdd3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 09:36:34 +00:00
Christian Stenger
8c42cd9e23 AutoTest: Fix retrieval of executable
Respect different location if tests are installed
before executing.

Task-number: QTCREATORBUG-16638
Change-Id: I2d154e26cdd0f28bd51e7a885c5486d36af38a68
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-28 09:21:41 +00:00
Thomas Hartmann
80ca67e43f StyleHelper: Fixing alphaBlendedColors
Change-Id: Ib2f5e37e213e221ecfcce876ed2f44013815ca46
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-28 09:00:08 +00:00
Alessandro Portale
4bdd1ffbf7 Themes: Enable using the original Window color for toolbars
This patch adds a flag which enables the "fancy" side/tool/status bars
to use the original Window color from the application palette.

The flag is disabled for all themes by default.

Task-number: QTCREATORBUG-16331
Change-Id: I1433e865e1903012d521a2cdb7083f110086e455
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-28 08:58:47 +00:00
Ulf Hermann
659b0b4788 Android: Add context objects for QObject::connect with functors
If several threads can be involved in the signal/slot exchange we need
to show the receiver objects to connect() so that the signals can be
queued when necessary.

Change-Id: I24b4fe90095ce10eeeff9618faff97bd9d05c6eb
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-07-28 07:20:44 +00:00
Nikolai Kosjar
351919a1bf ClangStaticAnalyzer: Do not try to determine version of clang-cl.exe
It does not understand "--version". Use clang.exe for the version check.

Change-Id: I64a46e8e2e5be47ad6f13c9c5497264e1128a22a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-27 14:19:17 +00:00
Thomas Hartmann
66c589f9ca QmlDesigner.ItemLibrary: Adding support for StackLayout
The StackLayout is working and it makes sense to add it to the
item library.

Change-Id: I732398a25091f2a33f38c42f5bf1c55ef9dac237
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-27 14:19:16 +00:00
Nikolai Kosjar
4ae368ddbb Clang: Set limit for sorting completion items
Having *some* limit is reasonable since sorting happens in the UI thread
and given enough includes/symbols it will freeze sooner or later.

The strategy is now: Stop sorting at all if there are more than 30.000
completion items to process.

The limit is a guess made on the following measurements. The goal is to
keep below 100ms.

 test | items | before | now
 -----+-----------------------
 Cpp1 | 6394  | 172ms  | 15ms |
 Win1 | 44739 | 125ms  | 56ms |
 Qtc1 | 9648, |  16ms  | 15ms |
 Qtc2 | 10210 |  20ms  | 16ms |
 Qtc3 | 51044 | 141ms  | 63ms |
 Qt1  | 62953 | 172ms  | 78ms |

Windows.h alone pulls in about 44.000 completion items.

Used test procedure
-------------------
For each test below, do:

 1. Start Qt Creator in release mode
 2. Open/create the project with a MSVC2015 Kit
 3. Open the mentioned file
 4. Strg+Space in the mentioned function

Measured with a timer in IpcReceiver::codeCompleted.

Test projects:
 Cpp1: stdc++11-includes.pro, main.cpp, main()
 Win1: Create project from wizard, *.cpp file including windows.h, completion
       in some added function
 Qtc1: qtcreator.pro, texteditor.cpp, BaseTextEditor::duplicate()
 Qtc2: qtcreator.pro, fakevimhandler.cpp, FakeVimHandler::jumpToLocalMark
 Qtc3: qtcreator.pro, botan.cpp, version_string()
 Qt1:  qt-essential-includes.pro, main.cpp, main()

Change-Id: I6fbd65d14f6086f289be7dd6c24385996e4bde83
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-27 08:30:30 +00:00
Ulf Hermann
a5b0525b79 QML Debugger: Don't pretend the engine is interrupted when it isn't
After sending the interrupt request the application will continue to
the next line of JavaScript and only interrupt then. There is no way
to interrupt the application via the JS debugger as long as no JS
engine is active.

The downside of this is that the pause/continue/stop icons are disabled
until the application actually interrupts. The user might not
understand this.

Change-Id: I355de52f65898d6bdcd437675adba368662f3c13
Task-number: QTCREATORBUG-16646
Reviewed-by: hjk <hjk@qt.io>
2016-07-27 08:08:12 +00:00
hjk
53415cece1 Utils: Streamline TreeModel API
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.

BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.

Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-27 08:00:40 +00:00
Alessandro Portale
3752a67de7 QmlDesigner: Themable and HighDPI Text style icons
Change-Id: Ib677d38d660b631a235c00c1e37590780aadb252
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-27 07:55:05 +00:00
Alessandro Portale
631cad8eb0 Core: Fix initially visible progress bar
Call updateVisibility() in ProgressManagerPrivate::init() to ensure that
it is really invisible when launching Qt Creator.

Also make sure that the opacity for the visible progress bar is 1.0
instead of 0.7 (which is the default opacity in QGraphicsOpacityEffect).

Task-number: QTCREATORBUG-16003
Change-Id: Ic268d903ce624c9e0b4c11e213002a22be1fba63
Reviewed-by: hjk <hjk@qt.io>
2016-07-26 19:28:38 +00:00
Alessandro Portale
3e4cbdb69f QmlDesigner: Themable text alignment icons
Change-Id: If499c4e131a0c56d24afb6ae355d1b8bd6338435
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-26 13:56:45 +00:00
Thomas Hartmann
8f50599462 QmlDesigner: Use QmlDesigner_HighlightColor consistently
This fixes a couple of issue in the .css and we
always use the same highlight color (QmlDesigner_HighlightColor).

Change-Id: I6522eabc00c30399b2c3b2689256b970ec558719
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-26 13:02:22 +00:00
Nikolai Kosjar
9d5705a755 Clang: Stop trying to remove duplicate completion items
We assume that libclang does not return any duplicates, at least we
never noticed any so far. For the concrete test below no duplicates were
removed.

Function overloads are not problematic because they are folded into one
ClangAssistProposalItem (addOverload()).

To the completion items from libclang we add the Qt Creator snippets as
items. Those might have the same text in the completion list view, but
their icon is different (e.g. consider the keyword completion "class"
and the Qt Creator snippet "class"), thus the user can still tell them
apart.

Test:
 1. Open src/plugins/clangstaticanalyzer/unit-tests/qt-essential-includes.pro
 2. Open main.cpp
 3. Complete in the main function

Measured with a timer in IpcReceiver::codeCompleted.

On Linux, for 20637 completion items:
 Before: 74ms (avg)
    Now: 66ms (avg)
   Gain: 11%

Change-Id: I524eaa09f8d9e07c78dc9efcc77f7e021c6f37f7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-26 11:49:17 +00:00
Nikolai Kosjar
ead6853b09 TextEditor: Remove declarations without definitions
Change-Id: I92c9f054fb00e51d166d30424d735c76df5027f1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-26 11:48:59 +00:00
Thomas Hartmann
8f393efec0 Adding QmlDesigner highlight color to Theme
Change-Id: I73d6ec3b7bff5e161de54a3287e3352435753234
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-26 11:07:32 +00:00
Thomas Hartmann
74f93fe557 QmlDesigner: Adding logging to PuppetCreator
Change-Id: I9a0450b723ebca82439057e7839e19985da4a2d6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-26 11:03:59 +00:00
hjk
2459652234 ProjectExplorer: Rework mode main window
The existing solution with the special-style horizontal
kit selector comes from a time when there was typically
one, at most four targets. Today's setup can easily
reach half a dozen targets with several toolchain versions
each and can't be sensibly handled with the overflowing
horizontal bar.

This here replaces the horizontal kit selector bar as
well as the top level project "tab bar" with a normal
tree view. All targets are visible (but possibly disabled)
at once, and can be enabled/disabled using the context
menu on the tree items.

Change-Id: I1ce7401ca96109bf34bc8c0ae19d265e5845aa88
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-26 10:00:09 +00:00
Thomas Hartmann
980fd1b219 QmlDesigner: Avoiding possible regression
We have a case of a crashing puppet,
that might be related to QML2_IMPORT_PATH.
Since this only affects packages and we only see
the issue on a non developer machine, we just go back to
the old behavior for now.

Change-Id: I322cb5b02ff3b5a3dc27bab4767e6488686d216f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-26 09:17:58 +00:00
Ulf Hermann
dd3fa30212 QmlProfiler: The local runner can spontaneously stop an application
If the application outputs the "QML debugging is disabled" line (and
Qt Creator can read it), the QmlProfilerRunControl will kill the
application. In the test this happens if Qt Creator was compiled
without QML debugging enabled.

Change-Id: I958a991d304ec9af8643e88dd9709f580a28753f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-26 08:41:01 +00:00
hjk
d258d47b42 FancyMainWindow: Add a way to make the layout immutable
To be used in the new Project mode main window to prevent accidental
closing of the navigation dock.

Change-Id: Id8970ab80a91113e97a9f9a07b9dfb12b9cb0e30
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-26 08:31:04 +00:00
Ulf Hermann
3a9e459408 QmlProfiler: Relax client manager test
We can actually get several TCP connection attempts from the client
manager. That is the whole point of retrying. The QQmlDebugServer
explicitly allows sequential connections, so we should allow them, too.

Change-Id: Id38290dbfd86fadfb0c648189f89827330ea1174
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-26 08:27:50 +00:00
Leena Miettinen
e67cb6d521 SCXML: Fix UI text
Change-Id: Ic8c0c27c12bcd9992cf3518087c283606f5acdeb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-07-26 07:36:21 +00:00
Leena Miettinen
3a9f242afe CMake: Fix grammar in warnings
Change-Id: Iaadab95ffa102c02fe8de70b11dd1dd5ad224520
Reviewed-by: Aaron Barany <akb825@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-07-26 06:50:55 +00:00
hjk
add9e627b8 Debugger: Don't access unloaded perspectives
This can happen if a previous session marked a plugin for not
loading and ended the session in a perspective provided by that
plugin.

Change-Id: I83a5dda421a1bb8ed2f8942f03e629e9c5d4d4ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-26 06:27:27 +00:00
Nikolai Kosjar
0651eddbad Clang: Stop needless completion detail calculation
...on the plugin side by removing a left over calculation. We construct
the detail in the virtual ClangAssistProposalItem::detail(), that is, on
demand.

Test:
 1. Open src/plugins/clangstaticanalyzer/unit-tests/qt-essential-includes.pro
 2. Open main.cpp
 3. Complete in the main function

Measured with a timer in IpcReceiver::codeCompleted.

On Linux, for 20637 completion items:
 Before: 119ms (avg)
    Now: 81ms (avg)
   Gain: 32%

Change-Id: I9617cb9651a8367c31cd40e965175b5b37e10730
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-26 06:13:59 +00:00
Christian Stenger
16c007a054 AutoTest: Fix stopping test run when debugging tests
Change-Id: I19dcbd89b68e4df5d87cb6b6923adee0d07a6b55
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-07-26 05:59:43 +00:00
Christian Stenger
938ca5ca9e AutoTest: Fix enabled state of run buttons
Disable running tests also when currently executing a test run.

Change-Id: Ic9538678d678650c3c79da5699f96e812d7c5415
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-07-26 05:59:38 +00:00
Aaron Barany
6d3497d4e2 QBS DefaultPropertyProvider: Separate C and C++ compilers
Task-number: QBS-893
Change-Id: If811a34d6fecba8989b19089e8bac5df5621836f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-25 18:41:18 +00:00
Alessandro Portale
3be66f7427 QmlDesigner: Fix formeditor selection indicatoor on HighDPI
Make it a real reactangle, without worn-out corners.

Change-Id: If7cce94896a485d34ae23602bb1dc7437cf1c62c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-25 15:58:23 +00:00
Alessandro Portale
ce36804665 QmlDesigner: New anchor icons
Themable and High-DPI

Change-Id: Ic073a6a8c5f3fc7eb28b9b498d3dddbebedb243c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-25 14:51:20 +00:00
Thomas Hartmann
65f0b4b1c8 QmlDesigner: Theme binding text field
The text field for bindings was not properly themed, yet.
We also use general Qt Creator icons for apply and cancel.

Change-Id: I45f1220540a6eaeff05be0b99d8b70b64ca67af4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-07-25 14:33:15 +00:00
Nikita Baryshnikov
0598202d3d DiffEditor: do not show reload prompt
for text document, after reverting some change in diff editor

Change-Id: I3511f00e52beffba1cce67fb6940d1b580ef99cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2016-07-25 14:01:26 +00:00
Jarek Kobus
adbc3f611f Show proper diff when one of diff files is missing
Task-number: QTCREATORBUG-16540
Change-Id: I185ac8e7c8be364c1e2f74bfe0af6f9e393c89be
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-25 13:29:10 +00:00
Jarek Kobus
3c1647e6b2 Refactor DiffEditorWidgets, introduce common widget controller
Reduce code repetition.

Change-Id: I416555dd83ce888088a6a259777c294a6feb35f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-25 13:28:45 +00:00