Commit Graph

44349 Commits

Author SHA1 Message Date
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
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
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
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
Eike Ziller
5457a2b505 Do not use tr() in initialization of static
Leads to issues at load time

Change-Id: Ibf13c88d05b15f6169f3a82a0e1d66c10bff7991
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 07:39:52 +00:00
Alessandro Portale
83f5face41 AutoTest: Redo three icons
benchmark, text and visual

Change-Id: I4b1c92535687cfde397257622f171989bda413cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 07:07:36 +00:00
Nikolai Kosjar
d6da4e5136 CppEditor: Use class enum for CppUseSelectionsUpdater::CallType
Change-Id: Iaf6df1ccec50b84048933506a46b93bedf77da8e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:59:10 +00:00
Nikolai Kosjar
af3416a9de CppEditor: Refactor CppEditorWidget::contextMenuEvent
No behavior change.

* Extract some functions
* Add some clarifying comments here and there
* Add QTC_CHECK()
* Remove QLatin1String
* foreach -> for
* Const-correctness

Change-Id: Ie6ccc987ef959c5295a4d3225aac0dbad144f91d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:59:04 +00:00
Nikolai Kosjar
656b9f9185 Clang: Restrict warning options edit to single line
...to avoid confusion.

Use a customized QPlainTextEdit instead of a QLineEdit because the
latter does not allow wrapping of long lines. Horizontal scrolling in a
QLineEdit for long/many options is inconvenient.

Change-Id: I15b5f034e04920d0ca955c4f822d882b05e9c235
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:58:34 +00:00
Nikolai Kosjar
082ba1d133 Clang: Validate warnings options from user
...in "Menu: Tools > C++ > Tab: Code Model > Clang Code Model Warnings"
to avoid (re)parse issues due an invalid command line for libclang.

If an invalid option is detected, then indicate it by providing an error
message. As long as there is an invalid option, the options are not
accepted.

We do not want to maintain a white list of valid options, so mostly
check whether the option starts with "-W". An unknown or misspelled
option like "-WnotYetKnown" will be ignored by libclang.

To keep passing in some options for testing/debugging convenient, skip
validation if QTC_CLANG_NO_DIAGNOSTIC_CHECK is set.

Task-number: QTCREATORBUG-18864
Change-Id: I196d0474c7521969c54133f52dfc7be0394bfc3e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:57:11 +00:00
Andre Hartmann
d45e44a2d6 Locator: Remove duplicated using namespace from opendocumentsfilter
Change-Id: I47e3dc36a63d6f054d6e806ddb3cb84254d24034
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-18 20:19:30 +00:00
Robert Loehning
27153ddb76 QmlDesigner: Check whether puppet build process started
Change-Id: I6fe1a6c4426ccd6704b27d5a77f1f5aa30d067fd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 16:49:06 +00:00
Eike Ziller
49f3442a72 CodeAssist: Use settable property for IAssistProposal::isFragile
Removes the need to create yet another subclass (for overriding a
virtual method) in some situations.

Change-Id: I55d70de60b4f8d127a175d996f797700c2f172a6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-18 15:33:52 +00:00
hjk
9ff3064561 MemCheck: Code cosmetics
namespaces, includes, use convenience functions when appropriate.

Change-Id: Ibfba9b4ce8d4644829cb308b45b5902e39a57634
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 14:57:49 +00:00
hjk
c4e6678b50 Qnx: Partially fix Attach to Running process
Only works for opened, active project, but better than before.

Change-Id: Icafe3a9605cea29cd16ed4bd316bf195e78efdb5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-18 14:56:50 +00:00
Marco Bubke
382c9647e8 Sqlite: Remove the Sqlite Prefix
We use a name space now, so the prefix is not of much use.

Change-Id: I2b077576f94dab778add6ab2e54870f7ca18da78
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 13:37:11 +00:00
hjk
d2aaa26653 Debugger: Remove DebuggerRunTool::setRunParameters()
It's all coming via individual setters now.

Change-Id: I373f43963e696fa7223f9d664de1df1bc8b021e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 13:01:28 +00:00
Christian Stenger
4068ec44b6 AutoTest: Allow arguments for test runs
Arguments specified for run configurations were
ignored so far, but sometimes it might help to process
them. Add the possibility and a respective setting
to be able to pass arguments to the test run.

Task-number: QTCREATORBUG-17630
Change-Id: Ie64b784e8477efa02f50ce6b4cf3e55864952880
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-09-18 12:17:04 +00:00
Christian Stenger
b1373c4853 CMakePM: Fix compile with Qt5.6
Change-Id: Ic50efba6b7ff70d4811b7e790e7b9c1f89a1fe44
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 12:16:05 +00:00