Lot of password related changes all over the place.
Password is no longer saved with the connection list. Password is not entered along with other connection credentials. Password is now asked for when required. Still working on saving the password and auto retrieving it from the password manager.
This commit is contained in:
parent
6b9b602c64
commit
2230a4bd61
21 changed files with 508 additions and 195 deletions
|
|
@ -8,47 +8,42 @@
|
|||
#include <vector>
|
||||
#include "Expected.h"
|
||||
|
||||
|
||||
class ConnectionList {
|
||||
private:
|
||||
static QString iniFileName();
|
||||
|
||||
public:
|
||||
|
||||
ConnectionList();
|
||||
int size() const { return m_connections.size(); }
|
||||
size_t size() const { return m_connections.size(); }
|
||||
|
||||
ConnectionConfig& getConfigByIdx(int idx)
|
||||
ConnectionConfig& getConfigByIdx(size_t idx)
|
||||
{
|
||||
return m_connections.at(idx).m_config;
|
||||
return m_connections.at(idx);
|
||||
}
|
||||
|
||||
int createNew();
|
||||
size_t createNew();
|
||||
|
||||
void remove(int idx, int count);
|
||||
void remove(size_t idx, size_t count);
|
||||
|
||||
void load();
|
||||
void save();
|
||||
void save(int index);
|
||||
|
||||
void save(size_t index);
|
||||
|
||||
private:
|
||||
class LijstElem {
|
||||
public:
|
||||
QUuid m_uuid;
|
||||
ConnectionConfig m_config;
|
||||
// class LijstElem {
|
||||
// public:
|
||||
// QUuid m_uuid; ///< Unique identifier, used as a key for storing password in psk db.
|
||||
// ConnectionConfig m_config;
|
||||
|
||||
LijstElem(const QUuid id, const ConnectionConfig &cfg)
|
||||
: m_uuid(id), m_config(cfg)
|
||||
{}
|
||||
};
|
||||
// LijstElem(const QUuid id, const ConnectionConfig &cfg)
|
||||
// : m_uuid(id), m_config(cfg)
|
||||
// {}
|
||||
// };
|
||||
|
||||
using t_Connections = std::vector<LijstElem>;
|
||||
using t_Connections = std::vector<ConnectionConfig>;
|
||||
t_Connections m_connections;
|
||||
|
||||
void deleteFromIni(t_Connections::iterator begin, t_Connections::iterator end);
|
||||
|
||||
|
||||
static QString iniFileName();
|
||||
};
|
||||
|
||||
#endif // CONNECTIONLIST_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue