Add seperate actions for adding and removing connection groups.
This commit is contained in:
parent
dbb6e1ab01
commit
521d3cdaac
10 changed files with 105 additions and 4 deletions
|
|
@ -60,6 +60,9 @@ public:
|
|||
/** Save changed config, group is not allowed to change
|
||||
*/
|
||||
void save(const ConnectionConfig &cc);
|
||||
/// Create a new group in the DB and place in the tree
|
||||
std::variant<int, QSqlError> addGroup(QString group_name);
|
||||
std::optional<QSqlError> removeGroup(int row);
|
||||
private:
|
||||
using Groups = QVector<std::shared_ptr<ConnectionGroup>>;
|
||||
|
||||
|
|
@ -71,9 +74,6 @@ private:
|
|||
std::tuple<int, int> findConfig(const QUuid uuid) const;
|
||||
int findGroup(QString name) const;
|
||||
|
||||
/// Create a new group in the DB and place in the tree
|
||||
/// dataChanged is sent by this function
|
||||
std::variant<int, QSqlError> addGroup(QString group_name);
|
||||
std::optional<QSqlError> saveToDb(const ConnectionConfig &cc);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue