Ticket #21: no-nickname-change-error.patch
| File no-nickname-change-error.patch, 1.6 kB (added by amroth, 14 months ago) |
|---|
-
kmess/settings/accountswidget.cpp
276 276 QString imageName = 0; 277 277 QString tempImageName = 0; 278 278 QString initialStatus; 279 QString newFriendlyName; 279 280 QDir imageFolder; 280 281 bool showImage; 281 282 bool success; … … 292 293 } 293 294 } 294 295 296 // If the account is not verified, don't change the nickname. 297 if( ! account->isVerified() ) 298 { 299 newFriendlyName = account->getFriendlyName(); 300 } 301 else 302 { 303 newFriendlyName = friendlyNameEdit_->text(); 304 } 305 295 306 // Update the settings 296 account->setLoginInformation( handleEdit_->text(), friendlyNameEdit_->text(), passwordEdit_->password() );307 account->setLoginInformation( handleEdit_->text(), newFriendlyName, passwordEdit_->password() ); 297 308 account->setUseAutologin( autologinCheckBox_->isChecked() ); 298 309 account->setShowImage( showImage ); 299 310 -
kmess/account.cpp
1192 1192 || ( ! password.isEmpty() && password != password_ ) ) 1193 1193 { 1194 1194 handle_ = handle.lower(); 1195 friendlyName_ = friendlyName;1196 emit changedFriendlyName();1197 1195 1196 // Never change the nickname if the account is not verified. We would receive a server error 1197 if( verified_ ) 1198 { 1199 friendlyName_ = friendlyName; 1200 emit changedFriendlyName(); 1201 } 1202 1198 1203 if( ! password.isEmpty() ) 1199 1204 { 1200 1205 password_ = password;
