fixed minor problem with saving hash
authorOndrej Skopek <skopekondrej@gmail.com>
Wed, 12 Dec 2012 16:17:32 +0100
changeset 8295 6ef114ea2298
parent 8294 0e5782b0dd54
child 8296 455da122c0ad
fixed minor problem with saving hash
QTfrontend/gameuiconfig.cpp
QTfrontend/hwform.cpp
--- a/QTfrontend/gameuiconfig.cpp	Wed Dec 12 15:57:01 2012 +0100
+++ b/QTfrontend/gameuiconfig.cpp	Wed Dec 12 16:17:32 2012 +0100
@@ -491,7 +491,7 @@
 {
     setValue("net/passwordhash", passwordhash);
     setValue("net/passwordlength", passwordhash.size());
-    netPasswordLength();
+    setNetPasswordLength(passwordhash.size());
 }
 
 QString GameUIConfig::passwordHash()
--- a/QTfrontend/hwform.cpp	Wed Dec 12 15:57:01 2012 +0100
+++ b/QTfrontend/hwform.cpp	Wed Dec 12 16:17:32 2012 +0100
@@ -1057,7 +1057,7 @@
     }
 
     //Remove temporary hash from config
-    config->clearPasswordHash();
+    config->clearTempHash();
 }
 
 void HWForm::NetNickRegistered(const QString & nick)
@@ -1065,11 +1065,9 @@
     //Get hashes
     QString hash =  config->passwordHash();
     QString temphash =  config->tempHash();
-    qDebug("NETNICKREGISTERED");
+
     if (hash.isEmpty()) {
-        qDebug("NNR - HASH EMPTY");
         if (temphash.isEmpty()) { //If the user enters a registered nick with no password
-            qDebug("NNR - TEMPHASH EMTPY");
             QString suppliedpass;
             while (suppliedpass.isEmpty()) {
                 QInputDialog nickRegedDialog(this);
@@ -1385,7 +1383,6 @@
             if (save) // user wants to save password
             {
                 config->setPasswordHash(temphash);
-                config->setNetPasswordLength(password.size());
             }
         }
         else {