Commit Graph

67787 Commits

Author SHA1 Message Date
hjk
a9347daf1b LSP: Make compile with Qt 6
DocumentSymbolsResult inherits from std::variant<...> which has an
unsuitable operator<() declared, making the metatype system believe
it can be used.

So hide it.

Change-Id: Iab757074814d58fe1542cc3ffbf28fcfbb1f023d
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-07-23 12:56:32 +00:00
Christian Stenger
86eadb4d1b CPaster: Inform about a permanent redirect
Helps to keep track of the current workaround and replace
it again with using the updated URL on a permanent move.

Change-Id: I913dbd7be18d77c9a8d52f1dd931cc5b30320fa2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-23 12:42:52 +00:00
Assam Boudjelthia
27514fa94d Android: Warn if the selected device main ABI is not selected
Task-number: QTCREATORBUG-23291
Change-Id: I2ae13edaee30c6548a37e077c18f508a42b42d25
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-23 11:48:51 +00:00
Tim Jenssen
955f124ffd fix build on older compilers
Change-Id: Id5ccad524c7609eb789d7fa805ace0719a807e65
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-07-23 11:43:43 +00:00
Alessandro Portale
e0915b7eff Android: Fix rendering of settings background in dark mode
This amends faad83d5a3 by undoing the
insertion of a QScrollArea + QWidget under the whole form. The reason
for adding this was to be able to scroll down to the license agreements.

Since Core::SettingsDialog already puts the settings widget into a
QScrollArea, we have two of those and one is superfluous. When using a
dark theme (e.g. flat-dark), this extra QScrollArea introduces wrong
background color. Also, it complicates the already quite blown
androidsettingswidget.ui

This change removes the QSrollArea + QWidget while keeping the feature
of scrolling to the license text. This is achieved by searching through
the parent chain for a QScrollArea and using the first found one for
scrolling.

Task-number: QTCREATORBUG-24379
Change-Id: I2bdae9367eb06b68fa47badf2556eb1ec7ebcafb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-23 10:28:48 +00:00
Tim Jenssen
1f702edfd3 qmlpreview: add debugtranslation ui
action in the menu will only be shown if a QtStudio Qt is found
qtversion.xml
   <value type="QString" key="overrideFeatures">QtStudio</value>

 - still have some issues with multiple file test runs
   so disable it for now
 - elideWarning is not tested

Change-Id: I68c9f774a980b84cd4eea1595775fd01afa6f3cf
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-23 09:42:46 +00:00
Tim Jenssen
bde420f7b7 qmlproject: rename lastUsedLanguage -> currentLocale
removed the connection from plugin to
QmlMultiLanguageAspect::setCurrentLocale
but calling it directly in QmlPreviewPlugin::setLocale

Does not matter which method is called it will change the right
thing only once because it is checking if it already have the
set locale.

Change-Id: I6cb4b115788adc103481dcda45e3214a0cd73401
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-23 09:14:31 +00:00
Alessandro Portale
8a8453e55d Android: Set more columns in AVD table to ResizeToContents
Give the columns with potentailly more content some space.

Change-Id: I4c213f97df077801e3b11ef09519973a61c58c4f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-23 09:04:27 +00:00
Assam Boudjelthia
ee1b8c2f16 Android: move tooltip from ui to widget class and shorten long phrases
Change-Id: I15bd9f54e7d4dbc3fae62b331172d6bc8e74e7ad
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-23 09:00:54 +00:00
Christian Kandeler
e4100c31fc CppEditor: Fix trailing whitespace after extracting a function
... from a block of code.
We must not insert an empty line into the newly created function,
because it gets indented in the first indent operation, resulting in
trailing characters after the actual code has been inserted later.

Fixes: QTCREATORBUG-12118
Change-Id: If438d4de379cae90baa846c112866f2777b44fce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-23 09:00:44 +00:00
Christian Stenger
f1c0393d52 CPaster: Fix fetching from DPaste
Currently the fetch location has moved.

Change-Id: Ie4cd3bf4b1050ca2c0cc17bde553f546232882e7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-23 08:40:05 +00:00
hjk
086a4be734 More Qt6 porting
Change-Id: I96bef1772149eb718e250563c65bf5da7259d9d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-22 15:06:54 +00:00
Tim Jenssen
03307d8cb4 qmldesigner: fix none pre compiled header builds
Change-Id: Ic8c588596292a466368aad2f8a00a0c02049e1af
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Łukasz Ornatek <lukasz.ornatek@qt.io>
2020-07-22 14:47:10 +00:00
Assam Boudjelthia
def7615c81 Android: fix a title capitalization
Change-Id: I5b22d95b85543f110f7c292d06112c1b72c337bf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 14:35:11 +00:00
Lukasz Ornatek
f074e205a0 Support multiline text, fix text format
Explicitly set TextFormat to "RichText" when using rich text editor

Task-number: QDS-2229
Change-Id: I8f0110415b8125465779231426e66ecc53eae5fe
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-22 14:27:46 +00:00
Assam Boudjelthia
35ead659c7 Android: fix settings widget palelette in dark mode
Change-Id: I2ef4f0d510bbbe732c790134b39a9ea5cb0af2fc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 11:18:19 +00:00
Assam Boudjelthia
ed23aa779b Android: reset margins in settings widget page
Change-Id: Ib295c25867242f729d6cd2e1516411f6f7df83d7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 11:17:51 +00:00
Christian Stenger
e17ebc7a6e Squish: Stabilize menuVisibleAtEditor() even more
If the machine fails to correctly initialize the desktop
environment we end up with a rather small resolution which
in turn makes the condition useless.

Change-Id: Idcea7f4e2a5dd265442b5c9d98bf42ed7f01c8af
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-07-22 10:24:11 +00:00
hjk
2d78bd4b19 Some Qt6 porting
- new ambiguous overloads for mapToGlobal
- some functions now return qsizetype instead of int

Task-number: QTCREATORBUG-24098
Change-Id: I0020e5689e093653e9e0e6f0d6263720bc2e003b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-22 10:22:56 +00:00
Assam Boudjelthia
aee2094c33 Android: fix jdk path retreival on linux
Change-Id: I4303b5f5636dce0096ae73ef6229a579b7fee202
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 08:35:47 +00:00
Alessandro Portale
4d94f959f8 Android: Fix initial validating with clean settings and default paths
Relying on the PathChooser::rawPathChanged handlers to initially
validate default paths with clean settings does not work (I think)
because of a mix of interdependent (via m_androidConfig) synchronous
and asynchronous validations.

Let's assign the initial values for jdk, sdk and openssl also to
m_androidConfig, so that everything works on the first run.

Task-number: QTCREATORBUG-24372
Change-Id: Id6945d7bf81949a1f90cd20f9b3bd4e14a5bbe07
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-22 08:29:11 +00:00
Christian Kandeler
affd4ee658 CppEditor: Extend Q_PROPERTY quickfix
... to also generate the RESET function.

Fixes: QTCREATORBUG-11809
Change-Id: I94789227230a67f074ff5fdc76ad8113d2870dd6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-22 07:46:11 +00:00
Tobias Hunger
1183810506 SDKtool: Do not add empty CMake configuration values
Do not add the empty string as CMake configuration. People are
apparently trying to use the empty string to make sure nothing
is set up.

Task-number: QTCREATORBUG-21696
Change-Id: I702e26bc135e30c36f770210f885a4680d4b0359
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-07-22 07:44:19 +00:00
Assam Boudjelthia
168adf6cc6 Android: set copy gradle templates checkbox to false by default
The Gradle files are usually not modified by the user, so it makes
sense to make the default behavior not to copy them, unless explicitly
set by the user.

Change-Id: I67a5a8ea402def55a65a4e98588c57a598c5f7d0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 07:37:50 +00:00
Assam Boudjelthia
aa9367f5d4 Android: re-organize manifest editor widget
The current manifest editor has too many things at once with
a long scroll bar, that can be overwhelming, this changes that
by re-organizing elements and grouping others.

Change-Id: Ie997af475939effbc575fa9e2a1d20184e943ff1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-22 07:37:39 +00:00
Christian Stenger
b702d97872 ProParser: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I8613286f27987034d6c8924fd7103e3c3ddd4e85
Reviewed-by: hjk <hjk@qt.io>
2020-07-22 05:17:10 +00:00
Christian Stenger
f154b23c78 Utils: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I0e29d2a43de6ff29dfeb5c9c70ac18ed95ba2657
Reviewed-by: hjk <hjk@qt.io>
2020-07-22 05:16:26 +00:00
Lukasz Ornatek
a7c14b5493 Support multiline text
Use rich text editor widget as dialog for multiline text input

Change-Id: I13147e776867032fe1145d6a8a37fcd6976399e4
Task-number: QDS-2229
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-21 16:23:09 +00:00
Tim Jenssen
ce926844d0 qmlpreview: fix init locale issue
The init language was never found, because the
findValidI18nDirectoryAsUrl() uses the m_lastLoadedUrl
to find the translation file path.

Change-Id: I6e9b62f3d846795d68ddef5e3a4caf3e3d953c7c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-21 15:38:04 +00:00
Tim Jenssen
b1fc2cdbb4 qmlpreview: fix translation for qml files in subdirectories
Found path was ignored - so the location was wrong
Keeping the kind of ugly in findValidI18nDirectoryAsUrl(const QString &locale)
for now - to not change too much in that area.

Change-Id: I491df1f928868a8d9afbbb7d25c8102bbe9b51a7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-21 15:37:52 +00:00
Tim Jenssen
b45b771581 qmlproject: add convenience method to QmlMultiLanguageAspect
Change-Id: I88799aa1c5caa5c967b7c680ef9ddcbdd4b01bf5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-21 15:37:41 +00:00
Tim Jenssen
3659f5b41d qmlpreview: stop previews if the language backend is changed
Change-Id: Iadf0712ea429f3bdb8c4109dfb558466fa2743f2
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-21 15:37:31 +00:00
Tim Jenssen
6e6b2aa855 Revert "qmlpuppet: do not set an empty QT_MULTILANGUAGE_DATABASE"
This reverts commit 00b54f7faf.

Not sure why this was necessary - but it introduced a problem
which needs a restart of the puppet - so it is easier to revert it.

Change-Id: I4664b57eefc961ac814e4594b28bbd155be21042
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-21 15:37:21 +00:00
Alessandro Portale
26f3157262 Android: Fix that Android Studio's jdk does not get detected (Windows)
If all jdk detection methods on Windows remain unsuccessful, let's try
to find an installation of Android Studio via the registry and use the
"jre" folder (which is actually a jdk) from there.

Change-Id: Ie4d7a4c5cc56f0b4675c86e436c3f1007994633c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-21 13:51:26 +00:00
hjk
42ab5c84b9 ProjectExplorer: Aspectify most parts of MakeStep
Change-Id: I24419185f1af937845ffbd0dac6d333894c95e67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-21 13:33:23 +00:00
hjk
6775eeefc5 ProjectExplorer: Add some BaseStringListAspect
Only for storage now, sufficient for the upcoming use in MakeStep.

Change-Id: Ia84595c6cd50f75c70ccef2afb366db3da0e51ff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-21 13:33:11 +00:00
Asit Dhal
faa707e932 CMakePlugin: Make cmake build settings widget multi selectable
Fixes: QTCREATORBUG-22659
Change-Id: I5c2b88a30f35baa3a3f2b33e2722c4523a8abe44
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-07-21 13:28:09 +00:00
hjk
1060bb7605 ProjectExplorer: Add a BaseIntegerAspect::defaultValue
If the actual value equals that, the value key will be removed from
the settings.

This is useful for the job count in the MakeStep.

This might be usable in this or similar form also for the other types,
but I'd rather wait for more use cases.

Change-Id: Ic4865ca2d4dc61c778f6b8c4c307f7fcf4243e43
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-21 12:52:07 +00:00
hjk
de7c57b051 ProjectExplorer: Add ability to disable Base{Bool,Integer}Aspect
Can be used in MakeStep.

Change-Id: I2a49b3071e610be5e29dbcb40f6ab7f283ad5a0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-21 12:51:15 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
Christian Kandeler
c41847ce5d CppEditor: Find implementations for pure virtual declaration
Clearly, if a user presses F2 on the declaration of an (unimplemented)
pure virtual function, they want to go to an implementation in a derived
class.

Fixes: QTCREATORBUG-10160
Change-Id: Ie8c4ff0001ab2c98a2d0e2ebc8d954cc928578c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 10:13:43 +00:00
Christian Kandeler
45dd017853 Wizards: Offer auto-completion in "New C++ Class" wizard
That is, offer existing namespaces for the class name line edit and
existing classes for the base class line edit.

Fixes: QTCREATORBUG-10066
Change-Id: I276036864626eff92997e40e4e22ab16c4f4d617
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 10:11:37 +00:00
Robert Loehning
05cdce2fc9 Squish: Update expected completion proposal
Change-Id: I89f44690bdda5a12776f39efb7b1872ff5e9cc93
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 10:03:23 +00:00
Assam Boudjelthia
1baa81dc48 Android: re-organize "create templates" button
Change-Id: Ibad5498f9a50d7c8adbc81cd5be435e02cca668d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-21 09:55:58 +00:00
Christian Stenger
65b3d9028f Minor preparation for Qt6
Change-Id: Id47e7a7ed28dffd12403f2fec72370a8068ad0c0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-07-21 09:07:26 +00:00
Tim Jenssen
69b0a42ac1 qmlpreview: remove unnecessary include
Change-Id: Ia2ffd868bcb1cb1b09aafa1f63132308bf829062
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-20 16:58:20 +00:00
Tim Jenssen
00b54f7faf qmlpuppet: do not set an empty QT_MULTILANGUAGE_DATABASE
Change-Id: Ib64a2192692a2675852fd3071295c0ed8dc29d4d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-20 16:56:54 +00:00
Tim Jenssen
7144312358 qmlpreview: fix crash while closing
Change-Id: Iee1083ff7c3e2e6dd511f1d54d72681e402d6c24
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-20 16:56:45 +00:00
Tim Jenssen
cb13e84656 qmlpreview: remove redundant set QT_MULTILANGUAGE_DATABASE
already done in the environment modifier method at
qmlprojectrunconfiguration.cpp

Change-Id: Ibd1e2ffb94bec23e709d9155b032bb358b7f4a0c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-20 16:56:31 +00:00
Tim Jenssen
d628a7c6cd qmlproject: remove unnecessary separator
results in two separators which looks wrong

Change-Id: Ie715e1b504303a9ab819ede08b1e69095c5d870d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-20 16:56:21 +00:00