From 5ca7d22e8a8c56e21e74f01f8012c94532cab30b Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 30 Jan 2020 11:40:11 +0100 Subject: Add copy constructor for alias --- node/listaliasnode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'node/listaliasnode.cpp') diff --git a/node/listaliasnode.cpp b/node/listaliasnode.cpp index 8673e9d..a8e4125 100644 --- a/node/listaliasnode.cpp +++ b/node/listaliasnode.cpp @@ -20,7 +20,7 @@ *************************************************************************/ #include "listaliasnode.h" -ListAliasNode::ListAliasNode(QList* apAlias) : m_aliasList(apAlias) +ListAliasNode::ListAliasNode(const QList& apAlias) : m_aliasList(apAlias) { m_result= new StringResult(); } @@ -46,7 +46,7 @@ void ListAliasNode::run(ExecutionNode* previous) QString ListAliasNode::buildList() const { QString result(QObject::tr("List of Alias:\n")); - for(auto& key : *m_aliasList) + for(auto& key : m_aliasList) { result+= QString("%1 : %2 # %3\n").arg(key->getCommand(), key->getValue(), key->getComment()); } @@ -55,7 +55,7 @@ QString ListAliasNode::buildList() const QString ListAliasNode::toString(bool wl) const { QStringList resultList; - for(auto& key : *m_aliasList) + for(auto& key : m_aliasList) { resultList << "{" << key->getCommand() << key->getValue() << "}"; } -- cgit v1.2.3-70-g09d2