diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-01-26 16:10:11 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-01-28 13:00:21 -0800 |
commit | 77923604130057261bf774b5cc32d849a595a1f0 (patch) | |
tree | d85f618e77996e09c2a5227c58a19d05af7b4e6d /src | |
parent | 55a88206f3114eb13c9b1a26279a31a1838bbd94 (diff) |
QVersionNumber: remove "pure" declaration from fromString()
GCC doesn't like that we modify the contents of passed by pointer in the
pure function. Reading the description of this attribute in the GCC
manual was ambiguous then, but I can see the GCC maintainers'
interpretation.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104243
Fixes: QTBUG-62185
Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16cdf815d059d252
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qversionnumber.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qversionnumber.h b/src/corelib/tools/qversionnumber.h index e72e4efc23..24de456005 100644 --- a/src/corelib/tools/qversionnumber.h +++ b/src/corelib/tools/qversionnumber.h @@ -283,7 +283,7 @@ public: [[nodiscard]] Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber commonPrefix(const QVersionNumber &v1, const QVersionNumber &v2); [[nodiscard]] Q_CORE_EXPORT QString toString() const; - [[nodiscard]] Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber fromString(QAnyStringView string, qsizetype *suffixIndex = nullptr); + [[nodiscard]] Q_CORE_EXPORT static QVersionNumber fromString(QAnyStringView string, qsizetype *suffixIndex = nullptr); #if QT_DEPRECATED_SINCE(6, 4) && QT_POINTER_SIZE != 4 Q_WEAK_OVERLOAD @@ -305,9 +305,9 @@ public: #endif #if QT_REMOVED_SINCE(6, 4) - [[nodiscard]] Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber fromString(const QString &string, int *suffixIndex); - [[nodiscard]] Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber fromString(QLatin1String string, int *suffixIndex); - [[nodiscard]] Q_CORE_EXPORT static Q_DECL_PURE_FUNCTION QVersionNumber fromString(QStringView string, int *suffixIndex); + [[nodiscard]] Q_CORE_EXPORT static QVersionNumber fromString(const QString &string, int *suffixIndex); + [[nodiscard]] Q_CORE_EXPORT static QVersionNumber fromString(QLatin1String string, int *suffixIndex); + [[nodiscard]] Q_CORE_EXPORT static QVersionNumber fromString(QStringView string, int *suffixIndex); #endif [[nodiscard]] friend bool operator> (const QVersionNumber &lhs, const QVersionNumber &rhs) noexcept |