Commit Graph

44349 Commits

Author SHA1 Message Date
Tobias Hunger
269e699fd9 CMake: Pass scanned files on to builddirreaders
Change-Id: I226aeafe6800a84fe4bbf8cf6fd21b8237575a88
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-14 09:03:28 +00:00
Eike Ziller
b93fe5a49e EditorManager: Fix timing of aboutToSave signal
"Save as" sent it before even the new name was asked.

Change-Id: I8f791689267e57e63d51990af96373f653e54943
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-14 09:03:19 +00:00
Tobias Hunger
737b7c94e8 ProjectExplorer: WS only change
Change-Id: Ibf883d9e5c92e9b3f5f8834aeb171e16aa057490
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-14 09:03:17 +00:00
Tobias Hunger
49f5d98871 ProjectExplorer: Make priorities available on more nodes
Make priority available on all FolderNodes. Make the sort order
of all kinds of FolderNodes check the priority.

This allows no reorder e.g. ProjectNodes as needed.

Change-Id: I369edd28807ab9f89fb646b0001e1b3eb1a19d7e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-14 09:03:10 +00:00
Tobias Hunger
3af1372395 ProjectExplorer: No more pointer to the parent project node
That information is used rarely, and is not too expensive to regenerate,
so there is no need to store and manage it for every node.

Change-Id: I2261853431cd4328ec447031de3b9f5d5347e796
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-14 09:03:04 +00:00
Orgad Shaneh
65bc23ba55 Core: Fix crash on reaper shutdown
Change-Id: I08dd990f851786f2af55076800d694855b859687
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-14 08:46:08 +00:00
Juhapekka Piiroinen
28c70724ee The API of the ProjectExplorer::KitManager is missing the isLoaded function
The function has been declared in kitmanager.cpp file, but it is not present in kitmanager.h file.
Expected to see similar API as it is for QtSupport::QtVersionManager.

Change-Id: I84b72df32e1a73ee5d7626320870fabda0f5eafc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-14 08:41:14 +00:00
hjk
5992c74488 Debugger: Robustify L&E context menu handling
Keep strings in lambdas instead of WatchItem pointers that
might get deleted while the menu is open.

Change-Id: Iec65924696da9754ffbbbb833ae0db990598c8e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-14 07:42:02 +00:00
Orgad Shaneh
f572f7da39 Debugger: Prevent popup on shutdown when debugger is running
* Run a debugger (of any kind)
* Close Qt Creator window
* When prompted to shutdown choose Yes
* An error message box appears with "Unexpected GDB exit"

This is not a real solution, but a quick hack to make the error message go.

2 soft assertions are also hit on this case:
SOFT ASSERT: "state() == EngineShutdownRequested" in file debuggerengine.cpp, line 1130
Debugger::Internal::GdbTermEngine(0x55ef651cea30, name = "GdbEngine") "InferiorShutdownRequested"
*** UNEXPECTED STATE TRANSITION: Debugger::Internal::GdbTermEngine(0x55ef651cea30, name = "GdbEngine")
"State changed from InferiorShutdownRequested(16) to EngineShutdownOk(21) [master]"

SOFT ASSERT: "state() == InferiorShutdownRequested" in file debuggerengine.cpp, line 1068
Debugger::Internal::GdbTermEngine(0x55ef651cea30, name = "GdbEngine") "DebuggerFinished"
UNEXPECTED STATE: 22  WANTED: 16 IN gdbengine.cpp:1841

They are *not* addressed in this patch.

Task-number: QTCREATORBUG-16770
Change-Id: I419f134e527a154dfbe1c85a3fd6629597a363f0
Reviewed-by: hjk <hjk@qt.io>
2016-11-14 07:37:53 +00:00
Frank Meerkoetter
d59cfb2f97 Fix dead stores in the modelinglib
Found via the clang-static-analyzer

Change-Id: Ic035a88d26b2a096d293133eb4638a090ac5a5c2
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-13 19:42:33 +00:00
Tobias Hunger
43258f91e8 ProjectExplorer: Nodes: Rename member holding parentFolderNode pointer
Change-Id: I8c2abc5a3b258f1ec0b9d2b9582e0f4b41e11568
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-11 14:27:46 +00:00
Tobias Hunger
8850d2e732 ProjectExplorer: Allow for const-correct use of Nodes
Change-Id: Ic1f145e3b429d80c0dcff642b900cb3a3f78f06b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-11 14:27:41 +00:00
Tobias Hunger
327f09c240 ProjectExplorer: Override filePath for recursiveFindOrCreateFolder
Override the base node's filePath for recursiveFindOrCreateFolder (and
buildTree, which is based on that). This makes it possible to use this
method to build up trees below project nodes, etc. that have no
representation as a existing directory in the filesystem.

Change-Id: I29fd1ab5b81b144b3db1966dc08dd50470c2d5d7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-11 14:27:36 +00:00
Tobias Hunger
d59489c462 ProjectExplorer: Make it easier to trim down the project tree
Change-Id: I6dc712f131a27eceb5548c0e3a79418d9b950639
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-11 14:27:16 +00:00
Tobias Hunger
1628856d8a Core: Fix Reaper blocking shutdown
The eventloop is blocked while the destructor of ReaperPrivate is running.
So drive the ProcessReaper by hand instead.

Change-Id: I691a28f27455f58ae5807540746ffa1aa2783fed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-11 14:26:51 +00:00
Christian Kandeler
2d4c3d7689 Update qbs submodule
To HEAD of 1.7 branch.

Change-Id: I08cb96bba1aa5a8b821e7be354aaa3af71c0c2aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-11 13:35:34 +00:00
Tobias Hunger
04aa6f67dd ProjectExplorer: Make scanForFiles cancel-able
Change-Id: Icbc4fa4c84189bd470bd5720a674d11f3e485037
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-11 13:22:46 +00:00
Sergey Belyashov
874683a15e Fix lacks of Q_OBJECT macro
Change-Id: I0de19ed983c45260c957ea88422093bf7faca6a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-11-11 13:15:49 +00:00
Christian Stenger
771fa178b6 AutoTest: Re-do multi-threaded parsing for tests
Avoid using global thread pool, use internally provided functions
instead.

Change-Id: Id8d3c72c45d85d4806e3692ef3039c31a0eae7b9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-11 11:31:36 +00:00
Jake Petroules
d1c2a841af Qbs: don't set cpp.linkerName
This is unnecessary (and counterproductive) with automatic linker mode
in Qbs 1.6.

Change-Id: I808effead885eeba0d524fa27989b8a54b8c655f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-11 10:28:49 +00:00
Jake Petroules
a8bb2af30e Qbs: fix Xcode SDK detection (take 2)
This adds xcode to the toolchain list, which is required to load the
Xcode module. It also uses the compiler path as the mechanism to find
the developer path, and then extracts the canonical SDK name using the
sysroot if it's a valid one for the previously extracted developer path.

amends d121fefaa9

Change-Id: I73cf1a50acd6b99a9fc3b6003bcc6dc23c2a04ab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-11 10:28:44 +00:00
Filippo Cucchetto
1a1cf3c12b Nim: Added support for nim script files
Added a new entry inside the "New" menu for creating a new nim script file (*.nims)
Added support for editing them inside the editor

Change-Id: I09a514fdd4e4a0e9a78bb557db3e8c7e97683b8d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-11 09:23:12 +00:00
Christian Stenger
2380757199 QbsProjectManager: Fix missing include
Avoid compile issue when using gcc 4.8.
(error: variable 'const QRegularExpression re' has initializer but
incomplete type)

Change-Id: Ic89f9afdf0a6854948a21103a64ec8b8f4ad1681
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-11 07:57:02 +00:00
Thomas Hartmann
6c6fb10ab7 QmlDesigner: Do not use Component in PathView source
The Component is not required (implicit component) and
the Component item is not allowed in .ui.qml files.

Change-Id: I705df5eb5b002f710ba87279083fa282e82639c8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-11 07:28:30 +00:00
Christian Stenger
9c5e92c714 Core: Fix QModelIndex interaction for variable chooser
The tree has a QSortFilterProxyModel, so we have to map
the current index back to its source model to avoid
using a wrong index.

Change-Id: I78b6172a2c9b3d4255132e30e8eddf72dc95d5e4
Reviewed-by: hjk <hjk@qt.io>
2016-11-11 05:45:58 +00:00
Christian Kandeler
77ba40603a qbs build: Fix the names of some Qt modules in Depends items
It's "testlib", not "test". And "designercomponents" is actually a
private module.

Change-Id: I1a14d107bb5568b4f3807558ec6ed11937ac816a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-10 16:36:17 +00:00
Tobias Hunger
9252a3ae44 CMake: Add fileoverlay icons for cmake project files
Change-Id: Id9b8aa9b1902e6f88ca4e8bde2e5f20281a77437
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-10 16:05:59 +00:00
Tobias Hunger
39e2c013dd ProjectExplorer: Handle root directory when creating folders
Handle root directory properly (a empty filePath in the base node) when
creating folder nodes in the project tree.

Change-Id: Iad761b94ee210406ed5ab9ceb2d00ce25db90046
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:59:14 +00:00
Tobias Hunger
f9e9357756 ProjectExplorer: Add method to find ProjectNodes
Change-Id: Ib8056bd7d5603ced67c3ce3514d49ec51d05e2cf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:24:22 +00:00
Tobias Hunger
ad003363b7 ProjectExplorer: Rename Node::projectNode to Node::parentProjectNode
Change-Id: I47fa794a0bd8456ae23271934a957d9667d2d7bb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:24:14 +00:00
Tobias Hunger
c7b0163fcb ProjectExplorer: Make FolderNodes a bit easier to work with
Add some methods to look up different kinds of nodes in the
project tree.

Change-Id: Ia91844b45c2a124dc01771297e1f5c414d84e7cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:24:08 +00:00
Tobias Hunger
67e011ba5f ProjectExplorer: Make naming of methods on Nodes more consistent
Change-Id: I5050a020f0fc0ef4556db1d2020afeadfcd51585
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:24:02 +00:00
Tobias Hunger
b782b98fef Core: Use QString in FileIconProvider API
Prefer "const QString &" over "const char *" in the API of FileIconProvider.

That makes no more sense, now that we no longer need QLatin1String around char arrays.

Change-Id: Iaf4af25d6e3b96529586032113297754d6c9d74e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-10 15:23:47 +00:00
Tobias Hunger
b72d579ece Core: Handle matches on complete filename in fileiconprovider
This enables file icons for cmake's CMakeLists.txt files.

Change-Id: I9c0af8f27a64c57251e986508287a05fc1e66073
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-10 15:23:39 +00:00
Jake Petroules
d121fefaa9 Qbs: fix Xcode SDK detection
The Xcode related properties in the cpp module no longer exist. Use the
correct ones, and be a little stricter about extracting the constituent
components from the sysroot.

Change-Id: I6ceaebf529764e69e1e04af6650a2920b139fac2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-10 11:04:57 +00:00
Tobias Hunger
0d79f0d5d9 Qmake: Make sure to mark new ProFileNodes as "parse in progress"
ProFileNodes start out as "no parse in progress" and need to be told
that there is a "parse in progress" when created as part of the project
parsing.

Otherwise they will not notify their associated run configuration that
they are done parsing, which in turn keeps the run buttons in the UI
inactive.

Change-Id: Ic37a9f1ccb6beecbf37f4fc54747122572e52c90
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-10 10:49:35 +00:00
Ulf Hermann
05746be80d QmlProfiler: Fix tests involving TimelineModel::color()
Change-Id: Ia3d1ab6be249fb7193ce084b7312e2b6192edad6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-10 08:55:15 +00:00
Christian Stenger
beec36c7d3 Debugger: Allow debuggerruncontrol creation with warnings
Change-Id: I50092cb99c24ab31fafb1b5ce3c0b371adc42f38
Reviewed-by: hjk <hjk@qt.io>
2016-11-10 05:46:06 +00:00
Christian Kandeler
efd7a141fa QbsProjectManager: Allow JS expressions when overriding properties
Change-Id: I2564b1268d801aa10f7b19c731928510d007bf02
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-09 15:27:10 +00:00
Ulf Hermann
faf77fd0e5 Timeline: Use QRgb and a lookup table for colors
It makes no sense to return a QColor as the only things we are using
are the red, green, and blue components. Furthermore, colorFromHue()
can only generate 360 different colors which we can easily cache
instead of recalculating them on each request.

This significantly reduces the time it takes to update the timeline
render nodes.

Change-Id: I7961014364a1bec5b089285148b2e6c141a6dc7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-09 11:55:02 +00:00
Ulf Hermann
aaca50f705 QmlProfiler: Send loaded events in batches of about 1024
This significantly reduces the number of signals necessary when
loading traces. The overhead of queueing those signals across threads
was responsible for up to 80% of the time required to load a trace.

Change-Id: I461a2ef9944b0be102a29f8ed6b2b3f2f59f3c0f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-09 11:54:57 +00:00
Ulf Hermann
a432683e0c QmlProfiler: Mark various number writing/reading functions inline
The compiler does not necessarily get it automatically.

Change-Id: Id37c20960a66775e34b80cbbe666e22505c5b347
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-09 11:54:40 +00:00
Christian Stenger
beb54e31d4 Git: Fix missing include
Change-Id: Id77828b24df73f6e28f1c2ae6fd7533e826a99c2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-09 11:41:57 +00:00
Tobias Hunger
0f1f595a12 QmakeProjectManager: Improve signalling of parser state
Correctly signal when parsing of a qmake project starts and stops via
the build- and runconfigurations.

The buildconfigurations are in the picture since they disable the run buttons
when the user has selected to build before deploy and deploy before run.

Task-number: QTCREATORBUG-16172
Task-number: QTCREATORBUG-15583
Change-Id: I44b5f5ce8e145cb93dc0022f66e1edcc202875e4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 10:15:05 +00:00
Orgad Shaneh
4ed00a348b Git: Make mergetool parsing more robust
Symbolic link conflict is printed in 2 phases: First "  {remote}", and
then "a symbolic link -> 'foo.cpp'".

This happens because this message involves an additional cat process:

  elif is_symlink "$mode"
  then
      echo "a symbolic link -> '$(cat "$file")'"

For local/remote line, wait for a full line before parsing.

Change-Id: I641cde12aa44dee2f7dff8fdae70da0c443e55d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-09 08:55:04 +00:00
Orgad Shaneh
877a10c8ef Git: Support typechange
Replacing a normal file with a symbolic link.

Change-Id: Id07ab339e8fcdf039b61d6e459b8d751d499f4f6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:53:51 +00:00
Orgad Shaneh
b98f2a3059 Git: Simplify translations
Change-Id: I6b1af54d6cb5bc5569f5fffdec29f00b37a34436
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:53:47 +00:00
Orgad Shaneh
0bcfc977e9 Git: Show success message on abort
Change-Id: Ie0ec1a9c00673a6cd50c2a7c54b83303c80cf55c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:50:16 +00:00
Orgad Shaneh
3eaddacf74 Git: Disambiguate revision from path on log
If you have a file with the same name as the current branch (in the
repo's root), Push to Gerrit opens with an empty list.

Change-Id: I607c67b1d00da83d4551d3f3f75e5a91478294d5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:48:52 +00:00
Dmitry V. Tchoomak
10954e07a5 QMlJSCheck: Add missed types of State changes
Change-Id: I08ed689dfa92477e35961b7b0b1d407f0c974979
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-09 08:19:43 +00:00