aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-01-16 01:58:22 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2025-01-16 01:58:22 -0500
commita5ae79be08125b31bb6b8d9703090a98c6fd2e30 (patch)
tree569ee612c9de85b2bb423efa485688ef1d43852e /SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h
parent21966b4f924b0a1933d9662e75ff253bd154fdb7 (diff)
parent81a21e6ce040e7740de86340c8ea4dba30e69bc3 (diff)
Update upstream source from tag 'upstream/3.4.13+dfsg'
Update to upstream version '3.4.13+dfsg' with Debian dir bf81ee0219cb8e4562a4751df17d75814772d2d6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h
index 7caf06c..2f90bcc 100644
--- a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h
+++ b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditormodel.h
@@ -60,17 +60,28 @@ class GUI_API_EXPORT FunctionsEditorModel : public QAbstractListModel
QList<FunctionManager::ScriptFunction*> generateFunctions() const;
QStringList getFunctionNames() const;
void validateNames();
- bool isAllowedName(int rowToSkip, const QString& nameToValidate);
+ bool isAllowedName(int rowToSkip, const QString& nameToValidate, const QStringList &argList, bool undefinedArgs);
bool isValidRowIndex(int row) const;
int rowCount(const QModelIndex& parent = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role) const;
private:
+ struct UniqueFunctionName
+ {
+ QString name;
+ QStringList arguments;
+ bool undefArg;
+
+ int argCount() const;
+ bool operator==(const UniqueFunctionName& other) const;
+ };
+
struct Function
{
Function();
Function(FunctionManager::ScriptFunction* other);
+ UniqueFunctionName toUniqueName() const;
FunctionManager::ScriptFunction data;
bool modified = false;
@@ -80,6 +91,9 @@ class GUI_API_EXPORT FunctionsEditorModel : public QAbstractListModel
void init();
void emitDataChanged(int row);
+ QList<UniqueFunctionName> getUniqueFunctionNames() const;
+
+ friend int qHash(FunctionsEditorModel::UniqueFunctionName fnName);
QList<Function*> functionList;
@@ -96,4 +110,6 @@ class GUI_API_EXPORT FunctionsEditorModel : public QAbstractListModel
bool listModified = false;
};
+int qHash(FunctionsEditorModel::UniqueFunctionName fnName);
+
#endif // FUNCTIONSEDITORMODEL_H