Commits

Matthew Smith committed 857289a

EditingWindow.cc - Now connects to the handleSSLErrors slot for HTTPS connections

Comments (0)

Files changed (1)

              this, SLOT( handleDone( bool ) ) );
     connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
              this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+    connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+             this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
     connect( http, SIGNAL( hostLookupFailed() ),
              this, SLOT( handleHostLookupFailed() ) );
            this, SLOT( handleDone( bool ) ) );
   connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
            this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+  connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+           this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
   connect( http, SIGNAL( hostLookupFailed() ),
            this, SLOT( handleHostLookupFailed() ) );
 #endif
 }
 
-void EditingWindow::setHost( QHttp *h, QString &serv, QString &pt,
-                             bool cm )
+void EditingWindow::setHost( QHttp *h, QString &serv, QString &pt, bool cm )
 {
   int p;
   bool ok;
 #ifdef DONT_USE_SSL
   if( !ok )
     p = 80;
-  h->setHost( serv, p );
+  h->setHost( serv, QHttp::ConnectionModeHttp, p );
 #else
   if( !ok )
     p = 0;
                this, SLOT( handleDone( bool ) ) );
       connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
                this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+      connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+               this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
-      connect( http, SIGNAL( hostLookupFailed() ),
+      
                this, SLOT( handleHostLookupFailed() ) );
 #endif
 
            this, SLOT( handleDone( bool ) ) );
   connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
            this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+  connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+           this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
   connect( http, SIGNAL( hostLookupFailed() ),
            this, SLOT( handleHostLookupFailed() ) );
                this, SLOT( handleDone( bool ) ) );
       connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
                this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+      connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+               this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
       connect( http, SIGNAL( hostLookupFailed() ),
                this, SLOT( handleHostLookupFailed() ) );
              this, SLOT( handleDone( bool ) ) );
     connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
              this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+    connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+             this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
     connect( http, SIGNAL( hostLookupFailed() ),
              this, SLOT( handleHostLookupFailed() ) );
                        this, SLOT( handleDone( bool ) ) );
               connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
                        this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+              connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+                       this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
               connect( http, SIGNAL( hostLookupFailed() ),
                        this, SLOT( handleHostLookupFailed() ) );
                      this, SLOT( handleDone( bool ) ) );
             connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
                      this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+            connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+                     this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
             connect( http, SIGNAL( hostLookupFailed() ),
                      this, SLOT( handleHostLookupFailed() ) );
                this, SLOT( handleDone( bool ) ) );
       connect( http, SIGNAL( readyRead( const QHttpResponseHeader & ) ),
                this, SLOT( handleResponseHeader( const QHttpResponseHeader & ) ) );
+#ifndef DONT_USE_SSL
+      connect( http, SIGNAL( sslErrors( const QList<QSslError> & ) ),
+               this, SLOT( handleSSLErrors( const QList<QSslError> & ) ) );
+#endif
 #ifdef USE_SAFEHTTP
       connect( http, SIGNAL( hostLookupFailed() ),
                this, SLOT( handleHostLookupFailed() ) );