Commit Graph

44349 Commits

Author SHA1 Message Date
Jarek Kobus
dbfb5eaba1 Fix showing/hiding context lines spinbox in diff editor
Widgets which were added to a toolbar can only be shown or hidden
by calling setVisible() on their respective action, which was
created while addWidget() was called.

Change-Id: If09257abf5a7a054513fe01b2a1c69d584865dfa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-25 08:45:36 +00:00
Eike Ziller
57ca90b846 BaseFileFind/FindInFiles: Clean up enabled / valid state handling
IFindFilter:  Separate enabledChanged and validChanged
SearchEngine: Add enabledChanged
GitGrep:      Enable widget based on enabled state
FindInFiles:  Update validity on search engine enabledChanged instead of
              hardcoding it to when the search path changed

Change-Id: I0c684423b871a3a4f1f164574f42e23b64cf9da0
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-25 08:42:53 +00:00
Eike Ziller
62a842e447 Find: Reduce indirections and bookkeeping
Get rid of the separate filter -> action map, some utility functions,
and action user data by utilizing lambda captures.

Change-Id: I1eb8969440fdfedfee96a9f9e046c1436d02d64f
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-25 08:42:37 +00:00
Jarek Kobus
224fda31df Keep bineditor zoom in sync with global settings
The code is basically copied from TextEditorWidget.

Change-Id: I5a88814d59ee991be030b15840e1aff08f20a25b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-25 08:39:18 +00:00
Marco Bubke
9dfa210011 Clang: Partial fix for highlighting off output arguments
We get the source range for the parameter list and not the arguments
in the initializer list back. So we have to disable the test case.

Task-number: QTCREATORBUG-17101
Change-Id: I65ec6d111766b5728a951b024576cbf777c89728
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-24 16:54:01 +00:00
Florian Apolloner
4c22f3a76c Fixed cmake signal handling in server-mode
Task-number: QTCREATORBUG-17319
Change-Id: I25673a32142a691dff2444be8981d747f10e18c5
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-24 14:51:17 +00:00
Ulf Hermann
7c07774a04 QmlProfiler: Don't use QML_MIN_LEVEL for expanded row number
You cannot have a row label on top of the category label, so in
expanded mode, the rows have to start at 1.

Change-Id: I89e5219355919dcc9003a46f9caf8f017b37e6cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-11-24 14:25:11 +00:00
Eike Ziller
be2697f818 Avoid resizing of document dropdown
When e.g. splitting while an editor with a long display name is open,
the new editor area would start with a huge document combo box.
Fix it to the minimum contents length.

Change-Id: Ic58e477cc8f9a91e7fa138de63ed7df80487a5fe
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2016-11-24 14:19:04 +00:00
Thomas Hartmann
08c9055ab0 QmlDesigner: Fix delegate for images in tree view
Assigning different heights for different model indexes
does not seem to work. Every item has now a height of 64.

This is fixing a couple of ugly graphical glitches.

Change-Id: Ib047dfa5cfbbc8afca6e1e2384792dbe156b5c4f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-24 13:58:27 +00:00
Nikolai Kosjar
3245a3d2f5 Clang: Soft assert valid instrinsics dir
We probably should add a message box for this in the master version.

Change-Id: Icc01eeb258445c361e7c6227e6bd768b9d16d350
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-24 13:57:17 +00:00
Ulf Hermann
7d542b82ad QmlProfiler: Don't test for default kit in attach dialog test
The test should also run if there is no kit.

Change-Id: Ia2b5d34f2fc792235fb9da9c77f9235c186addde
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-24 13:56:09 +00:00
Tim Jenssen
c7cb98eeb2 Welcome: set import pathes only one time
Change-Id: Ie398a8fdbea44498d03870f42a89e2b185bf51be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-24 10:45:56 +00:00
Jarek Kobus
b8036e7d31 Don't save context chunks
Otherwise the saved patch file contains the whole contents
of the compared files.

Change-Id: I0f2d4c4e9b2c56ceab2b1e312e0895087060d0dc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-24 10:33:20 +00:00
Jarek Kobus
f778880a3b Fix SideBySide diff editor icon
Broken in 033862f305.

Change-Id: I8930de03b02dcf2859b11218b25fa0099e957791
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-24 10:33:08 +00:00
Christian Kandeler
c7e6054601 QbsProjectManager: Fix potential crash
Iterators 101: Make sure begin() and end() are called on the same
object.

Task-number: QTCREATORBUG-17339
Change-Id: Id757918e20a0a5017dc2135757f96f446abe0f48
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-24 09:47:55 +00:00
Martin Kampas
f67b8405a9 UpdateInfo: Inherit environment when checking updates
Broken since 26ba9e62f3 (UpdateInfo: Fix
checking for updates)

Change-Id: I89e8346f4cba1cd6b40382e644d3a54aafc959e2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-24 09:43:08 +00:00
Tim Jenssen
d63001f1e1 TextEditor: fix warning
Change-Id: Icaf4134dc9948898f8871f210cafdee49575faef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-24 08:36:41 +00:00
Orgad Shaneh
971292a044 Remove last nokia references in comments
Change-Id: Ic5b815061212f66af5e36396b9a2b94cfbdfbe52
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-24 08:35:05 +00:00
Christian Stenger
bf3d2b0a3d ClangBackend: Fix missing include on macOS
Change-Id: I17c33d011941d4f425d9dc664f4faa0af250e967
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-24 08:35:00 +00:00
Nikolai Kosjar
e37772c1c6 CMake: Remove unused parameter
builddirreader.cpp:82:74: warning: unused parameter 'other'
[-Wunused-parameter]

Change-Id: I5e7825f3819c04ab549a442941529066c19809c1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-24 08:09:50 +00:00
Jarek Kobus
f720daed91 Clear the uniqueId of diff editor when saving
Saving diff editor transforms it to patch-file
read only editor. Clearing the uniqueId
ensures we don't use it anymore for showing
e.g. current file's modifications.

Change-Id: I2010161697bbad254ce1ebe5d0bb6a1f38ae323c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-24 07:55:18 +00:00
Friedemann Kleint
0a9414d467 Abi: Handle MSVC2017 in relevant places
Fixes kits forgetting the compiler.
Amends change 4c29f5fc8f.

Task-number: QTBUG-57086
Change-Id: I853dc91fd40ddbd8726fcb1a682753b163a63cf6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-24 07:43:36 +00:00
Ulf Hermann
93ac3a50a6 QmlProfiler: Deduplicate some code
Change-Id: I17dade638202fd4c909020addd6a0a08f3e98c7a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-24 07:41:25 +00:00
David Schulz
a494a84b33 Debugger: Strip "union" from typename upon creation
Change-Id: I36f818d72bb6289523dc9de07899ea438ebb14d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-24 05:44:49 +00:00
David Schulz
432fcb65d4 Debugger: Fix dereference function of the cdb value
Change-Id: I6815679900cde6365f2ed7ca874a081babd366c1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-24 05:44:44 +00:00
David Schulz
1df8f19257 Debugger: Create reference types for arrays and pointers
Directly looking up array and pointer types is more
likely to fail than looking up the target type.

Change-Id: Icea8320e2eedd34f6d81692c5eacf50f644100bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-24 05:44:40 +00:00
Ulf Hermann
1bb19cc48e QmlProfiler: Suspend timelinemodels while editing them
The models are in an inconsistent state while we're processing data.
The items may have out of range row numbers, we don't get a
contentChanged() signal for each item added, the labels may not be
in place, yet, etc. We don't want the models to be accessed during
that time.

Change-Id: Ibe81e0943de78d5bb45d46d005e847ec2d4ae66d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-23 16:13:03 +00:00
Ulf Hermann
824f5f443a Timeline: Use the same type for setting and getting a model list
We want to use QVariantList here because that is the only list type we
can pass to QML without special registration.

Change-Id: Ia57f8f0c578388da7603ddb6d62288e9cf61e381
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-23 16:12:51 +00:00
Eike Ziller
2ed5d7998a Find Symbols: Use QRegularExpression instead of QRegExp
This makes it more consistent with the other find filters.

Change-Id: I39ad144d66091c3ccc5e4452009cc236165915ea
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-23 15:35:48 +00:00
Marco Bubke
03bbd88eb1 Clang: Fix highlighting of instance with member for writable arguments
struct X
{
  int member;
};


void f(int &argument);

void foo()
{
  X x;

  f(x.member);
}

Task-number: QTCREATORBUG-17101
Change-Id: I6746122dbe86d032b3797a01b5f2257846007f94
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-23 15:22:50 +00:00
Nikolai Kosjar
a86ff510dc Clangbackend: Fix warning about inconsistent use of override
Change-Id: Ia7a00fea846119f3026d4db2665853fc72a3a888
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-11-23 15:01:32 +00:00
Jarek Kobus
78c3590705 Make skipOpeningBigTextFile() public and use it in Diff Editor
Change-Id: I5e98d1ab93ac442c1f1a132a51ab838567a735a0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-23 14:08:38 +00:00
Christian Kandeler
0516f776cc QbsProjectManager: Fix precompiled header collection
Precompiled headers are designated via file tags since qbs 1.6, whereas
the code here still assumed the earlier, property-based approach.

Task-number: QTCREATORBUG-17195
Change-Id: If379fab5fbe63c7e3128d2ab1c53d08737cdcff1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-23 13:44:06 +00:00
Tobias Hunger
bbcfbdf58d CMake: Log server-mode data
Change-Id: I043459224b790900e6f13b6fa8f389dbeca26789
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:52:58 +00:00
Tim Jenssen
6fe90532dc Utils: Add offset to search results
Offset are better to compute the length of a text range. The only problem
is that we get them for utf8 because that is the text representation of
source file. QTextDocument is Utf16 based, so it can not binary represent
the source file. Actually I do not see a simple performing workaround for
it.

Change-Id: Id615e1ee6a6e85c6ecc4f8044e275142409d9b46
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:33:34 +00:00
Jarek Kobus
4aae6b730f Show progress indicator while reloading diff
Change-Id: Ieefdb885682f01e0e1c8cec90f4769e832650a0c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-23 12:17:11 +00:00
Tim Jenssen
7f757884c5 Clang: Extend clang query
It's a first step to introduce clang query.

Change-Id: I4d001a8883f56066765ce6bc561fa3f49611c0a4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:16:04 +00:00
Tobias Hunger
52fc4a4ebd CMake: Make sure to never trigger a timer on an destroyed object
This object might have gone out of scope by the time the timer hits.

Task-number: QTCREATORBUG-17289
Change-Id: I4b9ea75c9b4b1c905ece44965e80a5accc3590f3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:06:15 +00:00
Tobias Hunger
2d777a8082 SDKtool: Make AddKit handle cmake related settings
--cmake <ID>, --cmake-generator <GEN>:<EXTRA>:<TOOLSET>:<PLATFORM>
and --cmake-config "<KEY>:<TYPE>=<VALUE>" are now supported.

When using --cmake-generator <GEN> must be set, the rest is optional.

--cmake-config may be repeated several times. All will end up in the
kit in the sequence they appear on the command line.

Task-number: QTCREATORBUG-17290
Change-Id: Ida79d65095682331f53d0fbb36d606ad16e6c4ac
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:06:08 +00:00
Tobias Hunger
5f6a3f90fb SDKtool: Add rmCMake operation
Task-number: QTCREATORBUG-17290
Change-Id: I17363e44614aebcc06786b791249ce9468b37eb4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:06:03 +00:00
Tobias Hunger
9943a638dc SDKtool: Add new addCMake operation
Task-number: QTCREATORBUG-17290
Change-Id: Ia81408a8b84a3b675e5518b8b3529a9afcb0521d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:05:58 +00:00
Tobias Hunger
94a1e5696a SDKtool: Add cmaketools.xml support (via shortcut)
Task-number: QTCREATORBUG-17290
Change-Id: Ia13a7fae2ab7db5e66162d6219d0e58f94efe8bd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:05:52 +00:00
Nikolai Kosjar
4a08f14cf6 Clang: Fix removing text marks on line deletion
Task-number: QTCREATORBUG-17270
Change-Id: I582015597a65141e420622dcdb50e82f9791b189
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-23 11:52:31 +00:00
Nikolai Kosjar
c4d9f6ac3f Clang: Fix updating dependencies
...if the registered document comes with unsaved content.

This can easily happen if the document is opened and modified by a
refactoring action.

Task-number: QTCREATORBUG-17295
Change-Id: I3a95fb495b6122248ceaa80985e838851ba2c0e5
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-23 11:50:44 +00:00
Nikolai Kosjar
6cf1f7968f Clang: Fix initial document parse with modified content
Reproduce with:

  1. Create a new class named Foo with the wizard.
  2. Close foo.h
  3. In foo.cpp, add some class member function.
  4. In foo.cpp, trigger the refactoring action "Add public Declaration"
     for the just defined member function. As a result, foo.h will be
     opened.
     ==> While the declaration was added, the header file is not yet
         reparsed with the new content - this can be verified by setting
         a custom color for "Function".

In this use case, the refactoring action opens the editor and
immediately modifies the document (RefactoringFile::apply).

Fix by sending the document content along for the very first
RegisterTranslationUnitForEditorMessage if the document was already
modified.

Change-Id: If20615a45b72dd0bef87e1870e403d0b277bc5d6
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-23 11:50:39 +00:00
hjk
6190801bf0 Debugger: Show position in separately displayed text in tooltip
Task-number: QTCREATORBUG-17324
Change-Id: Ic9571a91e5f414abd10b18698a0e0ae9bb0f1f46
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-23 11:17:27 +00:00
Jarek Kobus
d34414b428 Make some variables const
Change-Id: If0b6939d2c8446526f6d779486776bbea62fbc67
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-23 10:57:34 +00:00
Jarek Kobus
2c050f7750 Don't use static variables in differ
Now the differ may run in parallel
in many threads. Static variables
may lead to crash.

Change-Id: Iae0d7678cdca3e57cb619141081250b458852bfb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-23 10:57:15 +00:00
Marco Bubke
ddfd29852a Utils: First step to extend search results for clang query support
We need multi line support, multi text range support. This is only adding
enablers and adds later the multi line and multi text support because this
triggers larger changes because you have to know the text document.

Change-Id: I44e46d9d80d7d73b2650c69cc83657c20c85bfae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 10:48:59 +00:00
Nikolai Kosjar
0e12c51d0b Clang: Clean up clangbackendipcintegration.cpp
Change-Id: I60d7d2969d55499bc2ac5ddaf0127c60e8c76a7a
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-23 09:17:39 +00:00