Commit Graph

44349 Commits

Author SHA1 Message Date
Marco Bubke
3dcce060b2 Sqlite: Cleanup Sqlite
We don't need the threading anymore, so we removed it. The indexer
will be run in its thread anyway, so an extra thread makes the code
only more complicated. And we added namespaces.

Change-Id: Ibcba306324763285cf653c28bb08122345e5f8da
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-27 09:14:30 +00:00
Leena Miettinen
8e178c08e4 Android: Make UI text more clear
The definite article "the" should be "an", but I would like
to rewrite the notice to use simpler language.

Change-Id: Ic611343724f32b3b1f22a5c768c387cafceb0890
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-07-27 09:08:48 +00:00
Nikolai Kosjar
ba6939fa90 Unit tests: Fix ProjectInfoGenerator.* tests
...by adapting to recent mime type changes:

    commit e8e46ab553
    Plugins: Fix that mimetype definition was not valid JSON

Change-Id: Iac416ab481814e4488fac4d818c51c647c1ec349
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-27 08:44:12 +00:00
Andre Hartmann
c78ea5a7ea CppFindReferences: Fix file name case sensitivity on class renaming
Utils::matchCaseReplacement searches for common prefix and suffix
between old and new file name und leaves them unchanged. This leads
to unexpected new file names.

E.g. when renaming MainWindow to MyMainWindow, this function computes
the prefix "m", the suffix "ainwindow.h" and only considers "yM" as
the middle part that is actually renamed.

Use a better algorithm to determine the new base name, and for
unclear cases fall back to the "Lower case file names" option
from Tools -> Options -> C++ -> File Naming.

Task-number: QTCREATORBUG-18592
Change-Id: I818f7d372102eb6e266123b2b4b6355f6fa28d64
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-27 08:10:02 +00:00
David Schulz
2c5186253f QMakePM: Use generalized KeywordsCompletionProvider
Change-Id: Iaa6476be9285d814e4357b861c8fd00f1c9adc1c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-27 07:49:16 +00:00
David Schulz
c7abc41d97 TextEditor: Make text snippets available in all editors
... that do not define their own completion assist provider

Change-Id: I8edb65647a55178d4388b26c95cdeb301ff9f3fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-27 07:49:06 +00:00
Christian Stenger
d68f258754 Debugger: Avoid crash when attach to process fails
If attaching to the current's project running executable fails due
crashing inferior the run tool is cleaned up already when trying to
fetch its run parameters.
Circumvent by checking whether run tool is still accessible.

Change-Id: I56f3d841d77d0513806a2b91357841f160f74ed3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-27 05:02:59 +00:00
Orgad Shaneh
9030e34dea Debugger: Fix crash when interrupting while waiting for locals
Change-Id: I9c8fbe14d238b2c2526598d4cbca561c7e9a5d0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-27 04:46:53 +00:00
Jochen Becher
4b3acf03fb ModelEditor: Fix a crash moving packages into itself
Change-Id: I1a722b9514ee0a57d8bd8be2f4ea05ed87c6686d
Task-number: QTCREATORBUG-18262
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-26 15:59:30 +00:00
Tim Jenssen
babb49b048 QmlDesigner: add forgotten componentcore resource
Change-Id: I486c690f848a15ac4675077e786a05fbd65e6a0c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-26 15:34:27 +00:00
Kai Koehne
2b467e8ea7 Fix compilation breakage with mingw / windres
The replacement of string defines in the .rc file that was introduced
in commit b5703bcd029fd does not work with windres. Here the string
literals have to be explicitly quoted by STRINGIFY. Also, we need to
replace literal spaces with \x20.

Task-number: QTCREATORBUG-18635
Change-Id: Ie01886ea680c3c07c4e0a031f12b6fe60e896263
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-26 13:57:40 +00:00
Orgad Shaneh
94ba1b8b5d Abi: De-noise
* Remove QLatin1String except on return
* Remove unneeded qualifications

Change-Id: Ic7c928c7d53c03c398fddc7353dd9e08a125e701
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-26 13:17:38 +00:00
Tobias Hunger
46f39f5601 CMake: Simplify signaling
Change-Id: I50fdaed0d813b5004c1756e9c5a6efd3ce7a3318
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 09:29:47 +00:00
Tobias Hunger
09b127f9f1 Project: Move signalling of parsing state into Project
Get rid of duplicated code to do such signaling in derived Project types.

Change-Id: I26914a1d751d72ee65c15a7943e0e7f34978f042
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 09:29:21 +00:00
Nikita Baryshnikov
5d362a4d76 QmlDesigner fix parentheses warning
/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp:145:
warning: suggest parentheses around '&&' within '||' [-Wparentheses]
                 || selectedItemCursorInMovableArea(event->scenePos())
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 && !event->modifiers().testFlag(Qt::ControlModifier)
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 && !event->modifiers().testFlag(Qt::ShiftModifier)) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: Iea6018d885b9bad13363a39e2aee0e6e229f93c4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 09:01:12 +00:00
Orgad Shaneh
e6fb1fea65 C++: Delete empty source file
Change-Id: Ib86e09d6d516b175e715725fa9b60d7ae2626ff8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-07-26 07:57:20 +00:00
Orgad Shaneh
3e91c7670e C++: Re-add Roberto's license header to files without one
Nokia's license header was removed in
b342ad8cf4, but these files didn't have the
second license header that was supposed to remain.

Change-Id: Ib9977a3127fd48197a1a02982e7563c486bfca3a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-07-26 07:57:03 +00:00
Orgad Shaneh
dc43b89172 Replace include guards with #pragma once
Change-Id: Icce9d191cc6cae89baf973e949dc0757d318d6ea
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-07-26 07:44:27 +00:00
Eike Ziller
3841d2fce2 Locator: Fix diverse issues with drawing highlighted text
To draw the result items with highlighted parts, we split the text to
draw into "before highlight", "highlight" and "after highlight", and
painted them separately. This had several issues:

It breaks the text layout. Characters within a text are often started at
subpixels, which was not so visible in the static search results, but
lead to ugly artifacts while typing in Locator (enter a search term, and
then continue adding characters that still match the first found item,
and watch the effect in the "after highlight" part).

It needs a lot of custom painting code. Properly supporting text elide
modes is hard, scaling to more than one highlight as well. Reusing parts
of the QItemDelegate base functions also has its issues, e.g. that
clipping doesn't work well.

Instead, QItemDelegate::drawDisplay should make it possible to set
format ranges for the text it draws. This patch copies part of
QItemDelegate to be able to add this parameter. Unfortunately Qt
currently has a bug (QTBUG-62019) that character backgrounds are not
painted far enough (1 pixel to the right has the wrong background), which
looks very ugly in selected items in the search results. So we use the
new delegate only for Locator for now, to be used later for the search
results too, when that bug is fixed.

Task-number: QTCREATORBUG-18532
Change-Id: Idf59b2c2bcfa6b188a810f7a3128a81e7e6fffb1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-26 07:16:25 +00:00
Christian Stenger
05bcba3e73 AutotoolsPM: Fix compile with older gcc/Qt5.6
Change-Id: I60614b87f80443ffa39ed4e4fa59ad0165a63cc8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 05:52:44 +00:00
Orgad Shaneh
574b991310 GenericHighlighter: Update from KSyntaxHighlighting
Mostly whitespace cleanup.

Change-Id: Ife5831b23d5ee7406ece839f2c1061c9364ac4ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-26 04:39:09 +00:00
Tobias Hunger
22e053b86f CMake: Show executable in Run Configuration
Task-number: QTCREATORBUG-18173
Change-Id: If512991873121151e18b56781729f6b841796549
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:29:58 +00:00
Tobias Hunger
b8e348c4af BuildStep: Do not use QLatin1String/QLatin1Char in BuildSteps
Change-Id: I287831a9151ba867eec443206235c7e07a6176e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:29:26 +00:00
Tobias Hunger
0bfa2e80c9 MiniProjectTargetSelector: Fix includes
Change-Id: I057a0bf08bed470b412082a34029ccec03e32d28
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:29:15 +00:00
Tobias Hunger
ae95074b17 MiniProjectTargetSelector: Simplify code
Change-Id: Ie28efa6deb29801dd670656eeeeef81ccc4ae87f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:29:09 +00:00
Tobias Hunger
96df9f9189 QmlJSModelManager: Simplify code
Change-Id: Idb4fef70063ce3b42c497e302e4b69bb73f314d7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:29:03 +00:00
Marco Bubke
4beaae0f79 Introduce Breakpad crash handler
Google Breakpad (https://chromium.googlesource.com/breakpad/breakpad) is a
widely used crash handler framework, e.g. by Mozilla and Chromium. It is
providing a platform neutral solution to generate mini dumps, collect
debug information and generate stack traces from those.

Done-with: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Change-Id: I09382e7db0dc9e29b228e7b554fda7b6f5684349
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:24:11 +00:00
David Schulz
0332a8c173 ProjectExplorer: Simplify TaskMark constructor
Change-Id: I8ba0e8451772eff605961e0d9aff15f535c12566
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 13:28:24 +00:00
Vikas Pachdha
8db91e822b iOS: Skip simulator rename for empty input
Task-number: QTCREATORBUG-18629
Change-Id: I47ebb8b9046dda904e22612818f597e0ec7416db
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-25 12:28:48 +00:00
David Schulz
5294c68c98 TextEditor: Add display settings page link to annotation tool tips
Change-Id: I453127693dd1e0b30918333ac6866ac2fca4baa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-25 12:00:49 +00:00
David Schulz
3ec59b46df TextEditor: Use member initialization in TextEditorFactoryPrivate
Change-Id: I97a077a922208545b5a6c7dc07c4de667fa0d833
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-25 10:51:49 +00:00
Robert Loehning
95617ff971 Qmake: Remove dead code
Change-Id: If28fb24a47a462b5c79ff22ded515d14c010ce72
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 10:19:19 +00:00
Orgad Shaneh
131a796f9f GCC: Detect multiple versions of gcc/g++ on linux
Debian/ubuntu systems can have /usr/bin/g++ which is GCC6,
/usr/bin/g++-5 and /usr/bin/g++-7.

The same applies for cross-compilers.

Detect them all.

Change-Id: Ia7b403efbfab60b05c4f27a9011d054d52c3aa1a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-25 10:17:26 +00:00
Eike Ziller
efa5a7b6d7 Merge remote-tracking branch 'origin/4.4'
Conflicts:
	qtcreator.pri

Change-Id: If5f4a9821a23ac0df81eb84b3980f9cf7ecd70ba
2017-07-25 11:54:44 +02:00
Eike Ziller
41127e0f47 Merge remote-tracking branch 'origin/4.3' into 4.4
Change-Id: I4e14ef31dc6cdcc0606d39be90195e30c1ee9b25
2017-07-25 11:50:43 +02:00
Vikas Pachdha
3881ff94f7 Android: Fix sdkmanager timing out on slower machines
sdkmanager times out on slower machines or with slower network
connection. Increase the timeout and show timeout message box

Task-number: QTCREATORBUG-18458
Change-Id: I9118024ec1438ef9c18842df2f7431e696c73f92
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 09:43:54 +00:00
Tobias Hunger
336f54def4 CMake: Fix progress calculation in server-mode
Add unit test to make sure this stays fixed.

Task-number: QTCREATORBUG-18624
Change-Id: Ieeb41982418481223d9ebf8f5c6ec4b3b78bfe00
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-25 09:35:24 +00:00
Kai Koehne
7d8847101d Add name, version as metadata to Windows executable
The description and version is seen e.g. in the file dialogs, but
also in the task manager and crash dialogs.

Change-Id: I65f7076a55ecbdcaa6b7c9ab57fecaab59bcaa08
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-07-25 09:06:01 +00:00
Kai Koehne
68fe72e99a Define COPYRIGHT_YEAR in build files
This allows us to use the copyright year also in the following
patch that adds it as metadata to the windows executable.

Ideally we'd unify IDE_YEAR and IDE_AUTHOR (because they're
only used together anyway) but that would break translations.

Change-Id: If0f84eaeb22e9ba71b2b29798324b76a91eda78f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-25 09:05:43 +00:00
David Schulz
3ed88cda2f GenericHighlighter: Update supported kate styles
Change-Id: I016b25c56b31c615e208e86e690fc7408c9e5384
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-25 06:24:54 +00:00
Eike Ziller
e8e46ab553 Plugins: Fix that mimetype definition was not valid JSON
JSON officially does not support multiline strings, so we should use
the same mechanism that we already use for the plugin description
(i.e. additionally support arrays of strings which are interpreted
as lines).
This just happens to work because Qt's JSON parser eats it without
choking.

Change-Id: I25ef04600b209775c5a7af916c687fda4a8b1a4d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-25 06:00:49 +00:00
Jochen Becher
2da3a4ab43 ModelEditor: Fix crash pressing shift on a size-locked object
Change-Id: Ifcdd5010369a71649a5f34c72c81ec9a30556bc7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 04:05:35 +00:00
Jochen Becher
ffb5dc756a ModelEditor: Introduce custom relation type "Connection"
Change-Id: Iddd45508dcb2de1fa2b6d9b2b881b54a73172caf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 04:04:53 +00:00
Jochen Becher
82cb2b248e ModelEditor: Show relation templates in object toolbars
Change-Id: I06de22538e500c133693ff0c791ac8a2d3be3402
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 04:04:36 +00:00
Jochen Becher
6ea47c98fb ModelEditor: Refactor relationables into common parent class
Change-Id: Id863a5004cb903cbc2929745e818e5810ff70dd2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 04:04:21 +00:00
Jochen Becher
8100812531 ModelEditor: Support custom relations in configuration files
Change-Id: I87338f290bd1ea729682236df8b017516a18e7bb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-25 04:04:05 +00:00
Alessandro Portale
5df0f97d2f Core: Tweak the wizard icon text overlay
Increasing the text size a bit, making the text darker and making the
margin proportional to the image size (resolution independent).

Change-Id: I029b57e2bf1c355f35161e5f8810dddea4114047
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-24 18:03:34 +00:00
Alessandro Portale
8997386675 QmlDesigner: Polish the formeditor split toolbuttons a bit
This gives them a similar look of other toolbuttons
in Qt Creator.

Change-Id: Ib3163ff6c1eab2bd26e46d1136de5fa474dea66d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-24 17:48:34 +00:00
Nikolai Kosjar
c3ce2dc063 Clang: Sort files in *.pri/*.qbs
Change-Id: I284298c926f3d445272987ee622e6fc4aba4697a
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-07-24 15:58:59 +00:00
Alessandro Portale
9113125a5e Wizards: Add file extension as text overlay to some wizards
Change-Id: Ibfd1144271c4381c7125db80713cbde431a54cf7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-24 15:32:24 +00:00