make sure profile directory exists
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Wed, 9 Jun 2010 21:24:32 +0000 (21:24 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Wed, 9 Jun 2010 21:24:32 +0000 (21:24 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@500 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/dialogs/configdialog.cpp
src/iface/sslexception.cpp

index 431f2dd..4d04e5a 100644 (file)
@@ -228,6 +228,7 @@ void MConfigDialog::saveProfile()
        set.setValue("proxyuser",proxyuser->text());
        set.setValue("proxypass",proxypass->text());
        set.setValue("username",username->text());
+       QDir(::dataDir).mkdir("profile."+key);
        if(sslexcept)sslexcept->savesslexcept();
 }
 
@@ -515,6 +516,8 @@ void MConfigDialog::serverProbe()
                QMessageBox::warning(this,tr("Server Probe"),tr("The request finished with an error: %1").arg(rp->errorString()));
        }
        delete rp;
+       //save
+       sslexcept->savesslexcept();
 }
 
 void MConfigDialog::sslErrors(QNetworkReply*rp,const QList<QSslError>&errs)
index c060d0a..78128a5 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "sslexception.h"
 
+#include <QDebug>
 #include <QDialog>
 #include <QDomDocument>
 #include <QDomElement>
@@ -23,6 +24,7 @@ MSslExceptions::MSslExceptions(QString p)
        path=p;
        //load...
        QFile fd(p);
+       qDebug()<<"loading SSL Exceptions"<<p;
        if(fd.open(QIODevice::ReadOnly)){
                QDomDocument doc;
                if(!doc.setContent(&fd))return;
@@ -53,6 +55,7 @@ void MSslExceptions::savesslexcept()
        doc.appendChild(root);
        QFile fd(path);
        if(fd.open(QIODevice::WriteOnly|QIODevice::Truncate)){
+               qDebug()<<"writing SSL Exceptions"<<path<<sslexcept.size()<<"elements";
                fd.write(doc.toByteArray());
                fd.close();
        }