Expanding items in the locals view results in replacing the original
tree item with a newly created one. This ultimately resets the selection
and the current item of the view, which in turn makes it cumbersome to
navigate by keyboard.
Save a list of selected inames and the iname of the current index when
requesting the update and try to reselect them after the update
finished.
Fixes: QTCREATORBUG-27569
Change-Id: I9d8f51631e4ee490e19307877cbef44798506016
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When triggering them from the context menu while debugging.
Fix used settings group when triggering writeSettings() on
the aspect instead of the AspectContainer.
Explicitly persist respective settings when triggering them
on the context menu.
Fixes: QTCREATORBUG-30491
Change-Id: I6f429bb54630cbe61c8b2ee063028f323a2d08f6
Reviewed-by: hjk <hjk@qt.io>
More direct communication of the meaning. Use 'length' when talking
about things like string lengths, and 'size' for sizes in bytes.
Task-number: QTCREATORBUG-30065
Change-Id: Ifed84a5dab4ed890973c1abf4d427655eb50a61a
Reviewed-by: David Schulz <david.schulz@qt.io>
This was not adding the length before.
The problem that the size is suddenly off by a factor of two for
QString as elision counts bytes is still present.
Change-Id: Ibcb595dc2d9aaa73b3feec955b4d14613307797f
Reviewed-by: David Schulz <david.schulz@qt.io>
Reverts 6515f935d6 as this breaks
the dumper tests and moves the handling from the protocol to
the item, so this now only happens for the gui.
Change-Id: Ia15d5ead5c549585f4e90cc46d629961ea7d5974
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Coverity complains about not checking the return value of f.open()
Coverity-Id: 1359453
Change-Id: I9e6b7f5d3ab6ec58e99131e8a0d84d8f17863fed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.
This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.
Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Sessions are independent from projects, and this allows for removal of
e.g. the dependency from Bookmarks to ProjectExplorer.
Includes moving the command line arguments (-lastsession, <session>) to
Core plugin.
Change-Id: I6c578fd15c4990902e7196501de20f39376e90e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Remove function overloads, thes are hard to read, to use and to extend.
I'd even argue this should be a plain default ctor and a few setters +
exec(), pretty much like Process::start() nowadays.
Move "decider" magic into a structure that can be filled ad-hoc outside
checkablemessagebox.cpp paving the ground for:
...removing aspect dependency from CheckableMessageBox, Instead, add a
convenience function to BoolAspect. Arguably, the latter is not needed
and could be done on the user side.
Use pointers instead of mutable references for in-out parameter.
Makes the "specialness" visible on the user side.
Pass ICore::settings() centrally as done elsewhere to reduce line noise
on the user side.
Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
When expanding all children of a long array, this is called
once per item. If we have one update in the end that's enough.
Change-Id: Ibb63a9aef752418a1dcafb6190edf5a8005a855f
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
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>
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>
It'll get a _Float16 cast operator, which will cause ambiguous overloads:
watchhandler.cpp:782:24: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::ostringstream’ {aka ‘std::__cxx11::basic_ostringstream<char>’} and ‘qfloat16’)
Change-Id: Ic44396b31ba04712aab3fffd16ff43d6616878f9
Reviewed-by: hjk <hjk@qt.io>
Debugger, watchhandler: incorrect type conversion:
Converting from `int` to `unsigned int` can lead to a situation where
the result is too large to be represented as a `QChar`.
Task-number: QTCREATORBUG-27107
Change-Id: I7873635f7a1ef29f62339ffe23b4dd84cb089e2b
Reviewed-by: hjk <hjk@qt.io>
Pass the parent calling object to the addAction() functions and use a
queued connection. This prevents the following sequence of events:
1. The menu is dismissed when selecting a menu item.
2. The deletion gets queued via deleteLater().
2. The onTriggered action gets invoked and opens a dialog box.
3. The dialog box triggers the events to be processed.
4. The menu is deleted when processing the events, while still in the
event function to handle the dismissal.
This only affected the watch menu since the others were leaked. Added
cleanup handlers for the other debugger menus to avoid leaking them.
Task-number: QTCREATORBUG-26989
Change-Id: Ifa2c52d7bea884c55d43fa545e3e2870301e4052
Reviewed-by: hjk <hjk@qt.io>
1. The `std::hexfloat` representation produced by `std::sstream`.
2. Breaking the number into a normalized value and a integral power of 2,
as does the `std::frexp()` function.
M_PI looks like "0x1.921fb54442d18p+1" and "0.785398163397 * 2^2"
respectively.
Fixes: QTCREATORBUG-26793
Change-Id: Ib08ea9408f79201434eb75ec328b94ab933259a4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
warning: C4305: '/=': truncation from 'int' to 'IntType'
with q[u]int8 template argument.
Change-Id: I0f0063191b0e51ab79f94073ead65da86ea82440
Reviewed-by: hjk <hjk@qt.io>
Make more stdint, quint and char types known to the debugger.
Task-number: QTCREATORBUG-26501
Change-Id: I1e757af2a495142fa37fe2b7cefec56690adbf08
Reviewed-by: hjk <hjk@qt.io>
QProcess wasn't used in these files.
Change-Id: I24900bcf312eb6ea1ca3bc0c753cebb505ec552b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
* Make (u)intX_t known as integral type
* Handle uint8_t[] the same way as char[] and unsigned char[]
Task-number: QTCREATORBUG-26501
Change-Id: I1eac21be198f8107f088e56daf435b5bb3217120
Reviewed-by: hjk <hjk@qt.io>
* Implicit conversion of size_t to int
* Comparing bool with operator >
Change-Id: I4bc5bef57bfa0125b1c82953a7a2cfc24066bc8c
Reviewed-by: hjk <hjk@qt.io>
By re-using the existing function quoteUnprintable()
and moving their code as escapeUnprintable() to
watchutils.
In contrast to the watches window, where the escaping
can be disabled by the context menu, the line annotations
are always escaped for simplicity.
Change-Id: I76adfd7cd70ec92ff0d7f7ea41fc30ae0057cad0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Added a right click context menu to the tab bar of the separate
variable viewer window to being able to change the
variable display mode right there (without navigating
to the variable tree view in the main window).
Fixes: QTCREATORBUG-25762
Change-Id: Ida35f4f6d23f07e5ed45a9f2d51a5af970a95375
Reviewed-by: hjk <hjk@qt.io>