Before, when all the data was finished, we called showDiff()
in main thread. This consisted of 2 parts:
1. Calculating some extra data and generating actual text
for UnifiedDiffEditor out of input data.
2. Calling setPlainText() with generated text.
For a really big diffs this could freeze the main thread for a
couple of seconds. Like e.g. 05c35356ab
(initial Creator import) - it contained 7 million characters,
part 1. took about 500 ms and part 2. took about 2.5 seconds.
This two tasks are now done in separate thread.
However, since we can't call TextEditorWidget::setPlainText()
directly from non-GUI thread, we create a separate
TextDocument object in the worker thread, fill it with
generated diff input and move the TextDocument object
into the main thread as a result of async computation.
In main thread we replace TextDocument object of the
TextEditorWidget with the one generated in other thread.
This replacement is very fast.
Change-Id: I49a717ced1dc2d5b8946e0fd6bee244b25071f35
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Quite a bit of special access from the outside, so LayoutBuilder is not
really helpful here.
Change-Id: I006b66e155c2abd46e7077add006fe31ec6b227d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Tested on all desktop platforms like this:
* Windows with cpack -G NSIS64|WIX|IFW
* Ubuntu Linux with cpack -G DEB
* macOS with cpack -G DragNDrop
Fixes: QTCREATORBUG-28199
Change-Id: I5cd66aa387cc9677303ac3aece28eccb710d074f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Uses offline-dark.css instead of offline.css in case of Qt Creator using
a dark theme. Looks for the CSS file first in the shipped documentation,
otherwise uses a fallback that is shipped with Qt Creator. The fallback
is based on Qt 6.3.2 documentation, with colors replaced by palette
colors from the flat-dark theme (normalBackground, alternateBackground,
shadowBackground, text). Link colors are taken from the dark Qt online
CSS.
Makes sure to keep a light background for non-Qt documentation, since we
do not assume that they provide a dark themed CSS.
Fixes: QTCREATORBUG-26557
Change-Id: I4a09eedd1216cebeb87c12df40ad99ced030fa73
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Do not call validId in updateContext.
Calling validId does mutate the model and will set an id if none exists.
Since updateContext is called on selection change the user does not
expect the model to mutate and when switching/creating documents this
could even lead to a crash.
Instead, we give the created MosueArea always an id and disable the menu
in case there is no id.
Task-number: QDS-7806
Change-Id: I3d5d1ce41025d94db3cfff48f483366e56b58a32
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Many validation tests can now be skipped.
Task-number: QDS-7454
Change-Id: I43ef981379cf495506b6cf8e8b3cedf50b061281
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Many validation tests can now be skipped.
Task-number: QDS-7454
Change-Id: I24aa4023808a42215a6e79c15f962128702ff51c
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Many validation tests can now be skipped.
Task-number: QDS-7454
Change-Id: I77ee17ff2abdfbbcc3c6db751f0296b3935ae8e0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Many validation tests can now be skipped.
Task-number: QDS-7454
Change-Id: I3fe3ee1fcf97b965872cb6f76f00034caeb72ba0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Many validation tests can now be skipped.
Task-number: QDS-7454
Change-Id: I8b7c1a5cdce2d19dd62cf2400d297dc9fffd4fcc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Many validation tests can now be skipped.
Task-number: QDS-7454
Change-Id: I346e9ba506e836d8064e425e509dda0c400635a0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Avoid a global static that doesn't buy much; some namespace changes.
Change-Id: I80d0f5c0e6c7a77e91930ec198c39080b6c7404a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Code Snippet is the last .xml-based wizard shipped with Qt Creator.
This change ports it to the .json-based wizard format. Instead of
supporting just qmake-based projects (like it did), the new version
supports just CMake-based projects.
Change-Id: Ie64114165fff5d56ddf82041cc4d5f90c44fe77b
Reviewed-by: hjk <hjk@qt.io>
\QC rendered as Qt Design Studio in places where it should be Qt Creator.
Task-number: QDS-7712
Change-Id: I16df93bbb7881c280e96aede32f5619d1228b8f5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
After setting the document the display settings that are configured in a
widget might differ from the ones configured in the document. So Check
those values against the desired values from the editor and update if
they differ.
Change-Id: I30c5eddbb09803451fe03769d8e6d189293c5e86
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
default values can vary between windows and linux so when it is the
case a json object can be specified to describe the default values for
both.
Change-Id: Ifd3e4225ba0e1b1760f93ecea9cfafa4545c3404
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: hjk <hjk@qt.io>