aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-05-26 16:57:36 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-08-12 08:28:16 +0000
commited27157ca9a2c482bcfc79cf1f6f0e496b6a947c (patch)
treecd5766134385ddb252dc53af00c363fbe317cd88
parentfed6a01e61e460e14f17b79fff9bf27fbb33dd48 (diff)
Fix -Wdeprecated-copy warnings
Mostly by avoiding custom functions when the compiler generated ones work just fine (cherry-picked from commit f28b48b90e3230d1ce6bbcd5031ecb50089ec12b) Fixes: QTBUG-85998 Change-Id: If8152fd24c9084bd85be3741fc218709e50fc375 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/3rdparty/masm/stubs/wtf/Vector.h1
-rw-r--r--src/3rdparty/masm/wtf/CheckedArithmetic.h3
-rw-r--r--src/3rdparty/masm/wtf/PageBlock.h8
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h8
-rw-r--r--src/qml/qml/qqmltypenamecache_p.h6
5 files changed, 6 insertions, 20 deletions
diff --git a/src/3rdparty/masm/stubs/wtf/Vector.h b/src/3rdparty/masm/stubs/wtf/Vector.h
index 2fead9f6ba..cee647a4b5 100644
--- a/src/3rdparty/masm/stubs/wtf/Vector.h
+++ b/src/3rdparty/masm/stubs/wtf/Vector.h
@@ -55,7 +55,6 @@ class Vector : public std::vector<T> {
public:
Vector() {}
Vector(int initialSize) : std::vector<T>(initialSize) {}
- Vector(const Vector &other) : std::vector<T>(other) {}
Vector(std::initializer_list<T> list) : std::vector<T>(list) {}
inline void append(const T& value)
diff --git a/src/3rdparty/masm/wtf/CheckedArithmetic.h b/src/3rdparty/masm/wtf/CheckedArithmetic.h
index dd4acbb9b5..7d36ca5c28 100644
--- a/src/3rdparty/masm/wtf/CheckedArithmetic.h
+++ b/src/3rdparty/masm/wtf/CheckedArithmetic.h
@@ -430,6 +430,9 @@ public:
{
}
+ Checked(const Checked &) = default;
+
+
Checked(ResultOverflowedTag)
: m_value(0)
{
diff --git a/src/3rdparty/masm/wtf/PageBlock.h b/src/3rdparty/masm/wtf/PageBlock.h
index 4d408e1c91..09e4048239 100644
--- a/src/3rdparty/masm/wtf/PageBlock.h
+++ b/src/3rdparty/masm/wtf/PageBlock.h
@@ -37,7 +37,6 @@ inline bool isPowerOfTwo(size_t size) { return !(size & (size - 1)); }
class PageBlock {
public:
PageBlock();
- PageBlock(const PageBlock&);
PageBlock(void*, size_t, bool hasGuardPages);
void* realBase() const { return m_realBase; }
@@ -69,13 +68,6 @@ inline PageBlock::PageBlock()
{
}
-inline PageBlock::PageBlock(const PageBlock& other)
- : m_realBase(other.m_realBase)
- , m_base(other.m_base)
- , m_size(other.m_size)
-{
-}
-
inline PageBlock::PageBlock(void* base, size_t size, bool hasGuardPages)
: m_realBase(base)
, m_base(static_cast<char*>(base) + ((base && hasGuardPages) ? pageSize() : 0))
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 12a6381e6f..beb8315225 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -172,6 +172,9 @@ private:
struct ScopedValue
{
+ ScopedValue(const ScopedValue &) = default;
+ ScopedValue(ScopedValue &&) = default;
+
ScopedValue(const Scope &scope)
{
ptr = scope.alloc<Scope::Uninitialized>();
@@ -381,11 +384,6 @@ struct Scoped
return *this;
}
- Scoped<T> &operator=(const Scoped<T> &other) {
- *ptr = *other.ptr;
- return *this;
- }
-
Scoped<T> &operator=(T *t) {
setPointer(t);
return *this;
diff --git a/src/qml/qml/qqmltypenamecache_p.h b/src/qml/qml/qqmltypenamecache_p.h
index b98fe77ed5..41cb61a9ac 100644
--- a/src/qml/qml/qqmltypenamecache_p.h
+++ b/src/qml/qml/qqmltypenamecache_p.h
@@ -98,7 +98,6 @@ public:
inline Result(const QQmlImportRef *importNamespace);
inline Result(const QQmlType &type);
inline Result(int scriptIndex);
- inline Result(const Result &);
inline bool isValid() const;
@@ -182,11 +181,6 @@ QQmlTypeNameCache::Result::Result(int scriptIndex)
{
}
-QQmlTypeNameCache::Result::Result(const Result &o)
-: type(o.type), importNamespace(o.importNamespace), scriptIndex(o.scriptIndex)
-{
-}
-
bool QQmlTypeNameCache::Result::isValid() const
{
return type.isValid() || importNamespace || scriptIndex != -1;