It may happen that async task associated with diffing one pair
of files may not report any value. This happens when both
file contents are the same. In this case taking a result from
async task on a successful done will lead to crash.
Add AsyncTask::isResultAvailable() method. Use it in client code
just in case, where needed.
Fix DiffFilesController, so that no result is allowed for all
running tasks (i.e. make the main group optional).
Collect list of optional results instead of direct results.
The empty optional on the list means the result wasn't delivered
by async task and it's skipped.
Fixes: QTCREATORBUG-28750
Change-Id: I4ca678a187fad619bae470da3e806e8c8da61127
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
Reuse it in TaskProgress and in ProgressTimer.
Rename MathUtils::interpolate() into interpolateLinear()
Change-Id: Iff4cda1e3b8782cd26277ec75046ca5526be92c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Avoid code repetition inside UnifiedDiffEditorWidget
and SideDiffEditorWidget.
Connect to display settings changed signal and apply
all but 4 settings (which are not desired for diff editor).
Change-Id: If4ae7f7c55690dac04fd1a00f8822db666a9ce2b
Reviewed-by: David Schulz <david.schulz@qt.io>
This fixes saving documents and copy texts that contain non breaking
spaces.
Task-number: QTCREATORBUG-17875
Change-Id: Ie0b0e68cf7d67e768ff99c9acae1937aafc78ce7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Suffixed are meant to be different for both editors.
Amends 2d360db2c3.
Change-Id: I4bf8f2b066dbf420eba38a56301d6e24a685caf3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Add static PatchTool::confirmPatching() and reuse it
in two places.
Use Tr::tr() inside PatchTool.
Change-Id: I70779619dbb58ab6e46a585bbeff51588ccb2f53
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
In case of big commit (like 05c35356ab)
polishing selections took about 200 ms. Move this work into
thread to avoid extra 200 ms freeze of GUI thread.
Change-Id: If159e3f0869264f467c4c015f944a3054609f812
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This is a preparation step before making diff showing more
interactive.
Change-Id: I15ab0583af6e4a2655b39b8ae3fb7da10ac245f0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
Adding a way to create multiple cursors that can insert/remove text at
arbitrary positions in the document. Adding cursors is done by pressing
alt + up/down or by clicking into the editor while holding the alt key.
Fixes: QTCREATORBUG-16013
Change-Id: I495d27d95a3d277220946616ef30efc241da0120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
QStringRef is gone. QStringView::split is not available until Qt6.
Since using a ref/view might actually have a performance impact in this
case, work around this with a typedef to the available type.
Task-number: QTCREATORBUG-24098
Change-Id: I72dcb4a9c93b73e396dfb9a2760af924db809eaf
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
QMap::iterator::operator+() was removed in 14090760a8, necessitating
extra code using std::next/prev to workaround.
QMap::unite is gone, the replacement QMap::insert was only introduced
in 5.15.
QMap key values need to have an operator==() available.
Task-number: QTCREATORBUG-24098
Change-Id: Ic4cf429ab18cad58b1218180de40eb65586afd77
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>