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:
eelke 2018-11-04 11:26:20 +01:00
parent 6b9b602c64
commit 2230a4bd61
21 changed files with 508 additions and 195 deletions

View file

@ -150,6 +150,27 @@ Expected<ConnectionConfig> ConnectionListModel::get(int row)
}
}
#include <boost/assert.hpp>
template <typename T>
size_t as_size_t(T t);
template <>
size_t as_size_t(int t)
{
BOOST_ASSERT(t >= 0);
return static_cast<size_t>(t);
}
template <>
size_t as_size_t(long t)
{
BOOST_ASSERT(t >= 0);
return static_cast<size_t>(t);
}
//void ConnectionListModel::del(const int idx)
bool ConnectionListModel::removeRows(int row, int count, const QModelIndex &parent)
{
@ -159,7 +180,7 @@ bool ConnectionListModel::removeRows(int row, int count, const QModelIndex &pare
beginRemoveRows(parent, row, row + count -1);
SCOPE_EXIT { endRemoveRows(); };
m_connections->remove(row, count);
m_connections->remove(as_size_t(row), as_size_t(count));
result = true;
}
return result;
@ -176,7 +197,12 @@ void ConnectionListModel::save()
m_connections->save();
}
void ConnectionListModel::save(int index)
void ConnectionListModel::save(size_t index)
{
m_connections->save(index);
}
void ConnectionListModel::save(size_t index, const ConnectionConfig &cc)
{
}