| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
To simplify some calling sites.
Change-Id: I9736e88053659e5e90bca7b70e6d7e84b0d4fb4e
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
| |
... and make use of it.
In most contexts, apply() immediately follows setChangeSet(), so
combining the two can save a lot of code on the call site.
Change-Id: I421001bd47000cb64678a57b19760becf59a4863
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
... of an "empty" line.
Otherwise previous leading whitespace will survive re-formatting.
Also reset the formatting cursors when setting a new change set.
Fixes: QTCREATORBUG-30244
Change-Id: I3fb8668b56c3823972d4acda8da9657fb0bbfe41
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... for e.g. function insertion. In some contexts, the insertion
position is on the last line of some unrelated code (e.g. a preceding
function implementation) and the inserted code starts with a newline. In
that case, advance the position of the formatting cursor, so that we do
not accidentally format the existing code.
Fixes: QTCREATORBUG-30229
Change-Id: Id0be7f22e1797affa0602bb1d392a5e0802cbdcd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
e70b99c7da49c27b519f2fcacb4e06974ef1f6ad broke the auto indent for all
indenters because those indenters are all based on the text indenter.
Add a fallback indenter that is used if no other indenter is configured
for a document, and avoid the auto indentation only if that fallback
indenter is used.
Change-Id: I00e04a07ab14c5fc433a71d1b9826f8e4cc5c0a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
|
|
|
|
|
| |
Change-Id: I67850a4cb5f692765b0692a86252025e2fe64829
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
... and make use of that in TextEditor::RefactoringFile.
This allows calling code to have fine-grained control over which parts of
a refactoring should get re-formatted, while also providing sensible
default values that are "almost always" right, so things typically work
as expected out of the box.
Change-Id: I9200c2135b7477c33bc5a61c5d410b34853e4b61
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Having extra indent regions complicates the interface, the
implementation and the calling code.
Instead, derive the indent regions from the change set and let callers
opt out for the relatively few cases where indentation is not desired.
Change-Id: I49d2854830a51778534ef260fb5c9f2c7685554a
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
| |
This makes it immediately clear that there are more specialized variants
available, which helps users make a conscious decision.
Change-Id: I35feb4bed2d91fb4f83ede6e731d9ce89fd4af3f
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
... and remove outdated comment.
Change-Id: I6dcd0a38608192ccdd6734affd33e170d39e8299
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
Dissolve into only caller.
Change-Id: I2eaac8bf31c0ecd2dfb863b7fae79af557ccad95
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
| |
The only callers are in RefactoringFile, so put the functions there.
Change-Id: I94141d759d32c20a334804e98dfeb262e10c5e11
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: Idf82ce013f19422d2b5931669e1aaa4a3aa64b16
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
| |
There is no use for a data member in the base class.
Change-Id: I126d8713d2a7bf4061ecbd60b4c144d39c08d550
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
| |
There is no use for a generic data member.
Change-Id: Iabfbc0587db2cffcc1c19baed832aa866f696ffe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
We want to get rid of RefactoringChangesData.
Change-Id: Ia428563a0ff70ec9660761beac3eb7168b8e9eca
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
| |
Preparation for de-polymorphisation of RefactoringChangesData.
Change-Id: Ia2a8f8e2a3a403f809e67c907d3474e7c1a52417
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
|
|\
| |
| |
| | |
Change-Id: Ic852bc9977d0292fb6cd93a319f4bfdebb22a1b0
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...instead of relying on the surrounding code of the refactoring to emit the signal.
This also ensures that the signal is only emitted for files that are not opened inside
a TextEditor.
Change-Id: I6223362864014c691962d895b864f9f44c36e035
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|/
|
|
|
| |
Change-Id: I7e301fcf7be7690e88d9b31e60cf900660336a07
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
| |
Change-Id: Ia095ab3d24f8f5822954976db5353c925f0b4256
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... in the ClangFormat settings (rather than the default of just
indenting).
As opposed to files generated by the wizard, quickfixes are often touching
existing code, and since ClangFormat works on line granularity, users
will experience unexpected re-formattings when ClangFormat is in indent-
only mode.
Therefore, do the formatting only if the user has enabled it in the
ClangFormat settings.
Change-Id: Icb30f166f2b6fb94113a8f25c4a5f92ff8bca9b0
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
Also fixes an off-by-one error in the formatting code that was uncovered
by the test.
Change-Id: I013194e21cf37f318bb806bb60ea659b91b99fbf
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
|
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-10807
Task-number: QTCREATORBUG-19158
Change-Id: Ieac52e1a1a10afad91fea56290e7dcfd1d302e7f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
| |
Change-Id: I28aa68e25c53c3a4d1c370074d7b3318944dc45a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
And qMakePair.
Change-Id: Id92a662fa0674b9e9f835280bb9378c8d00549e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@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>
|
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-27464
Change-Id: Ie9594bf661dbeecf22589c1580648252f0bfb7fb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
cmake/QtCreatorIDEBranding.cmake
qbs/modules/qtc/qtc.qbs
qtcreator_ide_branding.pri
src/plugins/studiowelcome/recentpresets.h
src/plugins/studiowelcome/userpresets.h
Change-Id: Ie573b945eb28347a36ee1b3582fbd6ab0c0f866c
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: QTCREATORBUG-27210
Change-Id: I612f6e91188730d6abdfef3f2fe8a286fcec4831
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
|
|/
|
|
|
|
|
|
|
|
|
| |
... if the client implementation requests it.
The server is not necessarily aware of our indentation style, so we
might have to apply it to the newly inserted code.
Change-Id: I43518575c7124568da42be3b04a28d7f352f6dc2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is particularly helpful with clangd, which considers only the on-
disk state of header files when parsing dependent sources.
Fixes: QTCREATORBUG-25924
Change-Id: I41d313f8a203a576d3ed5fbe75bbe918334486d4
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
| |
Change-Id: Ifa9341e55c79459db9ecef3c441da9b2816695bf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
| |
Change-Id: Ie97e484bcdeaa0cb2f5d04b3c79ace55ff2e426c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
| |
Change-Id: I6a4e2d38b0bbdec661a4a492901d9182a9f2e502
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
| |
Change-Id: I0626f3e97eda6228130fe094c596ccbb3901b079
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
Courtesy of readability-static-accessed-through-instance
Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
|
|
|
|
|
| |
Change-Id: I01777c227398be8bd3bf877c5429b84a75aa361b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
| |
... if it is already visible in a different split view. Activate that
one instead.
Fixes: QTCREATORBUG-13145
Change-Id: I5facfb23e8e8163d8653c7926d5bf6848f42bd9a
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
It can easily happen that callers insert indent ranges out of order, and
without sorting the indentation done earlier in the file is not
considered for the later parts, leading to inconsistent results.
Fixes: QTCREATORBUG-18929
Change-Id: Ice2abe92d54446bcdd102c6a1f822262a8533543
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far it was only possible to combine TextEditorFactory, BaseTextEditor
and TextEditorWidget directly.
That TextEditorWidget is also directly a QPlainTextEdit made it
impossible to "decorate" the text editor widget with something else
without a lot of effort.
Make it possible to create a text editor factory that returns an
arbitrary widget, as long as it can be "cast" to a TextEditorWidget with
either qobject_cast or Aggregation::query. That way the TextEditorWidget
instance can be attached to the editor widget via Aggregation.
Adapt other code that accesses TextEditorWidget from editors
accordingly. Introduce a common method how to do that.
Change-Id: I72b8721f3a8a8d8281c39af75253e9c80cbe1250
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently tons of warnings show up for presumably "problematic"
singned <-> unsigned and size conversions.
The Qt side uses 'int', and that's the biggest 'integration surface'
for us, so instead of establishing some internal boundary between
signed and unsigned areas, push that boundary out of creator core code,
and use 'int' everywhere.
Because it reduces friction further, also do it in libcplusplus.
Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
| |
Change-Id: Iccde7e5cfcee0bdb02720279e8a310857c0a7a67
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
| |
modernize-*
Change-Id: Ic497fea1942a77cf017be3b0033f92e3807066f1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
| |
override, auto, nullptr, member initializers.
Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If e.g. a ".ui" file is open, there is a read-only text editor widget
for the file, even though the file itself is writable.
The application of refactorings or global text-based replace should not
change the content of this read-only editor widget, but instead operate
directly on the file as if it wasn't open in Qt Creator at all.
It should also silently reload these files after modification on disk.
Task-number: QTCREATORBUG-19958
Change-Id: I409d5d03059be4c3520a1031ff0fbfa9feb675bb
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
| |
...in the fixit column to avoid confusion.
As a side effect, add some error handling.
Change-Id: Ia30e9c9782f3c8021aedd2be7c682853a26d3f39
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new column to the view that allows to check diagnostics with
fixits. The checked fixits can then be applied with the also new "Apply
Fixits" button in the toolbar.
Some corner cases are not yet handled:
* File is open in editor
* File changed in the mean time
Change-Id: I3d3f353a4150699a0d082f2a4348e331a4213bcf
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|