From 3565aad630864ecdbe53fdaa501ea708555b3c7c Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sun, 30 Apr 2023 18:30:36 -0400 Subject: New upstream version 3.4.4+dfsg. --- .../guiSQLiteStudio/windows/functionseditormodel.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp') diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp index 8d6d87c..46ae8d9 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp @@ -28,7 +28,7 @@ FunctionsEditorModel::FunctionsEditorModel(QObject *parent) : void FunctionsEditorModel::clearModified() { beginResetModel(); - for (Function* func : functionList) + for (Function*& func : functionList) func->modified = false; listModified = false; @@ -170,6 +170,16 @@ bool FunctionsEditorModel::isScalar(int row) const GETTER(functionList[row]->data.type == FunctionManager::ScriptFunction::SCALAR, false); } +void FunctionsEditorModel::setDeterministic(int row, bool value) +{ + SETTER(functionList[row]->data.deterministic, value); +} + +bool FunctionsEditorModel::isDeterministic(int row) const +{ + GETTER(functionList[row]->data.deterministic, false); +} + QStringList FunctionsEditorModel::getArguments(int row) const { GETTER(functionList[row]->data.arguments, QStringList()); @@ -194,7 +204,7 @@ void FunctionsEditorModel::setData(const QList { beginResetModel(); - for (Function* functionPtr : functionList) + for (Function*& functionPtr : functionList) delete functionPtr; functionList.clear(); @@ -259,7 +269,7 @@ void FunctionsEditorModel::validateNames() StrHash> counter; int row = 0; - for (Function* func : functionList) + for (Function*& func : functionList) { func->valid &= true; counter[func->data.name] << row++; @@ -322,7 +332,7 @@ QVariant FunctionsEditorModel::data(const QModelIndex& index, int role) const void FunctionsEditorModel::init() { - for (ScriptingPlugin* plugin : PLUGINS->getLoadedPlugins()) + for (ScriptingPlugin*& plugin : PLUGINS->getLoadedPlugins()) langToIcon[plugin->getLanguage()] = QIcon(plugin->getIconPath()); } -- cgit v1.2.3