diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/itemmodels/qrangemodel_impl.h | 16 | ||||
| -rw-r--r-- | src/gui/configure.cmake | 7 | ||||
| -rw-r--r-- | src/gui/text/qrawfont.cpp | 9 | ||||
| -rw-r--r-- | src/gui/text/qrawfont.h | 13 |
4 files changed, 27 insertions, 18 deletions
diff --git a/src/corelib/itemmodels/qrangemodel_impl.h b/src/corelib/itemmodels/qrangemodel_impl.h index 55c7930cc36..96dacda0260 100644 --- a/src/corelib/itemmodels/qrangemodel_impl.h +++ b/src/corelib/itemmodels/qrangemodel_impl.h @@ -238,14 +238,16 @@ namespace QRangeModelDetails : std::true_type {}; - // we use std::rotate in moveRows/Columns, which requires std::swap + // we use std::rotate in moveRows/Columns, which requires std::swap and the + // iterators to be at least a forward iterator template <typename It, typename = void> struct test_rotate : std::false_type {}; template <typename It> struct test_rotate<It, std::void_t<decltype(std::swap(*std::declval<It>(), *std::declval<It>()))>> - : std::true_type + : std::is_base_of<std::forward_iterator_tag, + typename std::iterator_traits<It>::iterator_category> {}; template <typename C, typename = void> @@ -512,8 +514,12 @@ namespace QRangeModelDetails using row_type = typename range_traits<QRangeModelDetails::wrapped_t<Range>>::value_type; template <typename R = row_type, - std::enable_if_t<std::conjunction_v<std::is_destructible<wrapped_t<R>>, - is_owning_or_raw_pointer<R>>, bool> = true> + std::enable_if_t< + std::conjunction_v< + std::is_destructible<QRangeModelDetails::wrapped_t<R>>, + is_owning_or_raw_pointer<R> + >, + bool> = true> auto newRow() -> decltype(R(new QRangeModelDetails::wrapped_t<R>)) { if constexpr (is_any_of<R, std::shared_ptr>()) return std::make_shared<QRangeModelDetails::wrapped_t<R>>(); @@ -587,7 +593,7 @@ namespace QRangeModelDetails template <typename P, typename R> using protocol_mutable_childRows_test = decltype(refTo(std::declval<P&>() - .childRows(std::declval<wrapped_t<R>&>())) = {}); + .childRows(std::declval<QRangeModelDetails::wrapped_t<R>&>())) = {}); template <typename P, typename R> using protocol_mutable_childRows = qxp::is_detected<protocol_mutable_childRows_test, P, R>; diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index b14f7e74ad2..e34f4d8b30a 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -28,8 +28,11 @@ set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system) #### Libraries -qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS OR - HURD) +if(LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS OR HURD) + set(X11_SUPPORTED 1) +else() + set(X11_SUPPORTED 0) +endif() qt_feature_vcpkg_scope(gui) qt_find_package(ATSPI2 MODULE PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_LIB atspi) qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb) diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index 9eb3b62443c..7acc3c5218c 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -554,7 +554,6 @@ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *g } /*! - \fn QList<QPointF> QRawFont::advancesForGlyphIndexes(const QList<quint32> &glyphIndexes, LayoutFlags layoutFlags) const \since 5.1 Returns the QRawFont's advances for each of the \a glyphIndexes in pixel units. The advances @@ -570,6 +569,14 @@ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *g \sa QTextLine::horizontalAdvance(), QFontMetricsF::horizontalAdvance(), QTextLayout::glyphRuns() */ +QList<QPointF> QRawFont::advancesForGlyphIndexes(const QList<quint32> &glyphIndexes, QRawFont::LayoutFlags layoutFlags) const +{ + QList<QPointF> advances(glyphIndexes.size()); + if (advancesForGlyphIndexes(glyphIndexes.constData(), advances.data(), int(glyphIndexes.size()), layoutFlags)) + return advances; + return QList<QPointF>(); +} + /*! \fn QList<QPointF> QRawFont::advancesForGlyphIndexes(const QList<quint32> &glyphIndexes) const diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h index d0bed84a68a..f13f04ebe37 100644 --- a/src/gui/text/qrawfont.h +++ b/src/gui/text/qrawfont.h @@ -65,8 +65,8 @@ public: QList<quint32> glyphIndexesForString(const QString &text) const; inline QList<QPointF> advancesForGlyphIndexes(const QList<quint32> &glyphIndexes) const; - inline QList<QPointF> advancesForGlyphIndexes(const QList<quint32> &glyphIndexes, - LayoutFlags layoutFlags) const; + QList<QPointF> advancesForGlyphIndexes(const QList<quint32> &glyphIndexes, + LayoutFlags layoutFlags) const; bool glyphIndexesForChars(const QChar *chars, int numChars, quint32 *glyphIndexes, int *numGlyphs) const; bool advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs) const; bool advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs, LayoutFlags layoutFlags) const; @@ -128,14 +128,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QRawFont::LayoutFlags) Q_GUI_EXPORT size_t qHash(const QRawFont &font, size_t seed = 0) noexcept; -inline QList<QPointF> QRawFont::advancesForGlyphIndexes(const QList<quint32> &glyphIndexes, - QRawFont::LayoutFlags layoutFlags) const -{ - QList<QPointF> advances(glyphIndexes.size()); - if (advancesForGlyphIndexes(glyphIndexes.constData(), advances.data(), int(glyphIndexes.size()), layoutFlags)) - return advances; - return QList<QPointF>(); -} + inline QList<QPointF> QRawFont::advancesForGlyphIndexes(const QList<quint32> &glyphIndexes) const { |
