use overloaded constructors to create tests

This commit is contained in:
2016-05-19 16:28:19 +03:00
parent f717c984b7
commit e71da9bdfb
20 changed files with 29 additions and 90 deletions

View File

@ -34,24 +34,8 @@ AWScriptFormatter::AWScriptFormatter(QWidget *parent, const QString filePath)
{
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
readConfiguration();
ui->setupUi(this);
translate();
}
AWScriptFormatter::AWScriptFormatter(const bool appendCode, const QString code,
const bool hasReturn, QWidget *parent)
: AWAbstractFormatter(parent)
, ui(new Ui::AWScriptFormatter)
{
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
setAppendCode(appendCode);
setCode(code);
setHasReturn(hasReturn);
initProgram();
if (!filePath.isEmpty())
readConfiguration();
ui->setupUi(this);
translate();
}