aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2019-05-06 23:56:41 +0300
committerOrgad Shaneh <orgads@gmail.com>2019-05-09 14:13:16 +0000
commitc8f0d3f008953a9a50129bb4641c2b31da6788a4 (patch)
treea9dbc88131caaa58b743898f941bfe1a306617bf /src/libs/qmljs
parent5cf087ac5d9ff2f7a8b1531fa5c34bd8a714c365 (diff)
QmlJS: Fix inconsistent copy ctor/operator=
Detected by GCC9. Change-Id: Ieab7c13c6d66b99cc679c3ac5d4a3da67bcd7767 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/libs/qmljs')
-rw-r--r--src/libs/qmljs/persistenttrie.cpp1
-rw-r--r--src/libs/qmljs/persistenttrie.h1
-rw-r--r--src/libs/qmljs/qmljsbundle.cpp5
-rw-r--r--src/libs/qmljs/qmljsbundle.h1
-rw-r--r--src/libs/qmljs/qmljsdialect.h6
-rw-r--r--src/libs/qmljs/qmljsdocument.cpp8
-rw-r--r--src/libs/qmljs/qmljsdocument.h1
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp10
-rw-r--r--src/libs/qmljs/qmljsinterpreter.h1
9 files changed, 11 insertions, 23 deletions
diff --git a/src/libs/qmljs/persistenttrie.cpp b/src/libs/qmljs/persistenttrie.cpp
index f3be5a48ca..08c17dd164 100644
--- a/src/libs/qmljs/persistenttrie.cpp
+++ b/src/libs/qmljs/persistenttrie.cpp
@@ -545,7 +545,6 @@ QDebug &operator<<(QDebug &dbg, const Trie &trie)
}
Trie::Trie() {}
Trie::Trie(const TrieNode::Ptr &trie) : trie(trie) {}
-Trie::Trie(const Trie &o) : trie(o.trie){}
QStringList Trie::complete(const QString &root, const QString &base,
LookupFlags flags) const
diff --git a/src/libs/qmljs/persistenttrie.h b/src/libs/qmljs/persistenttrie.h
index 35ab652967..184525b13e 100644
--- a/src/libs/qmljs/persistenttrie.h
+++ b/src/libs/qmljs/persistenttrie.h
@@ -79,7 +79,6 @@ class QMLJS_EXPORT Trie
public:
Trie();
Trie(const TrieNode::Ptr &t);
- Trie(const Trie &o);
QStringList complete(const QString &root, const QString &base = QString(),
LookupFlags flags = LookupFlags(CaseInsensitive|Partial)) const;
diff --git a/src/libs/qmljs/qmljsbundle.cpp b/src/libs/qmljs/qmljsbundle.cpp
index ec46379f2c..9789d37492 100644
--- a/src/libs/qmljs/qmljsbundle.cpp
+++ b/src/libs/qmljs/qmljsbundle.cpp
@@ -35,11 +35,6 @@
namespace QmlJS {
typedef PersistentTrie::Trie Trie;
-QmlBundle::QmlBundle(const QmlBundle &o)
- : m_name(o.m_name), m_searchPaths(o.searchPaths()), m_installPaths(o.installPaths()),
- m_supportedImports(o.m_supportedImports), m_implicitImports(o.m_implicitImports)
-{ }
-
QmlBundle::QmlBundle()
{ }
diff --git a/src/libs/qmljs/qmljsbundle.h b/src/libs/qmljs/qmljsbundle.h
index 0bf00ab755..8057abc6d7 100644
--- a/src/libs/qmljs/qmljsbundle.h
+++ b/src/libs/qmljs/qmljsbundle.h
@@ -51,7 +51,6 @@ class QMLJS_EXPORT QmlBundle
{
typedef PersistentTrie::Trie Trie;
public:
- QmlBundle(const QmlBundle &o);
QmlBundle();
QmlBundle(const QString &name,
const Trie &searchPaths,
diff --git a/src/libs/qmljs/qmljsdialect.h b/src/libs/qmljs/qmljsdialect.h
index 8d1ca30deb..2832eca341 100644
--- a/src/libs/qmljs/qmljsdialect.h
+++ b/src/libs/qmljs/qmljsdialect.h
@@ -79,9 +79,6 @@ QMLJS_EXPORT QDebug operator << (QDebug &dbg, const Dialect &dialect);
class QMLJS_EXPORT PathAndLanguage {
public:
PathAndLanguage(const Utils::FileName &path = Utils::FileName(), Dialect language = Dialect::AnyLanguage);
- PathAndLanguage(const PathAndLanguage &o)
- : m_path(o.path()), m_language(o.language())
- { }
Utils::FileName path() const {
return m_path;
}
@@ -130,9 +127,6 @@ public:
explicit PathsAndLanguages(const QList<PathAndLanguage> &list)
: m_list(list)
{ }
- PathsAndLanguages(const PathsAndLanguages &o)
- : m_list(o.m_list)
- { }
bool maybeInsert(const Utils::FileName &path, Dialect language = Dialect::AnyLanguage) {
return maybeInsert(PathAndLanguage(path, language));
diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp
index a4551b1c1c..6ebe5b0b2f 100644
--- a/src/libs/qmljs/qmljsdocument.cpp
+++ b/src/libs/qmljs/qmljsdocument.cpp
@@ -458,14 +458,6 @@ Snapshot::~Snapshot()
{
}
-Snapshot::Snapshot(const Snapshot &o)
- : _documents(o._documents),
- _documentsByPath(o._documentsByPath),
- _libraries(o._libraries),
- _dependencies(o._dependencies)
-{
-}
-
void Snapshot::insert(const Document::Ptr &document, bool allowInvalid)
{
if (document && (allowInvalid || document->qmlProgram() || document->jsProgram())) {
diff --git a/src/libs/qmljs/qmljsdocument.h b/src/libs/qmljs/qmljsdocument.h
index 4029373992..82df720776 100644
--- a/src/libs/qmljs/qmljsdocument.h
+++ b/src/libs/qmljs/qmljsdocument.h
@@ -230,7 +230,6 @@ class QMLJS_EXPORT Snapshot
public:
Snapshot();
- Snapshot(const Snapshot &o);
~Snapshot();
typedef Base::iterator iterator;
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 03083501b6..91f195f8fc 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -2340,6 +2340,16 @@ Import::Import(const Import &other)
valid(other.valid), used(false)
{ }
+Import &Import::operator=(const Import &other)
+{
+ object = other.object;
+ info = other.info;
+ libraryPath = other.libraryPath;
+ valid = other.valid;
+ used = false;
+ return *this;
+}
+
TypeScope::TypeScope(const Imports *imports, ValueOwner *valueOwner)
: ObjectValue(valueOwner)
, m_imports(imports)
diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h
index 9da1aa8635..f2e953180c 100644
--- a/src/libs/qmljs/qmljsinterpreter.h
+++ b/src/libs/qmljs/qmljsinterpreter.h
@@ -1038,6 +1038,7 @@ class QMLJS_EXPORT Import {
public:
Import();
Import(const Import &other);
+ Import &operator=(const Import &other);
// const!
ObjectValue *object;