[PC-BSD Commits] r7379 - pcbsd/current/src-qt4/pc-softwaremanager

svn at pcbsd.org svn at pcbsd.org
Thu Aug 12 13:06:38 PDT 2010


Author: kris
Date: 2010-08-12 13:06:38 -0700 (Thu, 12 Aug 2010)
New Revision: 7379

Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-webview.cpp
Log:

Fixed bugs loading the initial WebView engine and setting a pbidir SID



Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-webview.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-webview.cpp	2010-08-12 19:45:57 UTC (rev 7378)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-webview.cpp	2010-08-12 20:06:38 UTC (rev 7379)
@@ -25,19 +25,19 @@
 
   // Lets start by getting a SID from pbidir
   getSIDJob = new QNetworkAccessManager(this);
+  connect(getSIDJob, SIGNAL(finished(QNetworkReply *)), this, SLOT(slotPBIgetSIDDone() ) );
+
   QNetworkRequest netRequest;
   netRequest.setUrl(QUrl("http://www.pbidir.com/bt/getsid"));
   sidReply = getSIDJob->get(netRequest);
-   
-  connect(getSIDJob, SIGNAL(finished(QNetworkReply *)), this, SLOT(slotPBIGetSIDDone() ) );
-  connect(sidReply, SIGNAL(readyRead()), this, SLOT(slotRecievePBISIDDATA() ) );
+  connect(sidReply, SIGNAL(readyRead()), this, SLOT(slotRecievePBISIDData() ) );
+
 }
 
 void PBM::slotRecievePBISIDData()
 {
    progressPBIWeb->setValue(2);
-   while (sidReply->canReadLine() )
-     PBISIDBuffer = PBISIDBuffer + sidReply->readLine() + "\n";
+   PBISIDBuffer = PBISIDBuffer + sidReply->readAll();
 }
 
 void PBM::slotReadPBISIDBuffer()
@@ -49,6 +49,7 @@
    QStringList outputList;
    bool found;
    found = false;
+
    if ( ! output.isEmpty())
    {
       outputList = output.split("</");
@@ -85,13 +86,12 @@
        bits = "32";
 
      QString url = "http://www.pbidir.com/bt/set/lang/" + Lang + "/bits/" + bits + "/ver/" + Version + "/is_client/true?PDirSID=" + PBIDIRSID;
-     //QMessageBox::critical( 0, tr("Update Manager"), url, QMessageBox::Ok );        
 
      setSIDJob = new QNetworkAccessManager(this);
-     QNetworkRequest netRequest;
-     netRequest.setUrl(QUrl(url));
-     sidReply2 = getSIDJob->get(netRequest);
      connect(setSIDJob, SIGNAL(finished(QNetworkReply *)), this, SLOT(slotPBIsetSIDDone() ) );
+     QNetworkRequest netRequest2;
+     netRequest2.setUrl(QUrl(url));
+     sidReply2 = setSIDJob->get(netRequest2);
 
      progressPBIWeb->setValue(5);
    }
@@ -187,6 +187,7 @@
 {
    // Check if we have a SM tag, and if not re-auth
    QString rawHTML = webPBIView->page()->mainFrame()->toHtml();
+   //qDebug() << "RAWHTML" << rawHTML;
    if ( rawHTML.indexOf("<!-- SM -->") == -1 )
      startPBIDirLoad(); // Need to re-auth and get a SID
 



More information about the Commits mailing list