aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-04-30 18:30:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-04-30 18:30:36 -0400
commit3565aad630864ecdbe53fdaa501ea708555b3c7c (patch)
treec743e4ad0bad39ebdb2f514c7cc52d34a257ebbe /SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp
parent1fdc150116cad39aae5c5da407c3312b47a59e3a (diff)
New upstream version 3.4.4+dfsg.upstream/3.4.4+dfsg
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.cpp18
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());
}