diff options
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
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<FunctionManager::ScriptFunction*> { beginResetModel(); - for (Function* functionPtr : functionList) + for (Function*& functionPtr : functionList) delete functionPtr; functionList.clear(); @@ -259,7 +269,7 @@ void FunctionsEditorModel::validateNames() StrHash<QList<int>> 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<ScriptingPlugin>()) + for (ScriptingPlugin*& plugin : PLUGINS->getLoadedPlugins<ScriptingPlugin>()) langToIcon[plugin->getLanguage()] = QIcon(plugin->getIconPath()); } |
