Commit Graph

533 Commits

Author SHA1 Message Date
hjk
d0cf49db47 Debugger: Handle some Qt deprecation warnings
Change-Id: I93c9f91642bc5f5bd43ebb80cb489782978db327
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-12 13:16:07 +00:00
hjk
0d4a546397 Debugger: Use Utils::Text::Position instead of int line number
The column is currently unused.

Change-Id: Iabc57c8d21e807187783071efe9a82e9c1877181
Reviewed-by: hjk <hjk@qt.io>
2023-06-07 07:36:29 +00:00
hjk
6d5b725d45 Debugger: Replace some uses of deprecated QVariant::type
Change-Id: I2225668b51d82e017cda305737f8c93fdaf97bd7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-07 07:16:02 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
hjk
0dc61f55c3 Debugger: Use more FilePath in source file handling
Needed for the double-remote case.

With this we have proper breakpoint markers in the text editor for a remotely
running gdb on a remotely loaded project.

Change-Id: If80e4a4108a4a0bcdd7612a59e2bd695213f5ea5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-03-15 12:34:58 +00:00
hjk
c08322900f Debugger: Use more FilePaths in module handling interface
Change-Id: Ie058b928900015d0f71776151547bf7ba32a62bf
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-14 14:03:39 +00:00
David Schulz
5169469911 Debugger: add <load more> functionality to array dumper
Change-Id: Ib44748fa3218788ca20a99b0a0f4cd85716dde06
Reviewed-by: hjk <hjk@qt.io>
2023-02-27 08:35:32 +00:00
Alessandro Portale
9db70d8810 Translations: Fix stray QApplication::translate() calls
For references to the module-own context, use Tr::tr().
For references to other modules, use the right context name (with "::"
prefix).

Change-Id: I6dce8f1ceccb23c44d93f1826402cd3be8e98e5a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-08 08:32:42 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.

For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.

Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-10 12:08:53 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Eike Ziller
ea79027e20 Merge remote-tracking branch 'origin/9.0'
Change-Id: Idd9c2b1bf787040b7b415b7cda29035227ca1011
2022-11-21 08:57:14 +01:00
Christian Stenger
c18d8773db Debugger: Fix interrupting Qml
Fixes: QTCREATORBUG-28469
Change-Id: I421dd18e0aedbe6628d4817fddf271c1a2bfbeb0
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:01:04 +00:00
Tim Jenssen
aa33927651 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.h

Change-Id: Ib029a830ee99190bc4ea2ad75d9300bfa86b42d9
2022-10-25 19:02:15 +02:00
Jarek Kobus
866a658b42 Get rid of unneeded includes of RunControl
Removed also some other includes that were marked
with yellow triangles. In some cases includes of
runcontrol.h were substituted with other includes,
like qtcassert.h.

Change-Id: Ica40f68198c7f8f70e6047acb2eddc8ef017e43d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-25 09:49:13 +00:00
Jarek Kobus
e03e34c19c QmlEngine: Fix typo (hander -> handler)
Amends 126030d079

Change-Id: I3cec0e2984af311070ebb258b454d4e3fcec626f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-20 20:55:26 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
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
Jarek Kobus
1b070bcb11 Drop Qt5: Debugger: Get rid of QOverload
Change-Id: Ic62a3173adeffdfa78a47849cf1ceaa4f59b8091
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-20 13:13:21 +00:00
hjk
9894c6eaf0 Debugger: Convert to Tr::tr
Change-Id: I5d2475c790851c68f9997ac6af72b5eaca58482d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-08 12:32:38 +00:00
Christian Stenger
c1c255059e Debugger: Fix handling of stepping while debugging QML/JS
Amends 3341fa827f.

Fixes: QTCREATORBUG-27728
Change-Id: I96398d3ebaa33b10ec90cce4df9e9af809cd29a9
Reviewed-by: hjk <hjk@qt.io>
2022-06-28 10:10:11 +00:00
Jarek Kobus
fdf81b8768 QmlEngine: Connect to done() signal instead of finished()
Change-Id: Iffccd6425ff5bf3b47064b6883ecab7474a987f7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-22 10:42:29 +00:00
Christian Stenger
3341fa827f Debugger: Fix handling breakpoints of same file names
...while qml debugging.

Fixes: QTCREATORBUG-24803
Change-Id: Ieedeb13236f8129a1f6d445de5218462c8d0676a
Reviewed-by: hjk <hjk@qt.io>
2022-06-15 05:27:51 +00:00
hjk
adeaa01d85 Debugger: Use QtcProcess instead of ApplicationLauncher
... to start the QmlEngine

Change-Id: Id283a1f5d100cd65fe1f3b900114b86aca288e91
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 15:39:36 +00:00
Artem Sokolovskii
27fddc8dc7 Debugger: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ib49afb4d0283aeeffead6b31e1a3d0bcb9a7ae14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-03 09:32:04 +00:00
Jarek Kobus
ff0ce27c1f ApplicationLauncher: Unify API
Make the API more similar to QtcProcess API.
Rename:
  processStarted() -> started()
  error() -> errorOccurred()
  processError() -> error()

Change-Id: I86d650d55a643f5999fc91e56b985f699e2d7245
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-02 12:34:06 +00:00
Jarek Kobus
10abf43afa ApplicationLauncher: Remove start(IDevice *) overload
Take the device from runnable passed in setRunnable().
If the intention is to run locally, set the device
to nullptr inside runnable. Otherwise we don't run locally.

Follows 47957de2dc

Change-Id: I5b381bb499cf76e469c844ac7474ce2f60761cef
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-23 15:03:30 +00:00
hjk
6942c58d65 ProjectExplorer: Use simpler signature for ApplicationLauncher::processExited()
And rename it to finished().

Maps better to what QtcProcess uses.

Change-Id: Ibfa018549f436b27638a791c0b4937c4459c9452
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-15 15:07:52 +00:00
hjk
47957de2dc ProjectExplorer: Split ApplicationLauncher::start() parameters
There's traditionally an odd duplication of the runnable.device
and the passed device here. Start disentangling things.

Change-Id: I1cc1628c99cea04d761fc4d8dd0cb232127ce055
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-15 13:43:09 +00:00
hjk
f308bb3cae Debugger: Fix value assignment in locals and expressions
For booleans and numbers.

Change-Id: I5ff1660faee1bf0ed21211d5fe98462f660fb417
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-08 08:44:57 +00:00
David Schulz
bc55c7cc70 Debugger: use FilePath in stack frames
Change-Id: I98b6aa60e1b72be3482916446b87cee89e6cf2a4
Reviewed-by: hjk <hjk@qt.io>
2021-10-27 06:28:56 +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
hjk
93a5803956 Debugger: Aspectify settings
Change-Id: I527be79965250b82a0928171b17aa93bac9fa2a0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-03 07:39:17 +00:00
Alessandro Portale
b3686d410d Debugger: Use qAsConst with non-const Qt containers in range-loops
Change-Id: I7bd27f8317b62fe448e037d5a25e78b4c88c648d
Reviewed-by: hjk <hjk@qt.io>
2021-02-17 08:03:09 +00:00
hjk
b0d2c0d45d Debugger: Drop base DebuggerEngine::runEngine()
The lines between engine setup and running have always been
blurry, so it looks more and more unnatural to enforce this
in the architecture. Remove the runEngine() call from the
end of notifySetupEngineOk, and do it on the user side.

Change-Id: I3a5e158e8b3fe9b0a288d064f798e24b2ac47f86
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-05 06:21:27 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Alessandro Portale
b2a766a79a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-19 08:42:14 +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
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
hjk
78406916a3 Debugger: Avoid use of QHash::values(...) in QmlEngine
This will be gone in Qt6 and seems unnecessary here as insertion
into the hash explicitly checks containment first, so this was
effectively not used as QMultiHash anyway.

Change-Id: I3f6ef9473930f72ee9b5f81f3623829d63619cc0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-31 13:16:40 +00:00
Christian Stenger
9d16d735ab Debugger: Do not send empty message on shutdown
This triggered a soft assert in DebuggerEngine::showMessage()
and cleaning up the status bar is not necessary at all.

Change-Id: I12d3d5cbc79f178af58ecb0a5c7a3130c880bdad
Reviewed-by: hjk <hjk@qt.io>
2020-07-16 04:25:35 +00:00
hjk
f7242cdce9 Debugger: Some compilation with Qt 6
Change-Id: Ifffe68a3c902bbad026919171ac906ae05ec86f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-24 05:43:51 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00:00
Christian Stenger
798b2674af Debugger: Fix go to location on interrupt
Avoid checking an invalid QUrl - instead restore
old code of always creating one an verifying this
instead.
Remove the now unused FilePath::isLocal().

Change-Id: I037c43e6fbdb7dc1f8901fc70b581f3c94ab503a
Reviewed-by: hjk <hjk@qt.io>
2020-01-31 13:18:50 +00:00
Alessandro Portale
24a25eed14 Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-20 20:56:57 +00:00
David Schulz
b23d80d537 Debugger: make Location::fileName a Utils::FilePath
Change-Id: I637d39246ff576db1023f08c432a7f7b6aadbbaa
Reviewed-by: hjk <hjk@qt.io>
2020-01-06 13:29:54 +00:00
David Schulz
a7dd0e50a2 Debugger: make BreakpointParameters::fileName a Utils::FilePath
Task-number: QTCREATORBUG-23339
Change-Id: Ifc497c14589cd6df10d8219533e100f1919213b3
Reviewed-by: hjk <hjk@qt.io>
2020-01-06 13:29:44 +00:00
hjk
ee23dcba23 Debugger: Move toFileInProject to QmlEngine
The only user.

Change-Id: I443cbfab20739fb43a45848355110f879b0f3041
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-02 11:09:17 +00:00
hjk
4307758e4b Debugger: Remove unused QmlEngine::startupMessageFilterConnection
Change-Id: Ifeda7c4956d6abdfc06f602d4e3011a6056e3186
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-19 09:51:03 +00:00
hjk
ecc698a416 Debugger: Remove unused QmlEngine::sourceEditors
It look like it has been always empty for a while.

Change-Id: I4d169294a93f22ffa6a49203e2cd34a9e0bf924c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-19 09:50:50 +00:00