mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-09 20:05:51 +00:00
more tests for formatters
This commit is contained in:
@ -116,6 +116,7 @@ void AWScriptFormatter::setAppendCode(const bool _appendCode)
|
||||
qCDebug(LOG_LIB) << "Set append code" << _appendCode;
|
||||
|
||||
m_appendCode = _appendCode;
|
||||
initProgram();
|
||||
}
|
||||
|
||||
|
||||
@ -124,6 +125,7 @@ void AWScriptFormatter::setCode(const QString _code)
|
||||
qCDebug(LOG_LIB) << "Set code" << _code;
|
||||
|
||||
m_code = _code;
|
||||
initProgram();
|
||||
}
|
||||
|
||||
|
||||
@ -132,6 +134,7 @@ void AWScriptFormatter::setHasReturn(const bool _hasReturn)
|
||||
qCDebug(LOG_LIB) << "Set has return" << _hasReturn;
|
||||
|
||||
m_hasReturn = _hasReturn;
|
||||
initProgram();
|
||||
}
|
||||
|
||||
|
||||
@ -150,9 +153,6 @@ void AWScriptFormatter::readConfiguration()
|
||||
settings.endGroup();
|
||||
|
||||
bumpApi(AWEFAPI);
|
||||
|
||||
// init JS code
|
||||
initProgram();
|
||||
}
|
||||
|
||||
|
||||
@ -204,6 +204,7 @@ void AWScriptFormatter::writeConfiguration() const
|
||||
|
||||
void AWScriptFormatter::initProgram()
|
||||
{
|
||||
// init JS code
|
||||
if (m_appendCode)
|
||||
m_program
|
||||
= QString("(function(value) { %1%2 })")
|
||||
|
Reference in New Issue
Block a user