forked from qt-creator/qt-creator
QmlJS: fix operator << of Trie to QDebug
Change-Id: I0a540c7b1842fff9652a7ced01697eae2e90b0e0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user