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>
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>
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.
Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).
Change-Id: I724eecc040e33e249a88243f27e8a9e72e54f24b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@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>
Was disabled since QMacCocoaViewContainer is gone in Qt 6. Works with
the suggested QWindow::fromWinId + QWidget::createWindowContainer
though.
WebKit(1) is deprecated though, and litehtml works pretty well nowadays,
so this is more academical than really useful. (litehtml stays the
default, opt-in to WebKit is possible in Preferences > Help > Viewer
backend)
Change-Id: I6c54a6ff4de790f098cd852eb753545d9a5540a4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Except FakeVim, which had it before.
for i in [a-eg-z]*/*.json ; do
upper=${i##*/}
upper=${upper/.json/}
lower=${i%/*}
trfile=$lower/${lower}tr.h
cat << EOT > $lower/${lower}tr.h
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
namespace $upper {
struct Tr
{
Q_DECLARE_TR_FUNCTIONS($upper)
};
} // namespace $upper
EOT
git add $trfile
perl -pi -e "s/(${lower}_global.h)/\1\n ${lower}tr.h/" $lower/CMakeLists.txt
perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/" $lower/$lower.qbs
done
Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Round 1 - focus on headers.
For classes with initial in range [H-K].
Try to keep the same separators between different kind of headers.
Change-Id: Iefb032953743be41a847ee011c30527edfa425d8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Last segment of host part represents version string.
e.g. qthelp://org.qt-project.qtwidgets.630/...
If it starts with "6", let's open qt-6 documentation.
Otherwise, let's open qt-5 as it is.
Change-Id: I88b5f6bd2ebfd8494e48f043678dbc190310b90f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Instead of showing the last page this will always show the home
page when activating index or content from the help menu.
Task-number: QDS-6392
Change-Id: Ic158d22ba3739f5db513e04ebde00fdadc24a9d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.
Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Qt 6 brings a behavioral change regarding delivery of wheel events:
92df790f46b3a8b17aec2f385d6472fd3f8647f6 and
2a857ee28315c5bacfe2ecaf402ca9005b35c20e. If there is an event
filter installed and wheel event is being processed, the event
is now accepted by default, which means that after returning
true from eventFilter(), the event is not propagated anymore.
Since we want to redirect the event to the parent HelpViewer object,
we explicitly ignore the event prior to returning true.
This patch fixes the QTextBrowser backend.
Amends 0b96a1b76b
Fixes: QTCREATORBUG-26369
Change-Id: I7a0167c54f830fffab13d73eb91cb2ecbd730c86
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Qt 6 brings a behavioral change regarding delivery of wheel events:
92df790f46b3a8b17aec2f385d6472fd3f8647f6 and
2a857ee28315c5bacfe2ecaf402ca9005b35c20e. If there is an event
filter installed and wheel event is being processed, the event
is now accepted by default, which means that after returning
true from eventFilter(), the event is not propagated anymore.
Since we want to redirect the event to the parent HelpViewer object,
we explicitly ignore the event prior to returning true.
Task-number: QTCREATORBUG-26369
Change-Id: I2fc8b7c8bfbc343a9ca7951684ced405f8a55039
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
By using find_package(Qt5 COMPONENTS WebEngineWidgets) we make
sure that the WebEngineWidgetsConfig.cmake from the same Qt5
package would be marked as found.
Otherwise CMake would look around after a Qt5WebEngineWidgets
package, which on Windows if you have a MSVC Qt Creator trying
to build a MinGW Qt Creator could end up in a failed build.
Change-Id: Ibd30c36231577ef111d9163cc1c87a09443d3cb9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Otherwise we may have race condition.
Reference: documentation for QFutureWatcher::setFuture()
and the implementation of
QFutureInterfaceBasePrivate::connectOutputInterface(
QFutureCallOutInterface *interface).
Change-Id: I5b483baaf1b844871a162f47ce7683e9ff495acb
Reviewed-by: Eike Ziller <eike.ziller@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>