Make saving of the entered password work to.toStdString
Also when testing a preexisting connection config it will now decode a potential stored password.
This commit is contained in:
parent
c00a0452d1
commit
87cfb84997
6 changed files with 117 additions and 70 deletions
|
|
@ -133,7 +133,7 @@ void ConnectionConfig::setUser(const QString& v)
|
|||
{
|
||||
if (m_user != v) {
|
||||
m_dirty = true;
|
||||
m_user = std::move(v);
|
||||
m_user = v;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ void ConnectionConfig::setPassword(const QString& v)
|
|||
{
|
||||
if (m_password != v) {
|
||||
m_dirty = true;
|
||||
m_password = std::move(v);
|
||||
m_password = v;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ void ConnectionConfig::setDbname(const QString& v)
|
|||
{
|
||||
if (m_dbname != v) {
|
||||
m_dirty = true;
|
||||
m_dbname = std::move(v);
|
||||
m_dbname = v;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -298,15 +298,15 @@ void ConnectionConfig::setEncodedPassword(const QByteArray &encodedPassword)
|
|||
m_encodedPassword = encodedPassword;
|
||||
}
|
||||
|
||||
void ConnectionConfig::write(QDataStream &out) const
|
||||
{
|
||||
// out <<
|
||||
}
|
||||
//void ConnectionConfig::write(QDataStream &out) const
|
||||
//{
|
||||
//// out <<
|
||||
//}
|
||||
|
||||
void ConnectionConfig::read(QDataStream &in)
|
||||
{
|
||||
//void ConnectionConfig::read(QDataStream &in)
|
||||
//{
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
QString ConnectionConfig::escapeConnectionStringValue(const QString &value)
|
||||
{
|
||||
|
|
@ -465,15 +465,15 @@ void ConnectionGroup::update(int idx, const ConnectionConfig &cc)
|
|||
node->setParent(this);
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const ConnectionConfig &cc)
|
||||
{
|
||||
cc.write(out);
|
||||
return out;
|
||||
}
|
||||
//QDataStream &operator<<(QDataStream &out, const ConnectionConfig &cc)
|
||||
//{
|
||||
// cc.write(out);
|
||||
// return out;
|
||||
//}
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, ConnectionConfig &cc)
|
||||
{
|
||||
//in>>myObj.uId>>myObj.passwd>>myObj.statusType;
|
||||
cc.read(in);
|
||||
return in;
|
||||
}
|
||||
//QDataStream &operator>>(QDataStream &in, ConnectionConfig &cc)
|
||||
//{
|
||||
// //in>>myObj.uId>>myObj.passwd>>myObj.statusType;
|
||||
// cc.read(in);
|
||||
// return in;
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue