mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-23 10:39:56 +00:00
Replace yahoo finance to stooq (#131)
Old code is dropped to separated provider
This commit is contained in:
@ -59,9 +59,8 @@ QString AWScriptFormatter::convert(const QVariant &_value) const
|
||||
QJSValue result = fn.call(args);
|
||||
|
||||
if (result.isError()) {
|
||||
qCWarning(LOG_LIB) << "Uncaught exception at line"
|
||||
<< result.property("lineNumber").toInt() << ":"
|
||||
<< result.toString();
|
||||
qCWarning(LOG_LIB) << "Uncaught exception at line" << result.property("lineNumber").toInt()
|
||||
<< ":" << result.toString();
|
||||
return "";
|
||||
} else {
|
||||
return result.toString();
|
||||
@ -69,13 +68,11 @@ QString AWScriptFormatter::convert(const QVariant &_value) const
|
||||
}
|
||||
|
||||
|
||||
AWScriptFormatter *AWScriptFormatter::copy(const QString &_fileName,
|
||||
const int _number)
|
||||
AWScriptFormatter *AWScriptFormatter::copy(const QString &_fileName, const int _number)
|
||||
{
|
||||
qCDebug(LOG_LIB) << "File" << _fileName << "with number" << _number;
|
||||
|
||||
AWScriptFormatter *item
|
||||
= new AWScriptFormatter(static_cast<QWidget *>(parent()), _fileName);
|
||||
AWScriptFormatter *item = new AWScriptFormatter(static_cast<QWidget *>(parent()), _fileName);
|
||||
AWAbstractFormatter::copyDefaults(item);
|
||||
item->setAppendCode(appendCode());
|
||||
item->setCode(code());
|
||||
@ -160,10 +157,8 @@ int AWScriptFormatter::showConfiguration(const QVariant &_args)
|
||||
ui->lineEdit_name->setText(name());
|
||||
ui->lineEdit_comment->setText(comment());
|
||||
ui->label_typeValue->setText("Script");
|
||||
ui->checkBox_appendCode->setCheckState(appendCode() ? Qt::Checked
|
||||
: Qt::Unchecked);
|
||||
ui->checkBox_hasReturn->setCheckState(hasReturn() ? Qt::Checked
|
||||
: Qt::Unchecked);
|
||||
ui->checkBox_appendCode->setCheckState(appendCode() ? Qt::Checked : Qt::Unchecked);
|
||||
ui->checkBox_hasReturn->setCheckState(hasReturn() ? Qt::Checked : Qt::Unchecked);
|
||||
ui->textEdit_code->setPlainText(code());
|
||||
|
||||
int ret = exec();
|
||||
|
Reference in New Issue
Block a user