QmlJS: fix operator << of Trie to QDebug

Change-Id: I0a540c7b1842fff9652a7ced01697eae2e90b0e0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Fawzi Mohamed
2020-09-29 09:51:29 +02:00
parent bb7b08eeae
commit eddf2bead8
2 changed files with 6 additions and 6 deletions

View File

@@ -526,14 +526,14 @@ QDebug &TrieNode::describe(QDebug &dbg, const TrieNode::Ptr &trie,
return dbg; return dbg;
} }
QDebug &operator<<(QDebug &dbg, const TrieNode::Ptr &trie) QDebug operator<<(QDebug dbg, const TrieNode::Ptr &trie)
{ {
dbg.nospace()<<"Trie{\n"; dbg.nospace()<<"Trie{\n";
TrieNode::describe(dbg,trie,0); TrieNode::describe(dbg,trie,0);
dbg << "}"; dbg << "}";
return dbg.space(); return dbg.space();
} }
QDebug &operator<<(QDebug &dbg, const Trie &trie) QDebug operator<<(QDebug dbg, const Trie &trie)
{ {
dbg.nospace()<<"Trie{\n"; dbg.nospace()<<"Trie{\n";
TrieNode::describe(dbg,trie.trie,0); TrieNode::describe(dbg,trie.trie,0);

View File

@@ -98,8 +98,8 @@ public:
bool operator==(const Trie &o); bool operator==(const Trie &o);
bool operator!=(const Trie &o); bool operator!=(const Trie &o);
friend QMLJS_EXPORT QDebug &operator<<(QDebug &dbg, const TrieNode::Ptr &trie); friend QMLJS_EXPORT QDebug operator<<(QDebug dbg, const TrieNode::Ptr &trie);
friend QMLJS_EXPORT QDebug &operator<<(QDebug &dbg, const Trie &trie); friend QMLJS_EXPORT QDebug operator<<(QDebug dbg, const Trie &trie);
TrieNode::Ptr trie; TrieNode::Ptr trie;
}; };
@@ -120,8 +120,8 @@ template <typename T> void enumerateTrieNode(const TrieNode::Ptr &trie, T &t,
QMLJS_EXPORT int matchStrength(const QString &searchStr, const QString &str); QMLJS_EXPORT int matchStrength(const QString &searchStr, const QString &str);
QMLJS_EXPORT QStringList matchStrengthSort(const QString &searchString, QStringList &res); QMLJS_EXPORT QStringList matchStrengthSort(const QString &searchString, QStringList &res);
QMLJS_EXPORT QDebug &operator<<(QDebug &dbg, const TrieNode::Ptr &trie); QMLJS_EXPORT QDebug operator<<(QDebug dbg, const TrieNode::Ptr &trie);
QMLJS_EXPORT QDebug &operator<<(QDebug &dbg, const Trie &trie); QMLJS_EXPORT QDebug operator<<(QDebug dbg, const Trie &trie);
} // end namespace PersistentTrie } // end namespace PersistentTrie
} // end namespace QmlJS } // end namespace QmlJS