When the user switched to another builtin color scheme the full paths
check do not match anymore if the user starts a Qt Creator with a
different install dir.
Change-Id: I4692c85a23a7d524497786db4dd8e1a00bb7a9fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This removes apparently unnecessary resize() calls on QWidgets based
forms which get anyways added to layouts and resized. Most of these size
values looked "accidental", i.e. neither divisible by 2 nor by 5, in
most cases a remnant from the ui inlining.
Change-Id: I95da3b93f2915ef955b5235e5c2ecc94b51f813a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Operating on saved settings is less error prone and easier to maintain.
Change-Id: I92e3a6b52296cddc302ba2e4410edfd243b8ad32
Reviewed-by: hjk <hjk@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>
This already has been implemented in change
dc64f3207b, but was reverted with
change f220cb0e23) because this does not
work with text wrapping rendering, due to internal limitations of Qt.
Since this is a highly requested feature (e.g. QTCREATORBUG-13727), but
an internal change within Qt is not in sight, the approach taken here
is to offer the text wrapping feature in the settings only when the
line spacing is set to 100%. Additionally, a change has been made to
the layout of the display settings page to reflect this.
Fixes: QTCREATORBUG-13727
Change-Id: Ib233cf90a5f336bc591fa1bf860e162fa774dfe3
Reviewed-by: David Schulz <david.schulz@qt.io>
Using white and black as the defaults results in unpleasant colors in a
dark color scheme. Instead rely on the fallback to the colors of C_TEXT
that are used in the SearchResultColor constructor.
Change-Id: I110aadbae9f07f59fefac07c7ef8fa2af2f3b596
Reviewed-by: Christian Stenger <christian.stenger@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>
To display the parent function, first we find it in displayResults and
store the information to SearchResultItem, then
SearchResultTreeItemDelegate gets the information and renders it.
Similar approach is applied to ClangdClient, in addSearchResultsForFile.
This change also adds default style for containing function highlight in
the search.
Default foreground and background colors are same as usual text colors.
Task-number: QTCREATORBUG-27550
Change-Id: Id1251afa192f8d1232524742b7c211770bcb83fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Since the delete button has already the accept role the delete was
triggered twice. First time by the role and second time from the connect
of the button clicked signal to QDialog::accept.
Change-Id: I9bd6104d36f286ec8bd0b25ee4ab6e7c8306d51a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Core::ICore::userResourcePath seems to have returned a string
with a trailing slash before it returned a Utils::FilePath.
This allowed us to just concatenate the resource path with the pattern.
Use FilePath::pathAppended to make sure the styles end up in the correct
directory.
Fixes: QTCREATORBUG-25944
Fixes: QTCREATORBUG-25910
Change-Id: I6ac735e3746e4328b5bbae4e55d91ef642277886
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Saves some code on the user side.
Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since the background colors were defined, also the foreground colors
need to be defined to make sure that both light and dark schemes which
do not define C_SEARCH_RESULT_ALT1|2 have a legible contrast.
Change-Id: Ic954852bdc66d3534f664658b914af1a30795a7d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
C_SEARCH_RESULT_ALT1: Give it a bluish tint.
C_SEARCH_RESULT_ALT2: Black on red is quite sneaky on many people's
eyes. This changes the red background to a brighter and less saturated
red.
Change-Id: Id1000119583bf05d47206d877a791ccc42323753
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This does not work with text wrapping since there are multiple
QTextLines inside a block but we can not adjust the line hight inside a
block. This needs to be addressed inside Qt.
This reverts commit dc64f3207b.
Change-Id: If6c28056da9891eeeb75f5939a42f08360013a80
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and make use of that in CppTool's "Find Usages" by assigning
different colors to read and write accesses.
Fixes: QTCREATORBUG-12734
Change-Id: I067db2c8d693bb2c5be44249931ee4f0269f7e52
Reviewed-by: Alessandro Portale <alessandro.portale@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>
Make sure no FontSettingsPageWidget is created when changing the font
zoom level in the editor. Otherwise it will crash in the font combo box
when closing Qt Creator.
Since we can't use the save and emit mechanism from the widget anymore
move it to TextEditorSettings
Change-Id: I1eb87bbae3cf2b802fb15981e7fc2203106d5565
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Mainly re-using the existing pimpl as new widget implementation, and
using the primary storage out of the page (into texteditorsettings).
This one is structutally bit different as there is that second path
(Ctrl+Wheel) to modify font zoom.
Change-Id: I7b85c781c7c53a733b234754beb5bb54664be3fd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It's effectively setting only three properties nowadays, not enough
to justify a case of reuse-by-inheritance anymore.
Change-Id: I947fbc51e76c8d908da662dd58dce91614c28e08
Reviewed-by: David Schulz <david.schulz@qt.io>
...by making the size combobox editable. This way the user can still
access the proposed list of point sizes in the combo box.
Change-Id: Ia73ccde9277d8960bc2de550f74355b0561d4c8e
Fixes: QTCREATORBUG-22536
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This reverts commit 25f9d9c434.
The deprecation was reverted in qtbase 298f750cdba2bd15e735a47ba8d3b9c093367ba3.
Change-Id: I8a05f038be4b7fc89e05830435e08c3212e4f116
Reviewed-by: hjk <hjk@qt.io>
QComboBox::currentIndexChanged is depcrecated as of Qt 5.13 and
QComboBox::currentTextChanged is available since Qt 4.1
Change-Id: I97b8eb37765cbb7556cfbde87ea90f91f63bfa63
Reviewed-by: hjk <hjk@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Show a label instead with a link that copies the current color scheme.
Fixes: QTCREATORBUG-21874
Change-Id: I74083bac8d7124341b4b63d8e172172235c5e184
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Mainly to get rid of the QProcess::finished deprecation warning.
Also adjust coding style in the surrounding connects when needed.
Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>