// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page whatsnew612.html
    \title What's New in Qt 6.12
    \ingroup whatsnewqt6
    \brief Lists the new features in Qt 6.12.
    \meta sortkey 612

    \section1 New and Restored Modules in Qt 6.12

    Qt 6.12 adds the following modules and tools:

    \list
    \endlist

    \section1 New Features in Qt 6.12

    \section2 Qt Bluetooth Module
    \list
      \li The Android backend now respects the advertising minimum and
          maximum interval parameters provided via \l QLowEnergyAdvertisingParameters
          when starting the BTLE advertising.
    \endlist

    \section2 Qt Canvas Painter Module
    \list
      \li The \l{Qt Canvas Painter} module is moving out of Technology Preview
          state, and is now fully maintained (supported).
      \li The module gained \l{QtCanvas2D}, a new QML API backed by Qt Canvas
          Painter. This API remains in technology preview.
      \li \l{QCanvasPath} gained an
          \l{QCanvasPath::addPath(QStringView, const QTransform &)}{addPath()}
          overload for parsing SVG path strings directly.
      \li \l{QCanvasPainter} gained \l{QCanvasPainter::FillRule} and
          \l{QCanvasPainter::setFillRule()} to support the EvenOdd fill
          rule for path fills.
      \li \l{QCanvasGradient} gained
          \l{QCanvasGradient::setImage()}{setImage()} to create gradients
          directly from an image.
      \li \l{QCanvasRadialGradient} gained constructors and
          \l{QCanvasRadialGradient::setInnerCenterPosition()}{setInnerCenterPosition()}
          /
          \l{QCanvasRadialGradient::setOuterCenterPosition()}{setOuterCenterPosition()}
          to support non-symmetric (two-center) radial gradients.
    \endlist

    \section2 Qt Core Module
    \list
      \li \l{QRangeModel}'s \l{QRangeModel::}{RowOptions} and
          \l{QRangeModel::}{ItemAccess} customization points were extended to
          support \c headerData(), and per-row and per-item \c flags().
          \l{QRangeModel} gained \l{QRangeModel#Drag'n'drop handling}
          {drag'n'drop handling} support with custom and type-safe mime type
          handling in both customization points, and with
          \l{QRangeModel::}{supportedDragActions} and
          \l{QRangeModel::}{supportedDropActions} properties.
          \l{QRangeModel} now also implements \l{QRangeModel::}{sort()} with
          support of a \l{QRangeModel::}{sortCollator} for locale-aware sorting,
          and \l{QRangeModel::}{match()} for fast content matching.
      \li Added \l{qSharedPointerStaticCast} as a new free function for
          static casts of \l{QSharedPointer}.
      \li \l{QSortFilterProxyModel} gained the
          \l{QSortFilterProxyModel::DataChangeRelevance}{DataChangeRelevance}
          enum and the virtual
          \l{QSortFilterProxyModel::dataChangeRelevances()}{dataChangeRelevances()}
          method, allowing subclasses to control whether a source
          \c dataChanged signal triggers re-filtering or re-sorting.
      \li The new \l{QAbstractItemModel::compareData()} is a new protected API for
          comparing two QVariants in a way that is specifically designed for item
          view use cases.
      \li \l{qfloat16} gained increment and decrement operators and a
          unary \l{qfloat16::operator+()}{operator+}.
      \li \l{QVariant} gained constructors from rvalue references.
      \li \l{QMap} and \l{QMultiMap} now implement all six relational
          operators.
      \li \l{QVarLengthArray} gained
          \l{QVarLengthArray::removeAt()}{removeAt()}, matching the
          \l{QList} API.
      \li \l{QTimeZone} now accepts CLDR-canonical IANA alias IDs in its
          constructor and in
          \l{QTimeZone::isTimeZoneIdAvailable()}{isTimeZoneIdAvailable()}.
          \l{QTimeZone::availableTimeZoneIds()} now includes those aliases.
      \li \l{QFile::copy()} now accepts an optional
          \l{QFileDevice::Permissions} argument.
          \l{QSaveFile} now defers applying the requested permissions until
          \l{QSaveFile::commit()}{commit()}.
      \li \l{Qt::compareThreeWay()} gained an overload for
          \c{std::pair}.
      \li \l{QCalendarPermission} gained a
          \l{QCalendarPermission::AccessMode}{WriteOnly} access mode.
      \li \l{QFileSystemWatcher} can now use \c inotify on FreeBSD 15 and
          later.
      \li \l{QStandardPaths} on macOS now includes the system-wide
          \c{/Library/Preferences} directory in
          \l{QStandardPaths::standardLocations()}{standardLocations()}.
          On iOS, \l{QStandardPaths::}{PublicShareLocation} returns the correct path and
          \l{QStandardPaths::}{TemplatesLocation} is properly reported as unsupported.
      \li \l{QEasingCurve} gained
          \l{QEasingCurve::cubicBezier()}{cubicBezier()}, a convenience
          helper for creating cubic Bezier easing curves.
      \li \l{QJsonObject} gained \l{QJsonObject::cbegin()}{cbegin()} and
          \l{QJsonObject::cend()}{cend()} STL-style const iterators.
          \l{QJsonDocument} gained rvalue constructors from
          \l{QJsonArray} and \l{QJsonObject}.
    \endlist

    \section2 Qt D-Bus Module
    \list
    \endlist

    \section2 Qt Graphs Module
    \list
      \li Qt Canvas Painter can now be used as a rendering backend for
          2D graphs. Enable it at configure time with the
          \c{-feature-graphs-2d-high-performance-backend} configure flag.
      \li Added \l[QtGraphs]{QLogValueAxis} (\l{QtGraphs::}{LogValueAxis}
          in QML), a new logarithmic axis type for 2D graphs.
      \li \l[QtGraphs]{QXYSeries} gained
          \l[QtGraphs]{QXYSeries::declarativePoints}{declarativePoints},
          \l[QtGraphs]{QXYSeries::declarativePointHint}{declarativePointHint},
          \l[QtGraphs]{QXYSeries::declarativeMin}{declarativeMin}, and
          \l[QtGraphs]{QXYSeries::stepSize}{stepSize} properties for
          declarative data input from QML.
      \li \l[QtGraphs]{QPieSeries} gained
          \l[QtGraphs]{QPieSeries::sliceData}{sliceData} and
          \l[QtGraphs]{QPieSeries::sliceLabels}{sliceLabels} properties
          for declarative data input from QML.
      \li \l[QtGraphs]{QValueAxis} and \l[QtGraphs]{QLogValueAxis}
          gained a
          \l[QtGraphs]{QValueAxis::labelPostFormat}{labelPostFormat}
          property for customizing axis label text.
      \li \l[QtGraphs]{Q3DGraphsWidgetItem} gained
          \l[QtGraphs]{Q3DGraphsWidgetItem::panEnabled}{panEnabled} and
          \l[QtGraphs]{Q3DGraphsWidgetItem::panModeEnabled}{panModeEnabled}
          properties to enable panning in 3D graphs.
      \li \l[QtGraphs]{QDateTimeAxis} gained a
          \l[QtGraphs]{QDateTimeAxis::tickCount}{tickCount} property.
    \endlist

    \section2 Qt GRPC Module
    \list
        \li Added client-side request compression. The new
            \l{QtGrpc::CompressionAlgorithm} enum can be selected through
            \l{QGrpcChannelOptions::setRequestCompression()} and
            \l{QGrpcCallOptions::setRequestCompression()} to compress outgoing
            messages.
        \li Added \l{QGrpcChannelOptions::}{supportedCompressionAlgorithms()},
            \l{QGrpcChannelOptions::}{acceptedCompressionAlgorithms()} and
            \l{QGrpcChannelOptions::}{setAcceptedCompressionAlgorithms()} to
            \l QGrpcChannelOptions to control which compression algorithms the
            client advertises in the \c{grpc-accept-encoding} request header and
            is willing to accept in server responses.
        \li Added \l{QGrpcChannelOptions::}{maximumReceiveMessageSize()} and
            \l{QGrpcChannelOptions::}{setMaximumReceiveMessageSize()} to
            QGrpcChannelOptions and QGrpcCallOptions to bound the size of
            incoming messages.
    \endlist

    \section2 Qt GUI Module
    \list
      \li Added indirect rendering support to \l{QRhi}. Buffers of type
          \c IndirectDrawBuffer can now be created, and indirect draw calls
          issued via \l QRhiCommandBuffer.
      \li \l{QRhi} gained the \l{QRhi::}{ShaderDrawParameters} feature flag to query
          support for shader draw parameter built-ins (e.g. \c gl_DrawID).
      \li The \l{QRhi} Vulkan backend now uses \c VK_EXT_device_fault to
          report additional details on device loss.
      \li \l{QAccessibilityHints} gained a \l{QAccessibilityHints}{motionPreference}
          property for reduced-motion accessibility preferences.
      \li \l{QStyleHints} gained \l{QStyleHints}{toolTipWakeUpDelay}, allowing
          applications to query or adjust the delay before a tooltip
          appears.
      \li \l{QImageReader} gained \l{QImageReader::}{effectiveSize()}, which
          returns the image size respecting \l{QImageReader::}{autoTransform()}.
      \li \l{QTextCursor::deletePreviousChar()} (Backspace) now correctly
          handles multi-code-unit emoji sequences.
      \li On Android, pressing the back key now calls \c moveTaskToBack()
          instead of exiting the application.
      \li Added \l{Qt::InputMethodHint::ImhNoFullscreen} to request that
          the input method does not occupy the full screen.
    \endlist

    \section2 Qt HTTP Server Module
    \list
      \li \l{QHttpServerConfiguration} gained
          \l{QHttpServerConfiguration::setMaximumConnections()}{setMaximumConnections()}
          to limit the total number of simultaneous connections, and
          \l{QHttpServerConfiguration::setMaximumConnectionsPerHost()}{setMaximumConnectionsPerHost()}
          to limit connections per IP address.
    \endlist

    \section2 Qt Lottie Animation Module
    \list
      \li Added support for the Lottie
          \l{https://lottiefiles.github.io/lottie-docs/layers/#text-layer}{text layer},
          including glyph path rendering.
      \li Added support for animated dimensions in Lottie
          \l{https://lottiefiles.github.io/lottie-docs/shapes/#ellipse}{ellipse},
          \l{https://lottiefiles.github.io/lottie-docs/shapes/#rectangle}{rectangle},
          and
          \l{https://lottiefiles.github.io/lottie-docs/shapes/#polystar}{polystar}
          shape elements, as well as gradient strokes, layer masks, and the layer Auto Orient
          feature.
      \li Added support for the Lottie
          \l{https://lottiefiles.github.io/lottie-docs/layers/#time-remapping}{time remapping}
          and
          \l{https://lottiefiles.github.io/lottie-docs/breakdown/precomps/#speeding-up-and-slowing-down}{time stretching}
          features.
      \li Introduced \l{LottieVectorImageController} for controlling Lottie
          animation playback in a \l{VectorImage}. The type exposes
          \l{LottieVectorImageController::currentFrame}{currentFrame},
          \l{LottieVectorImageController::frameRate}{frameRate},
          \l{LottieVectorImageController::startFrame}{startFrame}, and
          \l{LottieVectorImageController::endFrame}{endFrame} properties,
          along with playback methods such as
          \l{LottieVectorImageController::play()}{play()},
          \l{LottieVectorImageController::pause()}{pause()}, and
          \l{LottieVectorImageController::gotoAndPlay()}{gotoAndPlay()}.
    \endlist

    \section2 Qt Multimedia Module
    \list
    \endlist

    \section2 Qt Network Module
    \list
      \li Introduced \l{QSslKeyingMaterial} and
          \l{QSslConfiguration::keyingMaterial()} /
          \l{QSslConfiguration::setKeyingMaterial()}{setKeyingMaterial()}
          to expose TLS keying material exporters (RFC 5705).
      \li \l{QHostInfo} gained \l{QHostInfo::}{clearCache()} to flush the
          DNS result cache programmatically.
      \li \l{QHttpHeaders} gained \l{QDataStream} stream operators,
          \l{QHttpHeaders::}{rangeValues()} for parsing the
          \c{Range} header, and
          \l{QHttpHeaders::}{setRangeValues()} for setting
          it. The new \l{QHttpHeaderRange} class represents a single byte
          range within that header.
    \endlist

    \section2 Qt OpenAPI Module
    \list
      \li \l{qt_add_openapi_client()} gained \c GENERATE_DOCUMENTATION,
          \c DOCUMENTATION_OUTPUT_DIRECTORY options to generate Doxygen based
          documentation alongside the client code.
      \li Added support for the
          \l{oneOf}{https://swagger.io/docs/specification/v3_0/data-models/oneof-anyof-allof-not/#oneof}
          schema feature.
      \li Renamed generated model property getters. Q_PROPERTY now exposes
          the same property names as those used in the YAML file.
      \li Generated client API methods are no longer virtual.
    \endlist

    \section2 Qt Positioning Module
    \list
      \li \l{QGeoSatelliteInfo::SatelliteSystem} gained entries for the
          IRNSS and SBAS satellite systems.
    \endlist

    \section2 Qt Protobuf Module
    \list
      \li Qt properties in the generated message classes are now marked with
          the \l{The Property System}{FINAL modifier} by default. This
          enables QML tooling to apply performance optimizations and generate
          more efficient code.
          Use the new option \c GENERATE_NON_FINAL_PROPERTIES
          of \l{qt_add_protobuf}{qt_add_protobuf()} to revert to the old behavior.
    \endlist

    \section2 Qt Qml Module
    \list
        \li Added new method insertRow to QQmlTreemodel to insert rows into
        specific positions in the model.
        \li Added new method moveRows to QQmlTreemodel to rearrange the
        structure of the model.
    \endlist

    \section2 Qt Quick Module
    \list
        \li Added \l{QtQuick.Shapes::ShapePath::strokeGradient}{strokeGradient} property to
            \l{ShapePath}.
    \endlist

    \section2 Qt Quick Controls Module
    \list
      \li Added the \c QtQuick.Controls.Native style.
          \c{import QtQuick.Controls.Native} chooses the best-suited style for
          the platform you compile for at compile time. It therefore combines the
          benefits of compile-time style selection with the possibility to have a
          platform-specific look-and-feel for your application.
      \li \l{ToolTip} gained a \l{ToolTip::}{policy} property to control automatic
          tooltip visibility.
      \li \l{ComboBox} gained a \l{ComboBox::}{highlightOnHover} property.
      \li \l{RangeSlider} gained a \l{RangeSlider::}{crossingEnabled} property to allow or
          prevent the two handles from crossing each other.
      \li \l[QtQuickControls]{Menu} gained a \l{Menu::}{separatorsCollapsible} property.
      \li \l[QtQuickControls]{MenuItem} now displays the keyboard shortcut from an
          associated \l[QtQuickControls]{Action}.
      \li \l {SearchField} now allows navigation with keys if its TextInput is empty.
      \li A subset of the existing \l {TextField} APIs were added to \l
        {SearchField} for convenience: selectTextByMouse, selectedText, selectionStart,
        selectionEnd, cursorPosition, select(), selectWord(), and deselect().

    \endlist

    \section2 Qt Quick Dialogs Module
    \list
    \endlist

    \section2 Qt Quick Effects Module
    \list
    \endlist

    \section2 Qt Quick Test Module
    \list
      \li \l{TestCase}'s \l{TestCase::}{optional} property is deprecated in
          \l{Qt Quick Test}. Use \l{TestCase::}{skip()} instead.
    \endlist

    \section2 Qt Quick 3D Module
    \list
    \endlist

    \section2 Qt Quick 3D XR Module
    \list
    \endlist

    \section2 Qt Quick 3D Physics Module
    \list
    \endlist

    \section2 Qt Quick VectorImage Module
    \list
        \li Added \l{QtQuick.VectorImage::VectorImage::asynchronous}{asynchronous} property for
            loading vector image.
        \li Added \l{QtQuick.VectorImage::VectorImage::status}{status} property for tracking the
            progress of loading the image.
        \li Added \l{QtQuick.VectorImage::VectorImage::retainWhileLoading}{retainWhileLoading}
            to be used in combination with \c asynchronous.
        \li Added \l{QtQuick.VectorImage::VectorImage::generatedItem}{generatedItem} property for
            accessing the generated subtree.
    \endlist

    \section2 Qt Serial Port Module
    \list
    \endlist

    \section2 Qt Serial Bus Module
    \list
    \endlist

    \section2 Qt Sql Module
    \list
    \endlist


    \section2 Qt SVG Module
    \list
      \li Animated SVG files are now supported by \l{QMovie} and
          \l{AnimatedImage}.
    \endlist

    \section2 Qt Test Module
    \list
      \li Benchmark results now include variance and standard deviation
          across measurement backends (time, CPU ticks, events, Valgrind).
      \li The plain-text benchmark logger now formats floating-point
          results using scientific notation for consistency.
      \li When non-existent test functions are specified on the command
          line alongside valid ones, the valid tests are still executed.
    \endlist

    \section2 Qt VirtualKeyboard Module
    \list
    \endlist

    \section2 Qt WebEngine Module
    \list
    \endlist

    \section2 Qt WebView Module
    \list
    \endlist

    \section2 Qt Widgets Module
    \list
      \li \l{QTreeView} gained \l{QTreeView::itemDecorationRect()}, which
          returns the bounding rectangle of the decoration (icon) for a
          given index.
      \li \l{QStyle::StandardPixmap} gained
          \l{QStyle::SP_TabScrollLeftButton},
          \l{QStyle::SP_TabScrollRightButton},
          \l{QStyle::SP_TabScrollUpButton}, and
          \l{QStyle::SP_TabScrollDownButton} for tab bar scroll buttons.
      \li \l{QDialogButtonBox} gained \l{QDialogButtonBox::standardButtonText()}
          and \l{QDialogButtonBox::standardButtonShortcut()}, which return the
          text and the shortcut of a \l{QDialogButtonBox::StandardButton}
          respectively.
      \li On macOS, \l{QMainWindow}'s unified title and toolbar mode has
          been modernized to use effect views for background styling.
    \endlist

    \section2 Qt XML Module
    \list
    \endlist

    \section2 Qt MQTT Module
    \list
    \endlist

    \section1 Tools

    \section2 QDoc Documentation Generator
    \list
    \endlist

    \section2 Qt Linguist
    \list
    \endlist

    \section1 Platform Changes

    \section2 Build System Changes

    \list
    \endlist

    \section2 Desktop Platforms

    \section3 Windows
    \list
    \endlist

    \section3 Linux
    \list
    \endlist

    \section3 macOS
    \list
    \endlist

    \section3 Wayland Client on Linux
    \list
    \endlist

    \section2 Mobile Platforms

    \section3 Android

    \section4 Qt for Android
    \list
        \li Added multi-ABI support for Feature Delivery projects.
    \endlist

    \section4 Qt Quick for Android
    \list
    \endlist

    \section3 iOS
    \list
    \endlist

    \section2 Embedded Platforms

    \section3 Boot to Qt
    \list
    \endlist

    \section3 Real-Time Operating Systems
    \list
    \endlist

    \section1 Modules Deprecated in Qt 6.12

    The following modules are deprecated. We strongly advise against using them
    in new code.

    \list
    \endlist

    For more information about the life-cycle of modules in Qt, see
    \l{https://contribute.qt-project.org/quips/14#deprecating-a-module}{QUIP-14}.

    \section1 List of API Changes

    These pages contain an overview of API changes in Qt 6.12:
    \list
        \li \l {New Classes and Functions in Qt 6.12}
        \li \l {Obsolete Classes}
    \endlist

    \section1 Known Issues

    For information about known issues in Qt 6.12 see
    \l{https://wiki.qt.io/index.php?title=Qt_6.12_Known_Issues}{the Qt Wiki}.
*/

/*!
    \page newclasses612.html
    \title New Classes and Functions in Qt 6.12
    \ingroup whatsnewqt6-api
    \meta sortkey 612
    \brief A list of new APIs in Qt 6.12.

    This page contains a comprehensive list of all new classes and functions
    introduced in Qt 6.12.

    \sincelist 6.12
*/
