massive changes inside

* use pass by ref instead of by value if possible
* use reference in interation over collections
* fix no tag inserting
This commit is contained in:
2017-05-04 15:00:50 +03:00
parent 6e99e262d4
commit 6e62ceaac7
119 changed files with 645 additions and 634 deletions

View File

@ -27,7 +27,7 @@
#include "awdebug.h"
AWJsonFormatter::AWJsonFormatter(QWidget *parent, const QString filePath)
AWJsonFormatter::AWJsonFormatter(QWidget *parent, const QString &filePath)
: AWAbstractFormatter(parent, filePath)
, ui(new Ui::AWJsonFormatter)
{
@ -65,7 +65,7 @@ QString AWJsonFormatter::convert(const QVariant &_value) const
}
AWJsonFormatter *AWJsonFormatter::copy(const QString _fileName,
AWJsonFormatter *AWJsonFormatter::copy(const QString &_fileName,
const int _number)
{
qCDebug(LOG_LIB) << "File" << _fileName << "with number" << _number;
@ -86,7 +86,7 @@ QString AWJsonFormatter::path() const
}
void AWJsonFormatter::setPath(const QString _path)
void AWJsonFormatter::setPath(const QString &_path)
{
qCDebug(LOG_LIB) << "Path" << _path;
@ -109,7 +109,7 @@ void AWJsonFormatter::readConfiguration()
}
int AWJsonFormatter::showConfiguration(const QVariant args)
int AWJsonFormatter::showConfiguration(const QVariant &args)
{
Q_UNUSED(args)
@ -190,10 +190,7 @@ void AWJsonFormatter::initPath()
for (auto &element : splittedByDot) {
bool ok;
int number = element.toInt(&ok);
if (ok)
m_splittedPath.append(number);
else
m_splittedPath.append(element);
m_splittedPath.append(ok ? QVariant(number) : QVariant(element));
}
}