Fix build without SSL
[quassel.git] / src / qtui / settingspages / identitiessettingspage.cpp
index 198b8ba..4efcb84 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -175,6 +175,12 @@ bool IdentitiesSettingsPage::testHasChanged()
         if (currentId != 0) {
             changedIdentities.removeAll(currentId);
             CertIdentity temp(currentId, this);
+#ifdef HAVE_SSL
+            // 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());
+#endif
             ui.identityEditor->saveToIdentity(&temp);
             temp.setIdentityName(identities[currentId]->identityName());
             if (temp != *Client::identity(currentId) || temp.isDirty())