Commit Graph

53197 Commits

Author SHA1 Message Date
Nikita Baryshnikov
c3c9fbfc44 ResourceEditor: fix remove file
Change-Id: I02a1a5376b0ec0d8013f75dcdec6e4b8992f5f15
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-21 08:42:05 +00:00
Nikolai Kosjar
89fa23a916 Beautifier: ClangFormat: Format current syntactic entity for no selection
In case there was no selection, the action "Format Selected Text" could
format the whole file (option) as a fallback.

However, there is also the use case of formatting the syntactic entity
under the cursor. Introducing another separate action for this feels
wrong, so remove the fallback instead since there is already an action
handling this.

Change-Id: Ia73f6074433e706bb4c2d375ad5b84dd59bc93a3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
2017-09-21 07:15:12 +00:00
Nikolai Kosjar
edab564cf0 Beautifier: ClangFormat: Add action "Disable Formatting for Selected Text"
Change-Id: I0786dfdc0679bbdf1cf1157067bd7f572ac7d108
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
2017-09-21 07:14:27 +00:00
hjk
189dbc585e Debugger: Fix misplaced {
Harm was limited, as these were the fallback values for terminal
and working directory that are overridden in all cases with
real RunConfiguations.

Change-Id: I7d3cef1ac814a0ffcf60a8977e0ae13136ea50b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-20 14:10:49 +00:00
Tobias Hunger
39bf2257c5 ProjectMacro: Prettify output of toByteArray
Remove a stray space in the output if the value of a #define is empty.

Change-Id: I542c092416e00276dc72e31b43215349ecf1ca64
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-20 12:40:36 +00:00
Tobias Hunger
32ce2119d6 QmlDesigner: Modernize (nullptr and member initialization)
Change-Id: I4d791427959c32a8fe8f831ecb7bd76ffbee2a97
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:40:23 +00:00
Tobias Hunger
d366944519 QmlPuppet: Modernize (nullptr and member initialization)
Change-Id: Ifac20a48df8702f9d31042eb8765cbaadb60b25b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:40:18 +00:00
Tobias Hunger
2ec0b5a00e CppTools: Fix warning about inconsistent use of override
Use final consistently instead of override.

Change-Id: I38df29fff98273d486bfd97c316492f27737a7c4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-20 12:40:09 +00:00
Tobias Hunger
8fb3105e25 CMake: Add option to auto-create build directories
Add an option to CMakeTools to force auto-creation of build directories.
This does lead to cmake cluttering up the file system with directories, but
does not force users to go through the oftentimes long configuration process
twice (once in a temporary directory and once in the real location).

Task-number: QTCREATORBUG-16794
Change-Id: I68d92fc58638ad0a0a7622b7ef1621e055c9f2a7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:39:18 +00:00
Thomas Hartmann
ab1d1daee3 QmlDesigner: Remove exception
An invalid model node has as valid internal node
that can be used.

Change-Id: I4b4f11546645455cbcc058e057402e869b0ae5a1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:18:51 +00:00
Thomas Hartmann
6745536f1e QmlDesigner: Fix @NodeInstance
With @NodeInstance we can override the value of any property.

Change-Id: Ib64d8b6823b82f0a809092b2468c008d73a5525c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:18:43 +00:00
Alessandro Portale
50bd20de21 Welcome: Remove unused image
mode_edit_mask.png must have been added there by mistake

Change-Id: I94c0380f267f473c1ae1347f567ea959f0752496
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-20 11:51:58 +00:00
Marco Bubke
3118bdcbd8 ProjectExplorer: Convert empty macro to "KEY="
-DKEY is the same as #define KEY 1
-DKEY= is the same as #define KEY

Change-Id: I958a89d7b024999f1a623d4d309513ce342f6f8a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-20 11:51:26 +00:00
hjk
434e895b73 Debugger: Remove parts of the engine parameter fixup phase
The idea is that the fixup should not be needed at all anymore,
instead, static data coming e.g. from the RunConfiguration should
be setup in the constructor, and everything else should be ready
at entry into start().

This also proceeds on path to the planned-but-never-implemented
idea that the RunConfiguration should (at most) be accessed at
RunControl creation time, not later.

Change-Id: I04d622785f5de628a7bb479bc0c39aff7d6cce01
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-20 11:49:15 +00:00
Tobias Hunger
899c518c6d Android: Fix ma-make detection
Broken by 71b56d2b9c

Change-Id: I8d92cb1f0ecfcb401f063ba49c357acac8cc832c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-20 11:49:01 +00:00
Marco Bubke
2df9a99cac Clang: Add RefactoringDatabaseInitializer
We moved the creation of the tables and indices to an extra class which can
be called from other places. So you can be sure that a database is
initialized.

Change-Id: Ief5b30ced7b9011ca94367aa2578098423dcecd9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 10:45:07 +00:00
Marco Bubke
623135592c Sqlite: Add locking for sqlite transactions
If you use the database in a multi-threaded environment, you must always
your statements in transactions.

For read-only statements, you use DeferredTransaction and write statements
you use ImmediateTransaction. If you mix read and write statements you have
to use ImmediateTransaction. Don't use DeferredTransaction because it leads
to undefined behavior.

Change-Id: Ida298a20f33423c8da09e768a7b658dd8e918f46
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:44:37 +00:00
Marco Bubke
ee5efe06e6 Sqlite: Don't copy values for binding
In Sqlite as you bind value you can bind or simply use a reference to the
bound values. Because we hold the values anyway we do not copy them.

Change-Id: I11c6fa5036ea958c8e48e3a117ad4a002d749c22
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:44:23 +00:00
Marco Bubke
c870199823 Sqlite: Don't use the lower level interface of the statements
We now have the very powerful write and read methods, so using the low
level interface leads only to stupid errors and prevents optimizations.

Change-Id: If2340833977935cb2d319735dee96b0bac33142b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:44:15 +00:00
Marco Bubke
a83d038208 Sqlite: Improve exception handling
Introducing different exceptions for different error cases.

Change-Id: I4371d1e64d9dca2a9f68dcbaa4a891c55879c1f5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-20 10:43:59 +00:00
Filipe Azevedo
846d89811a Fix unstoppable debugger
For some reason sometimes a user stop request with lldb can trigger
a spontaneous stop, avoiding the debugger to stop correctly.
This change fix the issue by emitting the correct states from
lldbbridge.py.

Change-Id: Ib8a2f4875824f4fff426b2d5e0fc4a79ce48c68e
Reviewed-by: hjk <hjk@qt.io>
2017-09-20 09:49:53 +00:00
Nikolai Kosjar
76006a1353 C++: Fix crash with invalid raw string literal
While parsing a document Bind::asStringLiteral() Token::spell() was
called for a raw string literal token with a Token::literal nullptr.

This is due scanRawStringLiteral() not properly aborting for
invalid/incomplete code and that the code paths handling
multi-line-raw-strings were not limited to the highlighting case.

Address both cases.

Task-number: QTCREATORBUG-18941
Change-Id: I489d288ccbd7b59be396dada846613ff555436cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-20 07:38:04 +00:00
Christian Stenger
49e0cef765 ProjectExplorer: Fix build with namespaced Qt
Broke with b6e12f4a.

Change-Id: I81af93bfe19801805fd558e3445cd9788f2574b3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-20 07:24:39 +00:00
Christian Stenger
bf5bc72b5a CMakePM: Fix compile with Qt5.6
Broke with be376ae7.

Change-Id: I9c99a7be78c7ec0359cefee84e2e1877d20f25bf
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-09-20 05:22:24 +00:00
Andre Hartmann
50581683ba CamelHumpMatcher: Support uppercase snake matching
Often used for macro names, e.g. TEST_ASSERT_EQUAL_FLOAT(),
which can now be matched by "TAEF".

Change-Id: I0626a60e2be68c1514c28769c679212075227281
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-19 17:03:10 +00:00
Alessandro Portale
2a945fc51d ProjectExplorer: make the build_small icon themable and HighDPI-able
Change-Id: Id53e52962e68ac27bc121bca04d572c0dff5b253
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-09-19 14:32:32 +00:00
Alessandro Portale
5e89fae10f Unify the dimensions for all mode/action bar icons
Having icons of all different kinds of sizes makes it difficult to get
the painting right in all cases. It definitely fails when the szsytem is
running in multi-monitor mode with different scaling factors. Unifying
the dimensions makes it possible.

This change should not cause any visual difference in a purely scaled or
unscaled screen.

Task-number: QTCREATORBUG-18869
Change-Id: I3a864c9a86036b4f4f3b350a489077b247ca85b7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-19 13:54:30 +00:00
Serhii Moroz
0bf27af0a7 TextEditor: Fix blockSelection painting in "Text Wrapping" mode
Change-Id: I1ba4587ce4f8e88a1c81c5ac3c9d6dac582bd71f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 13:48:06 +00:00
Orgad Shaneh
a627f4eef7 Dumpers: Print readable output in tests
Change-Id: I32864c9c1b8fe60b5b01423f68e63a3c00b936f8
Reviewed-by: hjk <hjk@qt.io>
2017-09-19 13:47:19 +00:00
Tobias Hunger
be376ae706 CMake: Enable type forcing for CMake configuation values
Allow to force the type for CMake configuration values, now that
this type changes how you can edit the values.

Change-Id: Id89e0ec8547b778fc0aff9a2e00c0d7406cbcac1
Reviewed-by: hjk <hjk@qt.io>
2017-09-19 13:17:50 +00:00
Robert Loehning
9afe6fa1c4 Squish: Update texts of message boxes
Change-Id: I3ca17bb62201d6271c0e98d07a99f7344faba439
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 12:04:54 +00:00
Tobias Hunger
5c0b21d78e Environment: Modernize a bit
Change-Id: I84afdfd8c8b5066c1b50192bfd9df2296a38fa23
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 11:37:09 +00:00
Tobias Hunger
5bd2887045 Environment: Keep case of environment variables on windows
Task-number: QTCREATORBUG-18915
Change-Id: I4c389155e03dde423d1ed578409baa1f38fc26db
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-09-19 11:37:03 +00:00
Tim Jenssen
a2e3e9bcac QmlDesigner: code improvement
Change-Id: I986e98057b46d481707b00b715809a1c6c218646
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-19 10:58:52 +00:00
Andre Hartmann
80415bd14e Revert "SearchResultWidget: Disable replace button if replace text is unchanged"
The Refactor -> Convert to Camel Case quickfix calls setReplacementText()
with the replacement text already, in contrast to the other search and
refactoring functions, which pass the search text. Therefore, the replace
button is disabled wrongly in that case.

This reverts commit e75f595873.

Task-number: QTCREATORBUG-18947
Change-Id: I906a58f65a88cce42d2da6431e59b88fae4ec45a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 10:52:44 +00:00
Eike Ziller
8e62881b12 Make DocumentManager::projectsDirectory a FileName
Change-Id: I9454c2148c398939c64bfa6b1fc182670a1d5f99
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-19 10:13:49 +00:00
Eike Ziller
a7e2d0cff0 Merge "Merge remote-tracking branch 'origin/4.4'" 2017-09-19 10:11:03 +00:00
Eike Ziller
3d9cf954e2 Merge remote-tracking branch 'origin/4.4'
Conflicts:
	src/plugins/debugger/debuggerdialogs.cpp
	src/plugins/debugger/gdb/remotegdbserveradapter.cpp

Change-Id: I1ae77869887a8d9ef2a33439f2733315db9e0cf0
2017-09-19 12:10:26 +02:00
Tobias Hunger
906e23129c QtSupport: Fix warnings about unused lambda captures
Change-Id: I445c616c03da701d2f0c9480191bef7812b9943f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 09:58:00 +00:00
Tobias Hunger
69a2feea4f TextEditor: Fix warning about unused capture in lambda
Change-Id: I0c9558904ffb43ad6d106b20ce7dd3caea0f23d9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 09:57:47 +00:00
Robert Loehning
b58dadfecc Squish: Enclose code model tests in sections
Change-Id: I4478acfc5ea7b3fa22d1cd17576e04fdda81dbb9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 09:44:08 +00:00
hjk
fe1cbd0f87 Debugger: Add yet another virtual inheritance test
Failing for now.

Change-Id: Ic624b9c64f85f06bf61a2e8f765a272a835c0c43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 09:20:52 +00:00
Tim Jenssen
4f03ea96a2 QmlDesigner: fix uninitialzed value warnings
Change-Id: Ieddd83953b2009656ceecea2f9fedecd54ac9ac8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-19 09:10:29 +00:00
Alessandro Portale
432e0c54c8 QmlDesigner: Let IconCheckboxItemDelegate use QIcons
For mixed-DPI screen scenarios, a pixmap can not satisfy both
resolitions. Use QIcon, instead.

Task-number: QTCREATORBUG-18869
Change-Id: I155a4300927f7a66de3d523c9daab4953b5e45c2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-19 09:03:53 +00:00
Alessandro Portale
6b0b8c24b5 Utils: Let FancyLineEdit have QIcons instead of QPixmaps
A QIcon contains variants for different resolutions. This change
makes sure that in a Multi-screen/mixed-scaling-mode scenario,
the right of those resolutions is chosen, depending on which screen
the line edit currently is.

Task-number: QTCREATORBUG-18869
Change-Id: I8775e9e2c9b15c2863e9415751e1306f9e43c9aa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 09:03:12 +00:00
Tobias Hunger
f4ff420036 CMake: Improve delegates for CMake configuration
Change-Id: Ib1d2bfca1b2faafd36c53f24c6649e73ee0af190
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 08:42:20 +00:00
Andre Hartmann
632f2a7709 Locator: Add camel hump locator filter for C++, QML, and files
* Use the CamelHumpMatcher in the C++, QML, and files filters
* Supports matching against UpperCamelCase, lowerCamelCase
  and snake_case strings
* Supports highlighting of matched characters

Task-number: QTCREATORBUG-3111
Started-by: David Kaspar <dkaspar@blackberry.com>
Change-Id: If6220191432ef965bde3c8dbe4a10d89e222ba6f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 08:24:38 +00:00
Orgad Shaneh
2fb54abd03 CamelHump: Do not match first char in the middle of a word
When matching NLH against LongCamelHump do _not_ consider the N
of Long as part of the match. The first character needs to meet
the same requirements as the others.

Change-Id: I4e7b2fe5a28296afe6f06f90e1986336fe7f3179
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-19 08:24:14 +00:00
Marco Benelli
d600bae736 QmlJs: better indentation for switch common cases
Do not add an empty line between common cases in a `switch` block,
according the best practices for javascript style.

Task-number: QTCREATORBUG-18515
Change-Id: I8b665eabb9b1d5b617d608e430e8b9137dc32032
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-19 08:04:50 +00:00
Marco Benelli
65b2edbd82 qmljs: better handling of attached properties
Attached properties used to cause false positives in the highlighter,
because when using qualified ids, only the first part was checked as
candidate for being at attached property.

Task-number: QTCREATORBUG-18707
Change-Id: I6b1b569bc1766325decbc5d100c16a4e0dc3634f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-19 08:04:36 +00:00