|
Lines 80-85
Link Here
|
| 80 |
authType = config->readEntry("authtype"); |
80 |
authType = config->readEntry("authtype"); |
| 81 |
auth = config->readBoolEntry("auth"); |
81 |
auth = config->readBoolEntry("auth"); |
| 82 |
mStorePasswd = config->readBoolEntry("storepass"); |
82 |
mStorePasswd = config->readBoolEntry("storepass"); |
|
|
83 |
mStorePasswdInConfig = config->readBoolEntry("storepassinconfig",false); |
| 83 |
specifyHostname = config->readBoolEntry("specifyHostname", false); |
84 |
specifyHostname = config->readBoolEntry("specifyHostname", false); |
| 84 |
localHostname = config->readEntry("localHostname"); |
85 |
localHostname = config->readEntry("localHostname"); |
| 85 |
|
86 |
|
|
Lines 88-94
Link Here
|
| 88 |
|
89 |
|
| 89 |
if ( !mPasswd.isEmpty() ) { |
90 |
if ( !mPasswd.isEmpty() ) { |
| 90 |
// migration to kwallet if available |
91 |
// migration to kwallet if available |
| 91 |
if ( Wallet::isEnabled() ) { |
92 |
if (( Wallet::isEnabled() )&&(!mStorePasswdInConfig)) { |
| 92 |
config->deleteEntry( "pass" ); |
93 |
config->deleteEntry( "pass" ); |
| 93 |
mPasswdDirty = true; |
94 |
mPasswdDirty = true; |
| 94 |
mStorePasswdInConfig = false; |
95 |
mStorePasswdInConfig = false; |
|
Lines 126-132
Link Here
|
| 126 |
if ( storePasswd() ) { |
127 |
if ( storePasswd() ) { |
| 127 |
// write password into the wallet if possible and necessary |
128 |
// write password into the wallet if possible and necessary |
| 128 |
bool passwdStored = false; |
129 |
bool passwdStored = false; |
| 129 |
if ( mPasswdDirty ) { |
130 |
if (( mPasswdDirty ) && ( !mStorePasswdInConfig )) { |
| 130 |
Wallet *wallet = kmkernel->wallet(); |
131 |
Wallet *wallet = kmkernel->wallet(); |
| 131 |
if ( wallet && wallet->writePassword( "transport-" + QString::number(mId), passwd() ) == 0 ) { |
132 |
if ( wallet && wallet->writePassword( "transport-" + QString::number(mId), passwd() ) == 0 ) { |
| 132 |
passwdStored = true; |
133 |
passwdStored = true; |
|
Lines 152-157
Link Here
|
| 152 |
== KMessageBox::Yes ) ) { |
153 |
== KMessageBox::Yes ) ) { |
| 153 |
config->writeEntry( "pass", KMAccount::encryptStr( passwd() ) ); |
154 |
config->writeEntry( "pass", KMAccount::encryptStr( passwd() ) ); |
| 154 |
mStorePasswdInConfig = true; |
155 |
mStorePasswdInConfig = true; |
|
|
156 |
config->writeEntry("storepassinconfig", mStorePasswdInConfig); |
| 155 |
} |
157 |
} |
| 156 |
} |
158 |
} |
| 157 |
|
159 |
|