Commit Graph

39372 Commits

Author SHA1 Message Date
Nikolai Kosjar
d9c70f43d9 CppEditor: Tests: Use QTemporaryDir and avoid writing into creator source tree
This should improve results of CI tests where multiple creator instances
execute the plugin tests.

Change-Id: I557a0964568655662108df201589ba369096f4bf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-14 12:10:39 +01:00
Nikolai Kosjar
71c27ba4cc CppTools: Consider unresolved includes for new include directive position
Now adding a new include directive by the refactoring action will cover
more cases.

This will also help us to simplity the corresponding tests, since it is
not necessary anymore to create actual files.

Change-Id: Id7612b13c392735d6ae1fb2ce3c36169eff3628e
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-01-14 12:07:18 +01:00
Nikolai Kosjar
dbeae8cb43 C++: FastPreprocessor: Add only includes if there are none
For the case that the document is based upon another one (see
Snapshot::preprocessedDocument(), the only client of FastPreprocessor)
the FastPreprocessor added extra unresolved includes.

Change-Id: I0a7719fa8806af59f87a48bc6914270efd653e84
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-01-14 12:07:03 +01:00
Nikolai Kosjar
8f988a0a21 C++: Compile fix for MSVC
Change-Id: Ie6399ae95b1dee84dc85fe2e7634c020b312a9a7
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-14 12:01:06 +01:00
Daniel Teske
70c9c51e5e Refactor ProjectExplorer::Node and remove NodesWatcher
The idea behind NodesWatcher was that it was the central place
to catch node related signals, so that users didn't need to
connect to each individual node and the nodes didn't need to
be QObjects. Somehow Nodes ended up being QObjects anyway.

Both the recently added ProjectTree and the FlatModels consume
the signals the NodesWatcher sends. Unfortunately there's a
ordering dependency between the ProjectTree and the FlatModels.

This patch removes all NodesWatcher and instead makes the
ProjectTree singleton the emitter of various project tree
related signals. The ProjectTree also ensures that the ordering
between the FlatModel and itself is taken into account.

And it makes Node not derive from QObject, saving some memory
in that process.

Task-number: QTCREATORBUG-13756
Change-Id: I8b0d357863f1dc1d2d440ce8172502594138b9fb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-14 11:48:12 +01:00
Tobias Hunger
44a7db5091 IDocument: Reduce size of IDocument structure by reordering elements
On 64bit machines it should now have 48byte instead of 64.
Change-Id: I7a171864244e8faf26a2cf3c32abe9e705837fa3
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-14 11:20:25 +01:00
hjk
afc9f2a92d ProjectExplorer: Cleanup ToolChainOptionPage
Using a (local) widget derived class for the main page all
keeps the .h cleaner and removes the need for the custom
model plus related signaling.

Change-Id: If1b118b56cc1cd06d459fd5491de673e2436dd77
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-14 11:15:32 +01:00
hjk
58c694577f Debugger: Work around clang limitation in auto test
Clang 3.5 runs out of memory when trying to optimize
tst_Dumpers::dumper_data. So don't optimize.

Change-Id: Ic81aa6e491e132ee04bb51e9d443e836b5a7635a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-14 10:46:27 +01:00
hjk
a8ea8d38fe Debugger: Use TreeModel for ModulesHandler
Change-Id: I831f71e7441330e2a6a7f3ddcf89a29517b3b91b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-14 10:00:04 +01:00
Daniel Teske
54fda55b76 ProjectWizardPage: Handle null pointer correctly
Change-Id: I212ea6a177d7364778c28e30225c6f0da926bbd2
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-14 09:40:32 +01:00
Przemyslaw Gorszkowski
9e159d87a8 C++: display enum value in tooltip for simplest case
If it is possible lets calculate enum value for the simplest case.
Example where it works:
enum
{
  enum_val1, // tooltip = "enum_val1 = 0"
  enum_val2 // tooltip = "enum_val2 = 1"
};

enum
{
  enum_val1=10, // tooltip = "enum_val1 = 10"
  enum_val2 // tooltip = "enum_val2 = 11"
};

enum
{
  enum_val1, // tooltip = "enum_val1 = 0"
  enum_val2=10, // tooltip = "enum_val2 = 10"
  enum_val3 // tooltip = "enum_val3 = 11"
};

Example where it does not work:
enum
{
  enum_val1=10+1, // tooltip = "enum_val1 = 10+1"
  enum_val2 // tooltip = "enum_val2"
};

Task-number: QTCREATORBUG-4529
Change-Id: Idd85ed7304018f73f2b068bf1ac28f1abde02f93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-14 08:10:58 +01:00
Andre Hartmann
f66ee66595 QtOutputFormatter: Support ANSI colors
Task-number: QTCREATORBUG-13764
Change-Id: Iac020bbea0eae8bd2b09f836a61da199acec1575
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-13 22:02:39 +01:00
Orgad Shaneh
33ae764554 C++: Fix completion for enum inside member functions
Take 2

Task-number: QTCREATORBUG-13757
Change-Id: I9c2558bf01121e53710db984a99d37c2c6cafaf4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-13 18:09:15 +01:00
Thiago Macieira
1f2b595433 Ignore the ICC lines about using or creating a PCH file
Qt Creator has been showing them as errors, but they're little more than
noise in the output.

Creator still doesn't understand "remark" lines from ICC, but that's
something for another day.

Change-Id: Ic894fe41f92a677ddbe09beb0ea4c557edeb0547
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-13 17:45:35 +01:00
Orgad Shaneh
ab8b1f967a CppEditor: Replace <no name> with <block> for blocks in the model inspector
Change-Id: Ifce24ebe1aaafd07d13821d9c385bd1af67dadff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-13 17:23:27 +01:00
Kai Koehne
32fa850a6d Outline: Redo save/restore of settings
The OutlineStackWidget stored its position in the outline to be able
to save/restore settings specific to the sub-widget (IOutlineWidget).
However, the index can get out sync if another NavigationWidget
with a lower index number is split, and the relative position changes.

The change therefore avoids saving an index, and rather keeps the sum
of all sub-widget settings in a QVariantMap, only reading and writing
to the global settings object if necessary.

The settings are also not stored in the [General] section anymore,
but in a subgroup [Sidebar.Outline.X], where X is the index of the
outline in the view. This avoids having to always iterate over all
keys. No effort has been made to take over the old settings. I doubt
anyone will notice, though.

Change-Id: I85017cbb3e32b0a16da43ce6339deb7a053d6b09
Task-number: QTCREATORBUG-13614
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-01-13 16:43:16 +01:00
hjk
036f4f00eb TreeModel: Add a TreeItem::setData function
Change-Id: Id59c35068cd5a2ba22ccfddd45a0826dd68e9905
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-13 16:14:07 +01:00
Daniel Teske
b3f0a1bfbb DeployConfigurationFactory: Properly extract the abstract class
Make DeployConfigurationFactory a true base class. Introduce the
DefaultDeployConfigurationFactory as the implementation that
actually creates DefaultDeployConfigurations.

This mostly moves code around. The virtual canHandle method was
mostly unused and was removed from most classes.

Change-Id: I170d94c648e67f3fe52a76ffb5344f389ae49efc
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-13 16:12:24 +01:00
Christian Kandeler
90a2665737 Generic highlighter: Fix autotest build for qbs.
Change-Id: I2cae3d3256820f34d6d3bd7a8a9701c68cad1c53
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-01-13 16:04:40 +01:00
Christian Kandeler
8b94ef3661 Update qbs submodule.
To HEAD of master branch.

Change-Id: Ieb58c0b483538eb265936751a877bc246f8d7ea6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-01-13 15:27:22 +01:00
hjk
8d3e6b14ee ProjectExplorer: More KitOptionsPage simplification
Change-Id: I07244e510e44a3ee2af5e771450ab6413a5a5c2d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-13 14:54:48 +01:00
hjk
41d1c7e0e1 GLSL: Do not leak engine
Change-Id: I756361cc2aa4ad7bd91acde23dc0267520c6490c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-13 14:54:10 +01:00
Tobias Hunger
3945243e86 ProjectExplorer: Fix missing include
Change-Id: I7a113418205485b1f616d4b92666a8fc92edd399
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-13 14:44:07 +01:00
Tobias Hunger
8b928191bc VcsBase: Make Vcs Action active again when opening a project
Make Vcs actions active again when a project is opened but no
document is open.

Task-number: QTCREATORBUG-13609
Change-Id: I3d5accc3dc65412b1af5fc8c6a2baa9ac97c6e25
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-13 13:15:07 +01:00
Tobias Hunger
87faa62fa0 QmlJsTools: Use the startup project for context in the code model
ProjectTree::currentProject is not the right project to track.

Change-Id: Ia9da32a24e73565c4b9a3739c4000c13b803375f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2015-01-13 13:14:45 +01:00
Ulf Hermann
31032ffbbe Timeline: setNotesDirty() when setting notes and initialize notesDirty
Change-Id: I4d4e7b26f01dd3dc481aa196342bae92b60cad27
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-13 13:08:08 +01:00
Orgad Shaneh
5a5acd664e Tests: Fix MSVC warnings
Change-Id: If7f67ffc68ef725554e9ebaf8a8db5a64b7309cb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-13 12:08:13 +01:00
Daniel Teske
ab372deb1f Android: Reduce time to open settings widget
Two major areas of improvement:
- Make connections last, so that the initial setup does not trigger any
  unnecessary checks.
- Make fetching the list of android virtual devices a background
  operation.

Together they reduce the time needed to open the settings for me by
roughly 10 times.

Task-number: QTCREATORBUG-13735
Change-Id: I0839853dcdbdfe20a183a27888e55d3c56a9b815
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-01-13 11:11:52 +01:00
Christian Stenger
8a29109fe9 ProjectExplorer: Fix possible accessing null pointer
Change-Id: I285437f8eb21ce9f1a32d631a9c75d32d5ab2859
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-13 08:30:50 +01:00
Jake Petroules
960b5b3bfa Remove QBS_INSTALL_ROOT env var. This is no longer needed by Qbs.
Change-Id: Idcf6d0ceffb35a2c3a28dbfb3757b8ca04133a15
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-01-12 16:32:10 +01:00
Eike Ziller
b072bc8660 Show some helpful hints in empty editor views
Change-Id: I123147930244df38f436afd3ad8257b5f23e0d7a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-01-12 16:11:41 +01:00
Tobias Hunger
8bd53cfdc4 QmlJsTools: Fix typo in comment
Change-Id: I51cf21704c8a2b7ff8217aaf189a7ca66c2f24a6
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2015-01-12 15:24:37 +01:00
Tobias Hunger
67a62183f0 BlackBerry: Make current project behave like it used to
ProjectTree::currentProject was changed, update the code to
get the old behavior.

That behavior is most likely not the best to have, but that
is for another patch:-)

Change-Id: I8c84825443b8383f738c237ec67332e62199fe5e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-12 15:23:18 +01:00
Nikita Baryshnikov
20e4f62eb3 Fix linker error in HighlighterEngine test
Complains on highlighter.cpp:213: error: undefined reference to
`Core::MessageManager::write(QString const&,
QFlags<Core::MessageManager::PrintToOutputPaneFlag>)'

Change-Id: I296a105a8322e8b6ac1ab4a7085500f76acfcdeb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-12 15:22:11 +01:00
Orgad Shaneh
24e257f5ed QmlProfiler: Fix compiler warnings on release build
Change-Id: Id6fde7279f80cdc7a74322bcee4e0ce41f7fc3bc
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-01-12 15:13:41 +01:00
hjk
ec046eaa59 Core: Modernize PluginDialog style
Change-Id: I407fe2ec6753255cc5fad6014187cd592fe4aee1
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-12 15:11:34 +01:00
Eike Ziller
bae5782166 Add locator filter for all included files.
Collects all included files from any file of any project or
that is open in an editor. It has the same shortcut as the
files from any project filter and is also enabled by default.

Task-number: QTCREATORBUG-280
Change-Id: I7cd89ee68d2f8ec4e0ea03de0c11671f489c47dc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-12 15:06:20 +01:00
Eike Ziller
9c088727a8 Locator: API thread-safety improvements in BaseFileFilter
Make it possible to set or clear the file iterator while a search is
currently running.

Change-Id: I5309a8920057112375ce22e5fd24806fb6f09857
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-12 15:03:57 +01:00
hjk
ac77a8d10e Debugger: Use Utils::TreeModel for breakpoints
Change-Id: I7f62f9d64daf7624794aa82495d4b2c8d97b33df
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-12 14:35:04 +01:00
hjk
2f17b74753 Debugger: Take advantage of new tree iterator in option page
Change-Id: I1a8e065cfaa57b49c852a3a1d67149447d4d87b2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-12 13:18:24 +01:00
Eike Ziller
ac18f9f1d8 Fix Help index filter after recent refactoring
It was incorrectly updating cached results, so e.g. shortening the
search string was not forcing a new search.

Change-Id: Ie55fce72b7363258195423f5686f013aeafc7d57
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-12 13:13:02 +01:00
Eike Ziller
e40477cc81 ActionManager: transfer ownership from main window to core plugin
Also make a bit less dependent on main window:
- Menus do not need to start with main window as parent.
- Centering the presentation label on the main window is wrong in the
presence of extra windows anyhow. It should be centered on the active
window.

Unfortunately, actions still must be added to the main window, because
actions that are not children of visible widgets do not trigger.

Change-Id: Ibb99644a3723de476db465ebe6a9cdc0820ea692
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-12 13:05:17 +01:00
Orgad Shaneh
dc86025879 GenericHighlighter: Display exceptions
Enables tracking of syntax/logic errors in highlighters.

Change-Id: Ia9c314d0a314ab49ca2045327e2d34c9e9d275c3
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-01-12 12:59:18 +01:00
Eike Ziller
b9597d402d Submit editor: Unclutter UI
The new layout that was supposed to give especially the files list more
space looked very unstructured with the different boxes in different sizes
everywhere.

Vertically align the description edit and file list. Even though it gives
the header much horizontal room, it has fewer visual breaks. Also use
MiniSplitter.

Change-Id: I62699d2b9e9142b9d2c3d01f29db9a3b49b79b00
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-12 12:55:15 +01:00
hjk
737c327fd1 BaseTreeView: Fix connection.
Strings are not typo-safe.

Change-Id: I9fd0e0574fb51ea995037c7b22ff2a87b95f5965
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-12 12:51:12 +01:00
Daniel Teske
4be0d123e2 ProjectExplorer: Fix changing language via context menu
Task-number: QTCREATORBUG-11719
Change-Id: Ica2d822026adadf2293da158fa4b25ccdb7e1608
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-12 12:26:29 +01:00
hjk
7fd21d22ac ProjectExplorer: Use Utils::TreeModel for KitModel
Simplifies code.

Change-Id: I3db07f8b0ffd980856e65abee856559a0a85dfdb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-12 12:16:49 +01:00
Orgad Shaneh
e62e47f0d0 Tests: Cleanup FileUtils test
QTestData converts raw string as Utf8.

Change-Id: I201f283ce16732dfc85927fdcc9bb15c230ec16f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-12 12:03:37 +01:00
hjk
14038d143b BaseTreeView: Add a way to let models request item expansion
Change-Id: Ib964af4411fe7665dcb0947b52fc100eacba6a16
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-12 10:29:57 +01:00
hjk
6ebdc18f98 TreeModel: Simplify indexFromItem()
Change-Id: Ief7f120ef27eb43746826da7c771b5f9a3f7ce8f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-12 10:29:42 +01:00