Use QListView with its very capable icon view mode instead of QTableView
in order to layout items in a grid.
This removes the need for the GridProxyModel.
It also leaves the previously self-implemented calculation of columns
count to QListView. Only the ProductGridView still needs to calculate
that.
Change-Id: If6e7f033fc78883930794c1e261aea396ae25190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Utils::Internal::Reaper class is doing graceful termination of
process. It tries in a loop to first terminate() then kill()
the process and at the end delete the object.
Utils::ProcessReapder::reap should not kill the process directly,
and now that the function works with a QProcess, the special
handling of QtcProcess::terminat() of qtcreator_ctrlc_stub.exe
processes needs to be handled explicitly.
Amends ace765c199
Fixes: QTCREATORBUG-26612
Change-Id: Ia109ec0737a8c605a84e93b6ee3691d843ed5da8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This was needed in the early days of the CMake port when the list of
source files would change due to being added to the qmake project
files.
Change-Id: I7afd219b24ab7a0d87fce26ba35dac75cf8caa5b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
By default, the view scrolls by a whole row when using arrow keys or
mouse wheel. With rows with a height as in the examples view, this
causes more of a fast flickering than the impression of a scrolling.
The single step value of 25 which is set by this change makes it look
smoother.
Change-Id: I7fe9fe49dab71cebdfd8b01eef245813783426ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Configuring a project during build is a recipe for disaster.
Fixes: QTCREATORBUG-26606
Change-Id: I041d9bd76315647439100cadba809d6664d268fa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When searching for unimported items in component library and dragging
those into the scene, also check if the required import is file type
import.
Fixes: QDS-5545
Change-Id: I389ecb2c5bdbb686832af6eed06b84fe02f12a2f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When multiple items in the editor outline match the current cursor
select the inner most item.
Fixes: QTCREATORBUG-26509
Change-Id: Ib4ced177059e3a9914ace35e4cdc34959719091a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If the root element is not a graphical item, then we show a proper error
message.
Task-number: QTCREATORBUG-20014
Change-Id: I9c1ccbbeb6765bd098344ceef8024a703a8dc919
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This feature was specific to the compile output pane, but we want
to have it in other panes too.
Change-Id: I110b27af7d0aa23acbc5623d1c0405816250df19
Reviewed-by: hjk <hjk@qt.io>
When detaching subcomponent edit model, we just update node expand
state cache for the file instead of recreating it from scratch.
Also, never collapse the current root node when attaching the model.
Fixes: QDS-5557
Change-Id: Id107940daccd9663ec4216de7dc8ae6a5bee8974
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Using LLVM10 is minimum supported, but some format style
elements have been introduced later, so guard access to
members that are not present in LLVM10.
Amends a997161dd6.
Change-Id: I9513b4fdc1fa5247cd67beaf0122b1b1d5494bbf
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If QtCreator is installed via the Qt Installer, sensible defaults are
provided at installation time. For not provided software, $HOME
is not a useful default. Leaving the field empty signals the
user that they need to provide one manually, more clearly than
providing an invalid path.
Task-number: UL-4939
Change-Id: I8ef79e563366ebdbea53df8183a1eca82bd7be4a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Added synchronization between ClangFormat codestyle settings and
CppEditors codestyle settings. All changes which will be done in
ClangFormat settings tab settings tabs will be automatically
retranslated to CppEditor codestyle settings tabs and vice versa.
Change-Id: I408d726c12552856e3c1b72d3ba09b77fff83321
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Fetching process list from remote device can take a long time, which
might cause impatient users think that something is wrong and cancel
the listing.
Change-Id: Ideee017340811bc5600dd2a66a0afee6d223844e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The error was: "The executable of the QML emulation layer (QML
Puppet) may not be responding. Switching to another kit might help."
This error / warning condition happens in ConnectionManager::setUp()
in plugins/qmldesigner/designercore/instances/connectionmanager.cpp
when puppet fails to start -
connection.qmlPuppetProcess->waitForStarted(waitConstant) returns
false. This opens a warning message box with the parent of it set as
the active window. This active window happens to be the New Project
dialog QQuickWidget. This somehow prevents the QQuickWidget object
from actually closing on `m_dialog->close()` -- the operation returns
true but the dialog is not closed.
Fixing this involves two steps:
1. On "Create project" hide the dialog box before starting to create
the project, so that the parent of the message box would be set to
the main window.
2. deleteLater() on the m_dialog, because, for some reason, even if
the QQuickWidget is no longer its parent and even if m_dialog has
the flag Qt::WA_DeleteOnClose set, the close() still doesn't
close / destroy the dialog box.
If we do only (2) but not (1) then the message box would appear and
disappear quickly when the dialog box closes.
I have also set variables to null just for correctness.
Task-number: QDS-5531
Change-Id: Ib33be6a2de6174b0439cd1917f3e871ee5d4f52f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
... when doing function call completion with clangd.
We did not take default arguments into account. E.g. the following
declaration:
void func(int i, int j = int());
was mis-detected as taking no arguments, causing to the cursor to be at
the wrong location afterwards.
Change-Id: I522921721b0cb347ed593c43ed285ca6d02ccfee
Reviewed-by: David Schulz <david.schulz@qt.io>
Before the patch, any closed infobar was suppressed until Qt Creator was
restarted. With this patch the infobar will just be closed,
as naively expected. To suppress any infobar you have to click
"Do not show again".
Task-number: QTCREATORBUG-26605
Change-Id: I29645e853119286f507cba82c228f372dd80fa64
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: hjk <hjk@qt.io>
The broken libclang-based implementation used to remove the correct
results we got from clangd.
Task-number: QTCREATORBUG-26339
Task-number: QTCREATORBUG-26596
Change-Id: I9b7c1214c376b616fe204986ed37c287e2307f81
Reviewed-by: David Schulz <david.schulz@qt.io>
Make the live preview work with Android Virtual Device. This allows to
start the emulator with the currently active project via the live
preview toolbar button.
Task-number: QDS-5383
Change-Id: I3f44ea8fcb6f23d938d9775d78314b23c69768ec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Otherwise we get an unknown stop reason which might get handled
differently in the cdbengine.
Fixes: QTCREATORBUG-26506
Change-Id: Ia1622977631190d43a6b599b58410953cd2add6e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... when trying to find out whether an include statement needs to be
inserted for a given symbol.
The previous code used to ignore e.g. function declarations, so an
unneeded refactoring operation would be triggered.
Fixes: QTCREATORBUG-26591
Change-Id: I5ce0bb064b6ba76e5977de73ea2697342cf74d7e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>