The list of connections is now saved and loaded on program shutdown and start.
This commit is contained in:
parent
cf4d6e769b
commit
7181c7f1e7
8 changed files with 128 additions and 44 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <memory>
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QUuid>
|
||||
|
||||
#include "connectionconfig.h"
|
||||
|
||||
|
|
@ -23,10 +24,24 @@ public:
|
|||
|
||||
void add(const ConnectionConfig &cfg);
|
||||
|
||||
void load();
|
||||
void save();
|
||||
private:
|
||||
using t_Connections = std::vector<ConnectionConfig>;
|
||||
class LijstElem {
|
||||
public:
|
||||
QUuid m_uuid;
|
||||
ConnectionConfig m_config;
|
||||
|
||||
LijstElem(const QUuid id, const ConnectionConfig &cfg)
|
||||
: m_uuid(id), m_config(cfg)
|
||||
{}
|
||||
};
|
||||
|
||||
using t_Connections = std::vector<LijstElem>;
|
||||
t_Connections m_connections;
|
||||
|
||||
static QString iniFileName();
|
||||
|
||||
static QString makeLongDescription(const ConnectionConfig &cfg);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue