summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/src/qt6-changes.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/doc/src/qt6-changes.qdoc')
-rw-r--r--src/gui/doc/src/qt6-changes.qdoc84
1 files changed, 50 insertions, 34 deletions
diff --git a/src/gui/doc/src/qt6-changes.qdoc b/src/gui/doc/src/qt6-changes.qdoc
index ff193e7784..60e1bffba8 100644
--- a/src/gui/doc/src/qt6-changes.qdoc
+++ b/src/gui/doc/src/qt6-changes.qdoc
@@ -1,35 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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 Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page gui-changes-qt6.html
\title Changes to Qt GUI
\ingroup changes-qt-5-to-6
- \brief Migrate Qt GUI to Qt 6.
+ \brief Kernel, Text, Painting, and Utility classes are modified.
Qt 6 is a result of the conscious effort to make the framework more
efficient and easy to use.
@@ -43,18 +19,18 @@
\section1 Kernel classes
- \section2 QBitmap
+ \section2 The QBitmap class
Implicit construction of a QBitmap from a QPixmap is no longer supported.
The constructor and assignment operator have been made explicit and marked as
deprecated. Use the new static factory function \l{QBitmap::}{fromPixmap} instead.
- \section2 QCursor
+ \section2 The QCursor class
Implicit construction of a QCursor from a QPixmap is no longer supported, the
constructor has been made explicit.
- \section2 QKeyCombination
+ \section2 The QKeyCombination class
QKeyCombination is a new class for storing a combination of a key with an
optional modifier. It should be used as a replacement for combining values from
@@ -70,7 +46,7 @@
\section1 Text classes
- \section2 QFontDatabase
+ \section2 The QFontDatabase class
The QFontDatabase class has now only static member functions. The constructor
has been deprecated. Instead of e.g.
@@ -85,7 +61,7 @@
const QStringList fontFamilies = QFontDatabase::families();
\endcode
- \section2 QFont
+ \section2 The QFont class
The numerical values of the QFont::Weight enumerator have been changed to
be in line with OpenType weight values. QFont::setWeight() expects an enum value
@@ -117,12 +93,18 @@
In addition, the class \l QOpenGLWidget has been moved to a new module, named
Qt OpenGL Widgets.
+ \section2 The QOpenGLContext class
+
+ The QOpenGLContext::versionFunctions() function is replaced by
+ QOpenGLVersionFunctionsFactory::get(). QOpenGLVersionFunctionsFactory is a public
+ class now, part of the \l{Qt OpenGL} module.
+
\section2 ANGLE
On Windows, ANGLE, a third-party OpenGL ES to Direct 3D translator, is no
longer included in Qt. This means Qt::AA_UseOpenGLES and the environment
- variable \c{QT_OPENGL=angle} no longer have any effect. In \l{Qt for Windows -
- Requirements}{dynamic OpenGL builds} there is no automatic fallback to ANGLE in
+ variable \c{QT_OPENGL=angle} no longer have any effect.
+ In \l{Dynamically Loading OpenGL}{dynamic OpenGL builds} there is no automatic fallback to ANGLE in
case OpenGL proper fails to initialize. For QWindow or QWidget based
applications using OpenGL directly, for example via QOpenGLWidget, this means
that OpenGL proper is the only option at run time. However, the alternative of
@@ -132,4 +114,38 @@
Metal, in addition to OpenGL. On Windows the default choice is Direct 3D,
therefore the removal of ANGLE is alleviated by having support for graphics
APIs other than OpenGL as well.
+
+ \section2 Native clipboard integration
+
+ Qt 5 provided interfaces for integrating platform specific or custom
+ clipboard formats into Qt through \c QMacPasteboardMime in \c QtMacExtras,
+ and \c QWindowsMime from the Windows QPA API. Since Qt 6.6, the
+ equivalent functionality is provided by the classes QUtiMimeConverter for
+ \macos, and the QWindowsMimeConverter for Windows.
+
+ Porting from QWindowsMime to QWindowsMimeConverter requires practically no
+ changes, as the virtual interface is identical. However, in Qt 6 it is no
+ longer needed to register a QWindowsMimeConverter implementation;
+ instantiating the type implicitly registers the converter.
+
+ Porting a QMacPasteboardMime to QUtiMimeConverter requires renaming some of
+ the virtual functions. Note that the \c{QMacPasteboardMime} API used the
+ outdated term \c{flavor} for the native clipboard format on \macos, whereas
+ the platform now uses \c{Uniform Type Identifiers}, i.e. \c{UTI}s, which Qt
+ has adapted for function and parameter names.
+
+ The \c{mimeFor} and \c{flavorFor} functions are replaced by the
+ \l{QUtiMimeConverter::}{mimeForUti} and \l{QUtiMimeConverter::}{utiForMime}
+ implementations, respectively. Those should return the name of the mime
+ type or \c{UTI} that the converter can convert the input format to, so a
+ port usually just involves renaming existing overrides. The
+ \c{convertToMime}, \c{convertFromMime}, and \c{count} functions in
+ QUtiMimeConverter are identical to their QMacPasteboardMime versions.
+
+ The \c{canConvert}, \c{converterName} functions are no longer needed, they
+ are implied by implementation of the above functions, so overrides of those
+ functions can be removed.
+
+ As with the the QWindowsMimeConverter, registration is done by instantiating
+ the type.
*/