Commit Graph

108 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Fawzi Mohamed
fd89043de2 qmljs: (QString -> Utils::FilePath)++
convert more QString containing paths to Utils::FilePath

Change-Id: I1219d7d147993e48cfa641dc9bea72ab38c90f51
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-13 17:13:23 +00:00
Eike Ziller
f950a5d86c Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/libs/utils/terminalprocess.cpp
	tests/auto/qml/qmldesigner/coretests/CMakeLists.txt

Change-Id: Ifc5b37dadd46af752f0771a2685da1ac9a6260bd
2022-07-07 13:47:12 +02:00
Henning Gruendl
df47dad53c QmlDesigner: Avoid focus lose live preview
Change the behavior of the output pane when an error occurs in the
QML live preview to avoid focus lose.

Change-Id: I78326af5060c775837d7a2d930c1fdd73b500f16
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
2022-07-05 13:39:04 +00:00
hjk
9e363c6421 Add plugintr.h files to all plugins
Except FakeVim, which had it before.

for i in [a-eg-z]*/*.json ; do
    upper=${i##*/}
    upper=${upper/.json/}
    lower=${i%/*}
    trfile=$lower/${lower}tr.h

    cat << EOT > $lower/${lower}tr.h
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/

namespace $upper {

struct Tr
{
    Q_DECLARE_TR_FUNCTIONS($upper)
};

} // namespace $upper
EOT

    git add $trfile

    perl -pi -e "s/(${lower}_global.h)/\1\n    ${lower}tr.h/"  $lower/CMakeLists.txt

    perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/"  $lower/$lower.qbs

done

Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 13:34:57 +00:00
hjk
2496ffe3ce Code cosmetics
Mostly unused #include's, also sort them or reduce scope.

A few namespaces, ...

Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-06-24 14:44:13 +00:00
Christian Stenger
734035194b PE: Move ResourceFileNode to ProjectExplorer
Avoids additional dependencies later on. No functional change.

Change-Id: Idc21ed856f4f31d68d55742b5796243227b254dc
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 13:44:42 +00:00
hjk
f79a71df7b ProjectExplorer: Reduce use of Runnable in SimpleTargetRunner
Runnable functionality is nowadays mostly accessed more directly
in QtcProcess and its setup functions.

Change-Id: I2a2b5433aef1d464dc58d5a35069376dee051d57
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-25 10:32:23 +00:00
Alessandro Portale
db7ba4ad6f QmlProjectManager: Fix CMake build with absent Qt5::QuickWidgets
Change-Id: Ic6c211a629bc4e5f215abad0bd80c6edb64f5c5d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-18 12:33:29 +00:00
hjk
a579fa52ee ProjectExplorer: Rename some RunControl functions
Change-Id: Ia86a50100ddfd465d548863ae8d58033a5dbafc0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-02 08:10:28 +00:00
Cristian Adam
88781a003f CMake: Qt Creator Static build support
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.

Fixes some symbol clashes when all plugins are linked into the same
executable.

Support for actually loading static plugins will be added in a separate
commit.

The feature is controlled by QTC_STATIC_BUILD which by default is OFF.

Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-29 07:16:53 +00:00
hjk
a06721fe71 QmlPreview: Remove last use of RunControl::runConfiguration()
Change-Id: I7853b3bce952004abaac9145b28deb049b5d09cc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-28 13:54:50 +00:00
hjk
2ea397f11d QmlProjectManager: Avoid use of RunControl::runConfiguration()
The RunConfiguration might change and even die after the runcontrol
starts.

Change-Id: I628f3ae26c21fb41388b6104497ce5a6a6704c8a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-12 08:46:42 +00:00
hjk
530b9ae85a ProjectExplorer: Copy more RunConfiguration data to RunControl
The aspects are now responsible for defining what data needs
to be copied and also to provide a suitable interface (kind
of source-compatible to direct use) for access.

The important change here is that RunControl::aspect(...) doesn't
need to access RunControl::runConfiguration() in fully aspectified
RunConfigurations anymore. In not-fully aspectified the runConfig
access is moved to the user code to make the problem visible there.
Long term, aspectification should be finished.

As an additional benefit, the resolving of macros etc can
now be done at the correct time.

Change-Id: I690d9f8f696ce9b4efd42082ba3f81b514efcb77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-04-12 08:43:09 +00:00
Eike Ziller
3f0c8b2149 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I1ce9876150239751a1187bc0c4b8fc5fef1ab40d
2022-03-14 14:02:14 +01:00
Oswald Buddenhagen
413c73b781 fix build without QmlPrivate
Change-Id: Ibc333a07137b7afb39676d4d3bc89d0c4dadb11d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-11 09:15:10 +00:00
Jarek Kobus
f1e973de79 RunControl: Drop IDevice * from doStart()
Use device set inside passed runnable instead.

Grep for all usages of RunControl::start().
If passed device wasn't nullptr, set this device
inside passed runnable. Otherwise ensure that
passed runnable contains device set to nullptr.

Change-Id: I06fd42a16246fa9fedd81eeb47481a217f887cb0
Reviewed-by: hjk <hjk@qt.io>
2022-02-23 16:28:01 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Eike Ziller
9d8a419d10 Remove qmake build files
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.

Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 12:18:15 +00:00
Henning Gruendl
9116256a86 QmlDesigner: Add fake Android kit workaround
Add a workaround to make a fake Android kit work. Fake in this case
that it uses a default desktop Qt version which doesn't contain any
Android compilers. In order for that to work the deploy step needs to
be skipped.

Task-number: QDS-5385
Change-Id: I69a5c78ac810de916b3180736e61d6083d66d121
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-11-16 11:11:18 +00:00
Tim Jenssen
5377253612 qmlpreview: use empty messageReceived()
Default implementation already does not react on it.

Change-Id: Ieaca8ab0a700b9626a705567f228bdc05172c188
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-10-20 21:58:31 +00:00
Piotr Mikolajczyk
261a39cbbd Implements previewing qml preview for a qmlproject
To run it requires either designpreview.apk installed
on the device or apks placed in
<QTCREATATORDIR>/share/qtcreator/android/qtdesignviewer/
Apk filename should follow designpreview_$ARCH.apk

Task-number: QAA-512
Change-Id: Ida955b0fac519112d4623166677a7ba8e9afb1f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-21 17:38:54 +00:00
Eike Ziller
877bfa4056 Add FileSystemWatcher::clear()
Change-Id: I9f28e763c943a6d8c5cf3082755e64d7e4df7155
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-15 06:40:38 +00:00
hjk
52e5023bcc ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-13 15:04:30 +00:00
Eike Ziller
2e09518e9c Pass the new node in ProjectTree::currentNodeChanged
Avoids some roundtrips asking for ProjectTree::currentNode()
which traverses the project tree every time.

Change-Id: I650728eab5a47a7f4760cf88844a4b7106365255
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-28 06:55:51 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
Eike Ziller
bf5b1d714c Revert "Revert "Merge remote-tracking branch 'origin/4.15'""
This reverts commit f0a86d4510.

Reverting a merge doesn't "undo" it - the changes would be lost
forever even with subsequent merges.
So we need to revert the revert to get the changes.

Change-Id: I65928f876f4dc886561bed17c4b2aa42b388c1e3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-05-07 09:07:40 +00:00
Marco Bubke
f0a86d4510 Revert "Merge remote-tracking branch 'origin/4.15'"
This reverts commit 888ca0dd20.

Reason for revert: wrong patchset

Change-Id: I1291789938601aaf606c59917ff938e3c24c78dd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-06 15:30:02 +00:00
Thiago Macieira
f8d04c0732 Add missing #include
A local, unpushed change highlighted it.

qmldebugtranslationclient.cpp:47:42: error: use of deleted function ‘QYouForgotToDeclareStreamingOperators& operator<<(QDataStream&, T) [with T = QUrl]’

I really don't understand how this could compile even without my change.

Change-Id: I9f583ca106d24f048885fffd167c35c9e614c786
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-06 07:42:55 +00:00
Tim Jenssen
8eb5a08c1b qmlpreview: adapt to new location of debug translation protocol
Change-Id: I6bcb6e9f18724f22b10586a6550fada991ca8678
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-03 07:17:57 +00:00
Tim Jenssen
080d479101 qmlpreview: remove PUBLIC from DEPENDS
- it does not work as expected

Change-Id: I91530103b661e8dbed5d9391590995fb0401c826
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-20 05:47:01 +00:00
Tim Jenssen
1f2b0cbf39 qmlpreview: fix crash
Change-Id: Id1b9d8c070539e8935e2d7492f6a8c2567739e00
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-16 14:48:49 +00:00
Tim Jenssen
a8cf61b745 qmlpreview: fix PUBLIC_DEPENDS
Change-Id: Ifaf579c63eea8c41293cc6ddddd811b065376467
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-16 14:30:12 +00:00
Christian Kandeler
35f5cec986 QmlPreview: Fix qbs build
Amends 62a7601d50.

Change-Id: I531960e9ad3e183c993149d18855ffb03113d966
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-15 13:37:13 +00:00
Tim Jenssen
0108a85c82 qmlpreview: prepare plugin to have an external client
- export the plugin andd add client creator API to be able to implement
  external debugtranslationclients
- use the private/qqmldebugtranslationprotocol_p.h from Qt5::QmlDebugPrivate
- have a basic client implementation which cares about changing language
- remove out of date elide warning implementation
- remove old ui
- remove the menu entry

The old client implementation is incompatible with the will be introduced
service and there was never an officially released compatible service.
Therefore we can remove the old client implementation without causing
any harm.

Change-Id: I26b5e8a99ba30ae6377443b3fffb05901b1cac28
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-15 09:32:01 +00:00
Alessandro Portale
72d91dc94a Use qAsConst with non-const Qt containers in range-loops
... in various places

Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-17 14:43:29 +00:00
Miikka Heikkinen
b42fa1fb9b QmlPreview: Don't force explicit restart on shader change
Shader changes seem to be reflected to preview even without explicit
restart, and the explicit restart will cause preview to crash when
shader files are modified in QDS.

Fixes: QDS-3741
Change-Id: Iacba712bcfe38831d76febd8074c683e2124223a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-15 08:36:55 +00:00
Christian Stenger
f6d4170c05 OutputFormatter: Reduce usages of DebugFormat
This is usually used in a wrong or at least misleading way.
Replace most of the usages by newly introduced GeneralMessageFormat
as most of the replaced usages just print to General Messages and
using any of the existing formats would change the layout of the
text. Except for some special debug output inside the valgrind plugin
that can use one of the existing formats which also makes it easier
to spot them and the runners which print QC internal output.

Task-number: QTCREATORBUG-24560
Change-Id: I824dc4250b2f3e4656bab8676b45c98e3407d59c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-21 08:18:54 +00:00
Eike Ziller
37a0ef29c0 QML: Use new message manager API
That is more evocative. Also avoid some instances of popping up the
general messages pane, which should preferably only happen on direct
user interaction.

Task-number: QTCREATORBUG-24430
Change-Id: I69bb49f84c1486fd32b2a048ca4d76dceb6a0b2b
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-22 08:09:10 +00:00
Thomas Hartmann
7dd067979a QmlPreview: Add missing shader suffixes
Change-Id: I78f8ddea5de5fa01fb69de62d47587254b9daae8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-12-15 12:39:53 +00:00
Thomas Hartmann
663827478a QmlDesigner: Remove invisible char
Change-Id: I559076ccfdcb7fb3767f6767310a84cc113b6c46
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-12-15 12:25:32 +00:00
Thomas Hartmann
aa4b9b88da QmlPreview: Restart if a shader is modified
If a shader is modified we have to restart the preview.

Task-number: QDS-3179
Change-Id: I7d1fbde4a0db0ecd9ac1f2c7eb60d2e919935c73
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-12-14 18:39:42 +00:00
Jarek Kobus
6b588d7227 Remove unused variables
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.

Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 13:58:46 +00:00
Jarek Kobus
c9f5ce51e0 Don't use iterators to temporary containers
Fix a clazy warning, like:
Don't call QVector::begin() on temporary [clazy-temporary-iterator]

Indeed, we may pass begin and end iterators for 2 different
instances of temporary vector (shared though).

In addition: use const iterators.

Change-Id: Iac1055d9fc226f1b48ca72ee4f3aab433addfe7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-20 12:25:31 +00:00
Jarek Kobus
eaba657d90 Fix warnings about possible detach of temporary objects
Calling first() or last() on temporary container may
unnecessarily detach the container. Fix it by calling
constFirst() and constLast().

Change-Id: I2460efd5dbee1534eec8a514d9bff2a947bfddf9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:11:46 +00:00
Leena Miettinen
9688f33a5d QML Preview: Fix UI text
Fix capitalization and make some strings shorter.

Task-number: QTCREATORBUG-24873
Change-Id: I78d0d1507774ab732f633f8849a3f45f6835110f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-09 12:42:25 +00:00
Orgad Shaneh
f60302591b Merge remote-tracking branch 'origin/4.13' into 4.14
Change-Id: Ifa2e1ced939e1d049ba6de667b31ab9945094b87
2020-10-12 14:55:54 +03:00
Tim Jenssen
ddb078404a qmlpreview: add test translation color settings
Change-Id: I9b11fcf1fdae39b089887884a3d96cc8648a0c8a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-10-12 07:27:57 +00:00
Eike Ziller
5ab8cc61fc Merge remote-tracking branch 'origin/4.13' into 4.14
Change-Id: Ia20a937786be651a5fe9daefb856f7779905ef68
2020-10-08 09:46:09 +02:00
Tim Jenssen
bfc04ed53d qmlpreview: enable adding multiple testlanguages
Task-number: QDS-2531
Change-Id: I558f6d1040148ff4a392f5c5cfc6af4da54fef70
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-10-07 14:55:31 +00:00