Commit Graph

63610 Commits

Author SHA1 Message Date
hjk
b6cd57b4f9 Android: De-Q_OBJECT-ify AndroidPackageInstallationStep
Change-Id: I49a839405c8b3b61a29c79bf13620a2e98cdca2e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-21 13:14:19 +00:00
hjk
f0fcc4e5c5 Android: Use timer for delayed execution
Reduce need for moc.

Change-Id: Ibbd85de60e891ca57738e44ad25e05e86ccb0c24
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-21 13:14:05 +00:00
hjk
16e87971cd iOS: De-Q_OBJECT-ify IosBuildStep
Change-Id: If6b32de1f359e6f18d86caa77dcd6ed311f3adbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-21 11:49:04 +00:00
hjk
b2a31f5be8 Modeling: Fix deprecation warning
In file included from /data/dev/qt-5/qtbase/include/QtCore/qlist.h:1,
                 from /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qobject.h:49,
                 from /data/dev/qt-5/qtbase/include/QtCore/qobject.h:1,
                 from /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/io/qiodevice.h:45,
                 from /data/dev/qt-5/qtbase/include/QtCore/qiodevice.h:1,
                 from /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/serialization/qdatastream.h:44,
                 from /data/dev/qt-5/qtbase/include/QtCore/qdatastream.h:1,
                 from /data/dev/qt-5/qtbase/include/QtCore/QDataStream:1,
                 from ./qmt/infrastructure/uid.h:30,
                 from qmt/model/melement.h:28,
                 from qmt/model/mobject.h:28,
                 from qmt/model/mobject.cpp:26:
/data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qlist.h: In instantiation of ‘void QList<T>::node_construct(QList<T>::Node*, const T&) [with T = qmt::Handle<qmt::MObject>]’:
/data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qlist.h:622:13:   required from ‘void QList<T>::append(const T&) [with T = qmt::Handle<qmt::MObject>]’
./qmt/infrastructure/handles.h:162:9:   required from ‘void qmt::Handles<T>::add(const qmt::Uid&) [with T = qmt::MObject]’
qmt/model/mobject.cpp:80:23:   required from here
/data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qlist.h:471:35: warning: implicitly-declared ‘constexpr qmt::Handle<qmt::MObject>& qmt::Handle<qmt::MObject>::operator=(const qmt::Handle<qmt::MObject>&)’ is deprecated [-Wdeprecated-copy]
  471 |     else *reinterpret_cast<T*>(n) = t;
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from ./qmt/infrastructure/handles.h:28,
                 from qmt/model/mobject.h:29,
                 from qmt/model/mobject.cpp:26:
./qmt/infrastructure/handle.h:40:5: note: because ‘qmt::Handle<qmt::MObject>’ has user-provided ‘qmt::Handle<T>::Handle(const qmt::Handle<T>&) [with T = qmt::MObject]’
   40 |     Handle(const Handle &rhs) : m_uid(rhs.m_uid), m_target(rhs.m_target) { }
      |     ^~~~~~

Change-Id: I9fe85f5b46912a52d1722da0f048d4eee6171ade
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-21 11:48:49 +00:00
hjk
1627850e81 ProjectExplorer: Un-export ProcessStep
Not used outside.

Change-Id: Ibab561d2f49ffce5b2e1d2505ef0634c802221b0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-21 11:48:08 +00:00
Leena Miettinen
45a575c218 Doc: Fix QDoc warnings in Core plugin Wizard classes
Task-number: QTCREATORBUG-23620
Change-Id: Ia8d27be35911378703126c1e2d06a157ce6185f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-21 11:37:36 +00:00
hjk
1714ecf809 ProjectExplorer: Remove Task::buildConfigurationMissingTask()
It should not be possible to trigger the condition. Except for MakeStep
the function is only called from real BuildSteps, that always live in
a BuildConfiguration.

A MakeStep could live in a DeployConfiguration, but that belongs to
a Target. That target always has a BuildConfiguration in case the
project type requires one. So not having a BuildConfiguration can only
happen when the project type doesn't require one, but then the
situation is not an error that should be notified as a Task.

Change-Id: I2a5d90fdadd3916d3dae6a0fdc6e6ab2010a8111
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-21 11:11:18 +00:00
Cristian Adam
ea7d59e58a GitHub Actions: Display tests pass rate as warning annotation
Change-Id: I7d9970067b786f34fc29c82f85c5fc31f6d02704
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-21 10:42:46 +00:00
hjk
8b563a63d4 Nim: De-Q_OBJECT-ify NimCompilerCleanStep
Change-Id: I3fce6484b90ac540009d0e5501a4435d15f241b6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-21 09:56:03 +00:00
Leena Miettinen
5835e22793 Doc: Fix Progress Manager docs
- Fix issues that cause QDoc warnings in documented classes
- Mark undocumented classes \internal

Fixes: QTCREATORBUG-23619
Change-Id: Id1fb3ff55b89a21a65f687beccb5b4ff36747ae7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-21 09:16:19 +00:00
Christian Stenger
bd428b2f13 ADS: Do not enable debug log by default
Change-Id: I9e3f9608b5710b03c3e6089b5bfa40b651a865dc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-21 09:07:52 +00:00
Eike Ziller
62aed34077 CMake: Fix build with older GCC
Change-Id: Ib606c91039a4389e7f3fbb3d9c733240106da441
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-21 08:58:59 +00:00
Orgad Shaneh
a83f0c5d74 VCS: Replace QRegExp with QRegularExpression in VcsBaseEditor
Change-Id: I8e8a6649e441597e29e88506d494ec69260bebd1
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-21 08:28:34 +00:00
Christian Stenger
16211cb589 TextEditor: Fix compile with Qt5.11
Change-Id: Ic704c428c0574789d6c67f9a0ddff511a4ee8b26
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-02-21 07:00:29 +00:00
Christian Stenger
e445f7aac3 ADS: Fix compile for Qt < 5.12.2 and namespaced Qt
Change-Id: I552d19b1659598d98d0ef1900c79e3c93747ffb2
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-02-21 06:59:17 +00:00
Andre Hartmann
32935591dd ExecuteFilter: Add timestamps to command outputs
By adding a new function to MessageManager.

Change-Id: Ia70d781c0398e8ce0a055ae8fc4718a9081e688f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-20 19:39:29 +00:00
Orgad Shaneh
b14351dab8 Git: Support case-insensitive grep/pickaxe
Change-Id: Ie3da0f5cca2bd3ffa658e3adbba0b1b86a2911d9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-20 19:05:36 +00:00
Orgad Shaneh
6d8efefbe5 Git: Add a toggle button for filter widget
Change-Id: If9680d1fc8a06f57f995a63095ad201fc1f3156b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-20 19:05:25 +00:00
Orgad Shaneh
2110be00ab Git: Move filter widget to GitEditor
and make it a QToolBar.

Change-Id: I6a16b1a828bfabaace8e14ef39344f7f2bac7e8a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-20 19:05:16 +00:00
Andre Hartmann
d21f72d0dd Git: Simplify action in branch view
Change-Id: Ic1a604baa7b83b7244febde776c95896b56a1467
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-20 18:46:13 +00:00
Assam Boudjelthia
37ff19c002 Android: update UI after downloadSdk() is done
Make sure the UI ticks are updated directly after SDK Tools package
is downloaded.

Change-Id: If1d94c624dcbc5be14246f61b197d849438d19e5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 17:55:53 +00:00
Assam Boudjelthia
2191bcea36 Android: avoid calling m_sdkManager->reloadPackages() twice
AndroidSettingsWidget::onSdkPathChanged() is being called then
m_sdkManager->reloadPackages(true) after it at start, that's not
necessary.

Change-Id: I6171e8a5fb765fa26aecb505ca50231c3e609b74
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 17:55:32 +00:00
Assam Boudjelthia
ad927dac85 Android: call cancel() instead of hide() in sdk download progressdialog
The proper use is to call cancel(), the dialog will be hiden after that.
Otherwise, it will not be cancel  and can get visible again.

Change-Id: Ifb2a00721571ce2bc8ded7c96e6b69e587020b34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 17:55:05 +00:00
Orgad Shaneh
44023c8f43 Clang: Fix build with Clang/LLVM 10
Change-Id: I740286c9dcfd325b1c31ab863fb5c91bf9c6ec70
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 17:30:27 +00:00
hjk
5a47cd0d50 GenericProjectManager: De-O_OBJECT-ify GenericMakeStep
Change-Id: I8f65d9461a48d27e6cf21b32f7b364127a7036b5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-20 16:36:30 +00:00
Henning Gruendl
79612417e3 Integrate ADS in QtCreator
- Integrate DockManager in DesignModeWidget (create factory default
   workspace, create menu items, add qds constants, remove unused
   shortcuts)
 - Remove unused functions and variables due to new docking system usage
 - Add DockWidget style sheet to resources
 - Fix scrollbar style by merging base and scrollbar style sheets
 - Fix update of StatesEditorWidget when switching tabs
 - Add missing unique ids in widget info
 - Set minimum size on ItemLibraryWidget

Change-Id: I08be6d753233fc767037a33b41af335cec6d43b1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 16:15:03 +00:00
Henning Gruendl
8f686e985c Add Advanced Docking System library
This library is a fork of the following repository
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System
Development started from the following commit
1de42a9766134eecd2611c2b4e209d3e0ede74d2
Incorporate all commits until
3ffbbfb6d01ff211d8349027221a19b1419296b5

 - Rename variables and files to follow the Qt style guide
 - General code cleanup (remove goto, fix typos, add overrides, remove
   explicit slots specifier, replace string-based with functor-based
   connections, replace dynamic_cast with qobject_cast)
 - Replace most preprocessor instructions Q_OS_LINUX/Q_OS_MACOS with
   Utils::HostOsInfo
 - Remove all QT_VERSION preprocessor instructions below 5.11
 - Change loading and storage of workspaces. Store workspaces in
   separate file instead of a list in the Settings.ini
 - Add workspace dialog, model and view for managing workspaces
 - Rename XML tags and use enum/bool instead of ascii art/numbers as
   attribute values. Use base64 instead of hex for storing geometry info
 - Remove internal style sheets
 - Add more build systems (qmake, qbs)
 - Adapt copyright header
 - Remove unix specific build rules
 - Replace ADS_PRINT with QLoggingCategory
 - Replace Java-style with STL-style iterators

Change-Id: Icf8c2fbaccec9680df83c6e2100e3446a090a437
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 16:14:52 +00:00
Christian Kandeler
61932b5d4b QbsProjectManager: Use the same build key as in previous versions
We changed the build key derivation method in commit 6913947986 under
the assumption that it doesn't really matter as long as it's unique.
However, this value gets serialized, so the change broke restoring
existing qbs run configurations.
As we don't want users to lose all their run configs when upgrading to
4.12, we switch back to the old pattern.

Change-Id: Ia4a353af08cca33dbc3c60bd9fc0e28f42dcfe20
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:49:12 +00:00
Cristian Adam
f65f260c91 CMakeBuildSystem: Don't re-update code model on CMakeLists.txt saves
Currently if you edit a CMakeLists.txt and then press save, the code
model will be reindexed.

On projects like Qt Creator this operation is quite significant.

Note that the code model is updated after CMake has run on the project,
which is what I would expect.

Saving the CMakeLists.txt and not running CMake has no effect on the
project, and the code model shoudn't be reindexed.

Change-Id: I61289fda60752ef002cf3625d339d4fcaf144d1b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-02-20 15:41:28 +00:00
Christian Kandeler
65e244b238 Qbs: Use more sensible build step summaries
It makes no sense to use the "equivalent command line" value as the step
summary. It's much too long and will never fit into that label.

Change-Id: I55f291c370c97481d37e9f9ba9baec48d7215774
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:35:22 +00:00
Christian Kandeler
344a8f5622 Qmake: Do not list all the command-line arguments in the step summary
They will often not fit.

Change-Id: I749242a576e57dd1ffc721ca14b85d1e0fa1ac98
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:12:48 +00:00
Christian Kandeler
74a38b9716 Qmake: Do not repeat build directory in warning message
The build directory line edit is right above the label containing the
message, so repeating the build dir value just widens the label
unnesessarily.

Change-Id: I650a4ce76a82582b2710a4673c134dbb4faf306e
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 15:11:52 +00:00
Assam Boudjelthia
b9b2145396 Android: parse Android 11 (R) packages
Allow parsing packages of the latest Android 11 (R) with API level 30.

Change-Id: Ia50d2ff23395b79828d47a8f9aeb3880aa131d83
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 15:00:13 +00:00
Assam Boudjelthia
267cb34542 Androdi: set m_isDeploying to false if deployment is cancelled
If Android deploy dialog is cancelled, then "Run" is clicked again,
the deploy dialog will not show again. Instead, a build is started then
fail in deploying because no device was actually selected. This makes
sure d->m_isDeploying = false in BuildManager.

Change-Id: I8cb899fa57df30b3669e42d30d0f280f8f73fb38
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 15:00:09 +00:00
Alessandro Portale
bad2d31747 Python: Fix MSVCs struct vs. class (forward) declaration warning
src\plugins\python\pythonutils.cpp(67): warning C4099:
'Python::Internal::PythonLanguageServerState': type name first seen
using 'class' now seen using 'struct'
src\plugins\python\pythonutils.cpp(66): note: see declaration of
'Python::Internal::PythonLanguageServerState'

Change-Id: Ibec8b0b990ee88fcd274961db4c8d8d0ee29533a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 14:41:27 +00:00
hjk
3f178e4ee3 Qdb: De-Q_OBJECT-ify deploy steps
Also, use the usual file layout, and make one displayed step name
translatable.

Change-Id: I3c8a466227fcca906f431fc169bc90e73fe880fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 14:32:42 +00:00
hjk
af8120a05c iOS: De-Q_OBJECT-ify and hide IosDeployStep implementation
Change-Id: I8c0589e5c5c2ac69f3c48f299a97c0dbea9b5922
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 14:31:09 +00:00
Assam Boudjelthia
1f4028d834 Android: remove repeated call to AndroidConfig::connectedDevices()
This causes a delay when clicking the deploy button for an Android
project. Also, it is a repeated call as this will be called inside
AndroidDeviceDialog::device() then refreshDeviceList().

Change-Id: I9203e746e4e9b3e5bfa42133d9a5246863c87e5a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 14:22:59 +00:00
Cristian Adam
b7bfcc3786 CppTools: Do not reindex all sources on project update
When CMake was run it would cause an update, which would have a
cancelAndWaitForFinished on the future interface.

The CppTools would have the future interface added on all updates, and
even though an indexing job would be finished, it would be picked up as
active and cancelled, which would be interpreted as action from the user
to cancel the indexing and cause a full reindex.

This patch makes sure that if an indexing job has finished, it doesn't
register as active, and only the jobs that actually do some work, and
will be finished will wait for the cancel signal.

Change-Id: If8a4db2a4a7a5707a360db84affe794ab0678d38
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-02-20 13:53:36 +00:00
Christian Stenger
1d513ecd06 ProjectExplorer: Fix compile for gcc 5.3
Change-Id: I52d8b5d33d5d04e52749b755a61b36a9f4b573b9
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 13:01:54 +00:00
David Schulz
552ccd6a61 CodeAssistant: add cancel to asynchronous processors
Fixes crash when the processor reports a result after the code assistant
was destroyed.

Change-Id: I8588d3d6acad69f1ec6302e8ba09d642ebbb77f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 12:59:55 +00:00
Thiago Macieira
86fae567fa TerminalControllingProcess: don't use qWarning in the child process
qWarning() and all of QMessageLogger will get to qFormatLogMessage(),
which locks a mutex. Additionally, qWarning may call a number of
different backends that, in turn, may have mutexes of their own. Locking
mutexes in child processes between fork() and execve() is a big no-no:
it may have been locked by another thread before fork(), so it's still
locked in the child process and will never get unlocked. Result:
deadlock.

Plus, qWarning reacts to QT_FATAL_WARNINGS, which I guess was not
intended for this class.

So just use a plain perror(), which is guaranteed by POSIX to be
"MT-Safe race:stderr".

Change-Id: I4e559af2a9a1455ab770fffd15f4a37a3fd113ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-20 12:53:00 +00:00
David Schulz
aee78bd58d Editor: do not split on nbsp in rewrap paragraph
Change-Id: I443400056f647a58a98d9bb6a221b10852470ba2
Fixes: QTCREATORBUG-23643
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-20 12:45:28 +00:00
hjk
6033c31e23 ProjectExplorer: Un-export BuildEnvironmentWidget
Apparently not needed anymore outside.

Change-Id: I9f4f1a65f56a86ba75a37a9b96db71472b3e0af2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 12:10:22 +00:00
Eike Ziller
6f1ad0b0cb Fix extensionsystem API documentation for new qdoc
Change-Id: I2303e46a3e5840a3c23c84a9126237eeb2eb21d9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-02-20 12:01:54 +00:00
David Schulz
db7d12b78c LanguageClient: fix memory leak in client initialization
Change-Id: I30e4032cea5fff46ffd790336729cc6fbaf4b104
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-20 11:56:58 +00:00
hjk
7f1c8aea5d ProjectExplorer: Make communication between target and selector direct
Architecture-wise, this now means that Target knows about the
MiniProjectTargetSelector, otoh, Project does less, and quite
a bit of signal, slot and qobject_cast is gone.

Change-Id: I0feef9328144282c7c4ca710a12ac0e495810684
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-20 11:45:48 +00:00
Christian Stenger
94ee0a575d Debugger: Avoid crash when settings change after debugging
If the debugger engine is not running there is anyway no need
to update its data.

Change-Id: I8cda9218985db8b88d96046254847e8916ca37eb
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 11:15:19 +00:00
Orgad Shaneh
3c0b89f697 VCS: Refactor annotationChanges() in VcsBaseEditor
Devirtualize the function, and use QRegularExpression with globalMatch.

Change-Id: I18c92cb37b535c616f03f45dff8b18249c961d5d
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 10:42:31 +00:00
Orgad Shaneh
3cdbd8683d VCS: Fix connect failure
QObject::connect(Git::Internal::GitSubmitEditorWidget, Git::Internal::GitSubmitEditor): invalid null parameter

Change-Id: Iaf9a46d9922c7d4e124b94146d85bc5374a2195c
Reviewed-by: hjk <hjk@qt.io>
2020-02-20 10:11:52 +00:00