Fix crash when starting to add connection.

Caused by uninitialized variable. Commit contains some minor style fixes also.
This commit is contained in:
eelke 2019-09-02 16:33:13 +02:00
parent 7f88b98cdd
commit bcfd82c27d
5 changed files with 32 additions and 27 deletions

View file

@ -61,7 +61,7 @@ public:
*/
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::variant<int, QSqlError> addGroup(const QString &group_name);
std::optional<QSqlError> removeGroup(int row);
int findGroup(int conngroup_id) const;
@ -77,7 +77,7 @@ private:
/// Finds the connection with the specified uuid and returns
/// { group_index, connection_index }
std::tuple<int, int> findConfig(const QUuid uuid) const;
int findGroup(QString name) const;
int findGroup(const QString &name) const;
std::optional<QSqlError> saveToDb(const ConnectionConfig &cc);
};