Set key and cert for the temp identity manually
authorBas Pape <baspape@gmail.com>
Wed, 10 Oct 2012 20:53:51 +0000 (22:53 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 19 Feb 2013 23:10:07 +0000 (00:10 +0100)
Normally these are synced, but in this case they need to be set manually
for hasChanged to work.

Fixes #1032

src/qtui/settingspages/identitiessettingspage.cpp

index 094e9e0..4d2d433 100644 (file)
@@ -175,6 +175,11 @@ bool IdentitiesSettingsPage::testHasChanged()
         if (currentId != 0) {
             changedIdentities.removeAll(currentId);
             CertIdentity temp(currentId, this);
+            // we need to set the cert and key manually, as they aren't synced
+            CertIdentity *old = identities[currentId];
+            temp.setSslKey(old->sslKey());
+            temp.setSslCert(old->sslCert());
+
             ui.identityEditor->saveToIdentity(&temp);
             temp.setIdentityName(identities[currentId]->identityName());
             if (temp != *Client::identity(currentId) || temp.isDirty())