Commit Graph

44349 Commits

Author SHA1 Message Date
hjk
5051d614c5 ProjectExplorer: Switch to Edit mode after project configuration
This is 4.1 behavior and feels more natural.

Change-Id: Ia3a54bbad66af2a15e9d2ce84281315707936ff6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-23 13:21:49 +00:00
Orgad Shaneh
7767f551f9 Locator: Give the left column more space
Make it 1/2 of the total width.

Task-number: QTCREATORBUG-16768
Change-Id: I6c87b6c9aa4dd39d598c4890a30cda7d6f386d99
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-23 13:13:36 +00:00
Ulf Hermann
8c80a86266 Timeline: Fix event compression for non-default heights
The "id" member of OpaqueColoredPoint2DWithSize is then used as the
number of events compressed into one. To discern it from an actual
id it's also negated. Thus, it needs to be updated when adding an
event. This is not a problem for default height items because their
top is always at 0, so that the addition of the 'y' members doesn't
have an effect.

Change-Id: Ibd7218954e36661d7f729465430de89821a41a7f
Task-number: QTCREATORBUG-16763
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-08-23 12:36:42 +00:00
Francois Ferrand
7b2c09a118 C++: Disable C++ keywords in C files
In some (legacy) C files, new and delete may be used for regular identifier.

There are some limitations:
* Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the
other files in the project.
* QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue.

Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-23 12:35:04 +00:00
Eike Ziller
285c8a7543 Fix wrong icon path
Regression introduced by 15fbfaf2e9

Change-Id: I795519fbf8f0370399583af8268bb4cc6bd3530d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-08-23 12:33:43 +00:00
Tobias Hunger
05a965f161 Allow for snippets in cmake and qmake project files
Change-Id: I593595ad130b3fc7b86e22dc2c6fc4cf2c8935bf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-23 12:12:47 +00:00
Tobias Hunger
59bab5e0ac CMake: Add CMakeSnippetProvider
This allows to define snippets for CMakeLists.txt files. They can not
be used yet:-/

Change-Id: Iad68632798ecfe04018d08d284f9b5a8b0e564ee
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 12:12:37 +00:00
Tobias Hunger
5097acebf3 Keywordscompletion: Code cosmetics
Change-Id: I2f25894d5043ea1f5ab50ab6b48ce6b02ab4b987
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 12:12:32 +00:00
Tobias Hunger
454ad164fd Allow for (optional) snippet completion in keyword completer
Change-Id: I2e00cbe1cd112c8fd6461b41bdd791c572bc191b
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 12:12:24 +00:00
Christian Kandeler
f4b8ec1efc QbsProjectManager: Fix target change
We must not reset the project data directly; that is done when re-
resolving has finished. If we do it before, then we won't notice later
that the project data has changed and code models etc are not updated.

Change-Id: Ib0c030b46510c0241167e3beb261a08a0353db02
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-23 11:01:20 +00:00
Orgad Shaneh
ffd4c4a523 QmlDesigner: Add Q_OBJECT for a class with translatable strings
Change-Id: I3fed0cafd84de205290b09303a08ccb3504f3129
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-08-23 10:34:54 +00:00
Ulf Hermann
8951394704 Debugger: Don't reselect a perspective if it is already active
Selecting the same perspective again will not result in any visual
changes, but repaint the whole window. This is unnecessary overhead.

Change-Id: If41464ea023b2085482d5ab547cd9eeb91ce047f
Reviewed-by: hjk <hjk@qt.io>
2016-08-23 10:30:50 +00:00
Orgad Shaneh
3332d42313 Qmt: Fix lupdate errors
* Exception subclasses don't declare tr
* lupdate is confused by class keyword in template

Change-Id: Ic89caea3bd918a1ae5dc010238503d239e293098
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-08-23 10:13:22 +00:00
Ulf Hermann
e440e344ca FancyTabWidget: Skip setCurrentIndex if the index doesn't change
There is no need to update() and signal currentChanged() then. It will
just incur unnecessary overhead. Also, only check for isTabEnabled()
once.

Change-Id: I59bde7d99f953ef6af89d3197a81d1acaae381f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-23 08:59:42 +00:00
Tobias Hunger
2f0c253b27 Snippets: Add groupId getter/setter to SnippetAssistCollector
Handle unusual groupId settings more gracefully now that they are
more easy to change.

Change-Id: I80e46d62e8db9c866e7d68b3e601ce6841da53ab
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 08:51:03 +00:00
Tobias Hunger
da29da9bbd CMakeEditor: Code cosmetics
Change-Id: I44dcd6dbe63e45e870efa9438c7c6f26bf2b06b6
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 08:50:54 +00:00
Tobias Hunger
437cb039e1 Snippets: Code cosmetics
Change-Id: I1586c8167b8c9797d2594255e4ba14329accec44
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 08:50:49 +00:00
Orgad Shaneh
79d889ca47 Ios: Fix translatable string context
The widget doesn't have tr

Change-Id: I8f49b67d169b6a44f3e970ffefa413e0f21cf5ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-23 07:49:18 +00:00
Orgad Shaneh
4298190325 ProjectExplorer: Add a missing tr function declaration
Change-Id: Id116fb65ec8fbb8ca5088c4aaef2e8fb8e637579
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-23 06:21:15 +00:00
Orgad Shaneh
db704f0680 Nim: Add missing tr for class with translatable strings
Change-Id: I1a9cdc65125e64905fd7f780f9a119756cdf0017
Reviewed-by: hjk <hjk@qt.io>
2016-08-23 06:13:15 +00:00
Orgad Shaneh
cf31323f14 GLSLEditor: Add missing parentheses
They're inside #if 0 so nobody noticed.

Detected by lupdate

Change-Id: I6a3dc8192f71dbdf675757d9ff71bad6a4adec4b
Reviewed-by: hjk <hjk@qt.io>
2016-08-23 05:52:20 +00:00
Eike Ziller
841778ed69 Merge remote-tracking branch 'origin/4.1'
Change-Id: I80f96f100046625f24b6ab5d13fdb05660365abc
2016-08-22 16:30:56 +02:00
Tobias Hunger
c55db42c28 QMake: Fix crash when removing Qt version from kit
Fix crash when removing Qt version from kit while a qmake project
is open.

Task-number: QTCREATORBUG-16760
Change-Id: I697eceb6b165985ae9a225e79bf1205947300954
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-22 13:40:52 +00:00
Jake Petroules
f41b48ef5d Rename Abi::MacOS/GenericMacFlavor to DarwinOS/GenericDarwinFlavor
This makes clear that the ABI encompasses all Darwin platforms (macOS,
iOS, tvOS, watchOS) in the wake of the OS X to macOS rename, and would
have been more technically correct anyways since ABIs are far below the
"macOS" parts of our favorite desktop Unix operating system.

Change-Id: I16d1477f44ffe70e5d8cddd67199a1602ba6fd97
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-22 12:54:06 +00:00
hjk
46191b2e86 Debugger: Fix environment settings
... for "special" starts like Debug->Start Debugging->Start
and Debug External Application.

Change-Id: I9f9e682f4392efb5328eb8c08bf50dd33901f41d
Task-number: QTCREATORBUG-16746
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-08-22 12:45:17 +00:00
Tobias Hunger
8393b35af9 ISnippetProvider: Code polish
Remove useless constructors and destructors and consistently apply override/final.

Change-Id: I83d8e75803caa9007454b528f555a11a7930aefc
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 11:36:28 +00:00
Eike Ziller
9260a6d7f9 ExtensionSystem: Simplify PluginCollection
There is no reason why it should be more than just a list of plugin
specs. Saves a few symbols. Also simplify some related code.

Change-Id: Ibaff64735e78e1454e1aca0b49cadb9e1030ee3c
Reviewed-by: hjk <hjk@qt.io>
2016-08-22 11:17:44 +00:00
Tasuku Suzuki
5ce28c4aa5 CppEditor: Fix cutting while renaming symbol under cursor
Change-Id: I8e05342b786bbe36741372746146d76d1dc90082
Reviewed-by: YAMAMOTO Atsushi <atsushi.yamyam@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-08-22 11:05:49 +00:00
Marco Bubke
7b18b7f4a4 TextEditor: Fix uninitialised value HighlightingResult::useTextStyles
Task-number: QTCREATORBUG-16672
Change-Id: I81abee6f3e8439ad1dc5b8d3198d099788b91ca5
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 11:02:03 +00:00
hjk
33c79a4440 Debugger: Simplify BinEditor usage
Change-Id: I77a226cce97a85471fbe3d57a09d5b8318c7cce7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-22 10:29:07 +00:00
hjk
7c287eb6f9 Debugger: Drop Location::init()
We can do better with C++11.

Change-Id: Ie9e9cd4dfbbfc4ba29c0aa6bbfdf33ae7ac184fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-22 08:45:22 +00:00
Tobias Hunger
90a235e380 TextEditor: Code cosmetics
Change-Id: Ib08a8cd8867b977c22c2d96ad0a65b7d6d2fecf6
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 08:42:13 +00:00
Tobias Hunger
da872e1d73 Snippet*: Code cosmetics
Change-Id: I84a7ca5daddffe057e5ce8e3873ac914a12201e2
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 08:41:09 +00:00
Christian Kandeler
e0bd312c10 Update qbs submodule
To HEAD of master branch.

Change-Id: Ic6817c3735dc5718bfaf6109f8eb4a9ac11e876c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-22 08:27:17 +00:00
David Schulz
af91d73a1c TextEditor: Remove unnecessary hash lookup
Change-Id: I50b80ad43c7a4dc56207497e948993946d977101
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-22 07:06:26 +00:00
Nikolai Kosjar
4372514e6b Clang: Remove unused arguments
Change-Id: I72e6df2e0e5b94addbca79bbca6bf2aa7cff2042
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 07:02:26 +00:00
David Schulz
8b21f687c0 Add default tool tips to text marks
The default tool tip should describe the general purpose
of the mark which is displayed in the UI when no tool tip
is explicitly set for the text mark.

Change-Id: I27aff26cf0f3458d454428e805a9b323191dc393
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-22 05:40:50 +00:00
Orgad Shaneh
5a40bddf08 CppEditor: Add template enclosing scope on "Insert Declaration"
Change-Id: Iff4893193b56c2ed86b4b9515a1a1df847528369
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-19 14:41:25 +00:00
Orgad Shaneh
2890966ec3 CppEditor: Prevent "Add Declaration" for existing template functions
class Foo
{
    template<class T>
    void func();
};

template<class T>
void Foo::func() {} // Add Declaration should not be triggered at all

Change-Id: Ifff733d8381177300dae017ae419200cfdf5c425
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-19 14:41:17 +00:00
Orgad Shaneh
65dc6d0fc2 CppEditor: Fix "Move Definition to Class" for template member functions
class Foo
{
    template<class T>
    void func();
};

template<class T>
void Foo::func() {} // Move to class

It currently doesn't trigger at all.

Change-Id: I63d561771a8dd455f01e99dd836abbd23eec71b7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-19 14:41:11 +00:00
Orgad Shaneh
e7eac98c7e C++: Support pretty printing of template enclosing scope
Change-Id: Ib228184e1259585eeac61b9196195c39a9550cb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-19 13:34:44 +00:00
Orgad Shaneh
e919746808 C++: Store template typename argument declarator type
Differentiate class from typename. Used by a follow-up commit for pretty
printing, preserving the original declarator.

Change-Id: I496505f5062abb69d5552e5422db256d49d164c4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-19 13:34:38 +00:00
Christian Kandeler
ad129629bb Update qbs submodule
To HEAD of 1.6 branch.

Change-Id: I67c6055356f4733711e14325273b751c0dbb82c6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-19 13:00:48 +00:00
Orgad Shaneh
e920921f27 CppEditor: Fix "Move Definition to Class" for function in template class
template<class T>
class Foo { void func(); };

template<class T>
void Foo<T>::func() {} // Move to class

Prior to this change, this currently leaves behind `template<class T>`
where the definition used to be:

template<class T>
class Foo { void func() {} };

template<class T>

Task-number: QTCREATORBUG-14354
Change-Id: I8e1f75a3ae50619a7bae9c63d3798b16bcfea545
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-19 13:00:42 +00:00
Nikolai Kosjar
dcd78d04da ClangStaticAnalyzer: Simplify debugging
* If the logging rules are active, add "-v" to the clang command line.
  This provides the internal command line and the effective include
  paths.
* Dump output also for the success case.

Change-Id: I16a01d010c68575a983a4fb82f8bd8632c2fc20c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-19 07:26:10 +00:00
Tobias Hunger
317a897107 Fix icon path for function in keyword completion
Change-Id: I7e26e625831131994e013fd63356c75f0b20d7ae
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-18 14:08:11 +00:00
Eike Ziller
e52863e609 iostool: Removed unneeded link dependencies
Task-number: QTCREATORBUG-16718
Change-Id: I275c20c7f36b8ccd04c158079e24884a6cb74868
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-18 13:17:50 +00:00
Eike Ziller
052b0337d2 Help settings: Fix crash when removing multiple documentation sets
If they were not selected in the order they appear in the list.
The order of the items in the selection are basically in arbitrary
order, so we need to sort them by row to make sure that we remove them
from bottom to top.

Task-number: QTCREATORBUG-16747
Change-Id: If9be9bb4cd1da71e03946bdd2096034093e3cf14
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-08-18 13:10:56 +00:00
Orgad Shaneh
3e65c9db09 CppEditor: Replace QSignalMapper with a lambda
Change-Id: I403a5f9bb29240181a98390dd4cd8e34110957ee
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-18 12:54:43 +00:00
Nikolai Kosjar
ac0a852f90 Revert "Cmb: Workaround for gcc 4.7 bug"
This reverts commmit e2d60fdcc3 because we
require "g++ 4.8 or later" nowadays.

Change-Id: I1ce7b37bbf8c73ce4466a35b36fd66e680339fe9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-18 12:20:13 +00:00