[PC-BSD Commits] r7373 - in pcbsd/current: . src-qt4 src-qt4/pc-softwaremanager

svn at pcbsd.org svn at pcbsd.org
Tue Aug 10 13:44:25 PDT 2010


Author: kris
Date: 2010-08-10 13:44:25 -0700 (Tue, 10 Aug 2010)
New Revision: 7373

Added:
   pcbsd/current/src-qt4/pc-softwaremanager/
   pcbsd/current/src-qt4/pc-softwaremanager/pc-softwaremanager.pro
Removed:
   pcbsd/current/SoftwareManager/
   pcbsd/current/src-qt4/pc-softwaremanager/SoftwareManager.pro
Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/pbi.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/pbi.h
   pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.h
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbiupdate.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-sysupdate.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-webview.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.h
   pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.ui
   pcbsd/current/src-qt4/src-qt4.pro
Log:

Moved SoftwareManager -> src-qt4/pc-softwaremanager and make it 100% QT4 based, still buggy, needs
work to finish supporting PBI9 and fix web-view functionality



Modified: pcbsd/current/src-qt4/pc-softwaremanager/main.cpp
===================================================================
--- pcbsd/current/SoftwareManager/main.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/main.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -1,38 +1,19 @@
-#include <kapplication.h>
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
+#include <QApplication>
 #include <qtranslator.h>
 #include <qlocale.h>
+#include <QDebug>
 #include "softmanager-main.h"
 
-static const char description[] = I18N_NOOP("PC-BSD Software Manager");
 
 int main( int argc, char ** argv )
 {
-    KAboutData aboutData("SoftwareManager", 0, ki18n("SoftwareManager"),
-                            "0.9", ki18n(description),
-                            KAboutData::License_BSD,
-                            ki18n("(c) 2009, Kris Moore(c)"));
-
-    aboutData.addAuthor(ki18n("Kris Moore"), ki18n("Current maintainer"), "kris at pcbsd.org");
-
-    KCmdLineArgs::init(argc, argv, &aboutData);
-
-    KCmdLineOptions options;
-
-
-    // Tell which options are supported
-    KCmdLineArgs::addCmdLineOptions( options );
-
-
-    KApplication a;
-
+    QApplication a(argc, argv);   
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
-    if ( ! QFile::exists("/usr/local/kde4/share/apps/pcbsd/i18n/SoftwareManager_" + langCode + ".qm" ) )
+    if ( ! QFile::exists("/usr/local/share/pcbsd/i18n/SoftwareManager_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("SoftwareManager_") + langCode, "/usr/local/kde4/share/apps/pcbsd/i18n/" );
+    translator.load( QString("SoftwareManager_") + langCode, "/usr/local/share/pcbsd/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/pbi.cpp
===================================================================
--- pcbsd/current/SoftwareManager/pbi.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/pbi.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -36,8 +36,6 @@
    setIcon(0, QIcon());
    author = "";
    website = "";
-   exePath = QStringList();
-   mimeFile = QStringList();
    savedIconPath = "";
    setText(0, name + " " + version);
    update = false;
@@ -81,26 +79,6 @@
 
 }
 
-// Make sure we remove any TmpFile
-void PBI::removeTmpFile()
-{
-  QFile tmpfile(this->downloadFile);
-  if ( tmpfile.exists() )
-    tmpfile.remove();
-
-  QFile tmppart(this->downloadFile + ".part");
-  if ( tmppart.exists() )
-    tmppart.remove();
-
-  QFile tmpdl(this->downloadFile + ".tmp.part");
-  if ( tmpdl.exists() )
-    tmpdl.remove();
-
-  QFile tmpdl2(this->downloadFile + ".tmp");
-  if ( tmpdl2.exists() )
-    tmpdl2.remove();
-}
-
 bool PBI::isNewDownload()
 {
    return newdownload;
@@ -121,6 +99,16 @@
    this->newdownload = status;
 }
 
+void PBI::setProgIndexName( QString name) 
+{
+   this->progIndexName = name;
+}
+
+QString PBI::getProgIndexName()
+{
+   return progIndexName;
+}
+
 bool PBI::doDelete()
 {
    return dodelete;
@@ -180,72 +168,11 @@
    return website;
 }
 
-QStringList PBI::getExePath()
-{
-   return exePath;
-}
-
-QStringList PBI::getMimeFile()
-{
-   return mimeFile;
-}
-
-QString PBI::getDownloadURLFile()
-{
-  return downloadURLFile;
-}
-
-void PBI::setDownloadURLFile(QString url)
-{
-  this->downloadURLFile = url;
-}
-
-
-QString PBI::getDownloadURL()
-{
-  return downloadURL;
-}
-
-QString PBI::getDownloadFile()
-{
-  return downloadFile;
-}
-
 int PBI::getWorkingStatus()
 {
   return workingStatus;
 }
 
-void PBI::setDownloadMirror(QString url)
-{
-  this->downloadMirror = url;
-}
-
-QString PBI::getDownloadMirror()
-{
-  return downloadMirror;
-}
-
-void PBI::setDownloadURL(QString url)
-{
-  this->downloadURL = url;
-}
-
-void PBI::setDownloadFile(QString file)
-{
-  this->downloadFile = file;
-}
-
-void PBI::setLocalMdate(QString mdate)
-{
-  this->localMdate = mdate;
-}
-
-QString PBI::getLocalMdate()
-{
-  return localMdate;
-}
-
 void PBI::setDownloadVersion(QString newver)
 {
   this->downloadVersion = newver;
@@ -256,65 +183,21 @@
   return downloadVersion;
 }
 
-void PBI::setDownloadMdate(QString mdate)
-{
-  this->downloadMdate = mdate;
-}
-
-QString PBI::getDownloadMdate()
-{
-  return downloadMdate;
-}
-
 void PBI::setDownloadMD5(QString md5)
 {
   this->downloadMD5 = md5;
 }
 
-QString PBI::getCheckUpdateURL()
+QString PBI::getProgDir()
 {
-  return checkUpdateURL;
+   return progDir;
 }
 
-void PBI::setCheckUpdateURL(QString url)
+void PBI::setProgDir(QString path)
 {
-  this->checkUpdateURL = url;
+   this->progDir = path;
 }
 
-QString PBI::getNewProgDirName()
-{
-   QString ProgDirName, tmp;
-   tmp = name;
-   tmp.replace(" ", "");
-   ProgDirName = tmp;
-   return ProgDirName;
-}
-
-
-QString PBI::getProgDirName()
-{
-   QString ProgDirName, tmp;
-   tmp = name;
-   tmp.replace(" ", "");
-   ProgDirName = tmp;
-   tmp = version;
-   tmp.replace(" ", "");
-   ProgDirName = ProgDirName + tmp;
-
-   // Check if this program dir exists
-   QDir testDir;
-   testDir.setPath("/Programs/" + ProgDirName);
-   if ( testDir.exists() )
-     return ProgDirName;
-
-   // Else return the default 8.x format name
-   tmp = name;
-   tmp.replace(" ", "");
-   ProgDirName = tmp;
-
-   return ProgDirName;
-}
-
 QString PBI::getDownloadMD5()
 {
   return downloadMD5;
@@ -363,19 +246,19 @@
    this->website = website;
 }
 
-void PBI::setExePath(QStringList exePath)
+void PBI::setArch(QString type)
 {
-   this->exePath = exePath;
+   this->arch = type;
 }
 
-void PBI::setStatusText(QString text)
+QString PBI::getArch()
 {
-   this->setText(1, text);
+   return arch;
 }
 
-void PBI::setMimeFile(QStringList mimeFile)
+void PBI::setStatusText(QString text)
 {
-   this->mimeFile = mimeFile;
+   this->setText(1, text);
 }
 
 QString PBI::text()
@@ -402,73 +285,7 @@
    return text() + "\n" + getAuthor();
 }
 
-void PBI::addMimeFile(QString mime)
-{
-   mimeFile += mime;
-}
-
-void PBI::addExePath(QString path)
-{
-   exePath += path;
-}
-
 QString PBI::getIconPath()
 {
    return savedIconPath;
 }
-
-bool PBI::isDownloadMdateNewer()
-{
-   // Check if either value is missing
-   if ( localMdate.isEmpty() || downloadMdate.isEmpty() )
-     return true;
-   
-   QString line;
-   // Sort the dates from the .mdate file
-   QString tmp2 = localMdate;
-   tmp2.truncate( tmp2.indexOf(" ") );
-   QString date1 = tmp2;
-   tmp2 = line;
-   QString date2 = tmp2.remove( 0, tmp2.indexOf(" ") );
-
-   // Sort the dates from the updater
-   tmp2 = downloadMdate;
-   tmp2.truncate( tmp2.indexOf(" ") );
-   QString PBIdate1 = tmp2;
-   tmp2 = downloadMdate;
-   QString PBIdate2 = tmp2.remove( 0, tmp2.indexOf(" ") );
-
-   // Check if the installed PBI is created later than the online update
-   int ldate, odate;
-   bool ok;
-   bool updateAvail;
-   updateAvail = true;
-   ldate = date1.toInt(&ok);
-   if ( ok )
-   {
-      odate = PBIdate1.toInt(&ok);
-      if ( ok )
-      {
-         if ( ldate > odate )
-         {
-            updateAvail = false;
-         } else if (ldate == odate) {
-            // We checked the year / day, now check the hours seconds
-            ldate = date2.toInt(&ok);
-            if ( ok )
-            {
-                odate = PBIdate2.toInt(&ok);
-                 if ( ok )
-                 {
-	             if ( ldate > odate )
-	             {
-                         updateAvail = false;
-		     }
-                 }
-             }
-          }
-        }
-     }
-
-  return updateAvail;
-}

Modified: pcbsd/current/src-qt4/pc-softwaremanager/pbi.h
===================================================================
--- pcbsd/current/SoftwareManager/pbi.h	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/pbi.h	2010-08-10 20:44:25 UTC (rev 7373)
@@ -26,8 +26,6 @@
 #include <qpainter.h>
 #include <QTreeWidget>
 
-#include <kjob.h>
-
 #ifndef INC_PBI_H
 #define INC_PBI_H
 
@@ -49,51 +47,37 @@
     virtual QString getVersion();
     virtual QString getAuthor();
     virtual QString getWebsite();
+    virtual QString getArch();
     virtual bool getUpdateAvail();
-    virtual QStringList getExePath();
-    virtual QStringList getMimeFile();
     virtual QString getIconPath();
     virtual int getWorkingStatus();
     virtual int getDownloadAttempts();
-    virtual QString getDownloadMirror();
-    virtual QString getDownloadURL();
-    virtual QString getDownloadURLFile();
-    virtual QString getDownloadFile();
     virtual bool getDownloadFailed();
     virtual QString getDownloadMD5();
-    virtual QString getDownloadMdate();
     virtual QString getDownloadVersion();
-    virtual QString getLocalMdate();
-    virtual QString getCheckUpdateURL();
-    virtual QString getProgDirName();
-    virtual QString getNewProgDirName();
+    virtual QString getProgDir();
+    virtual QString getProgIndexName();
     virtual bool doDelete();
     virtual bool isNewDownload();
     virtual bool isDirty();
     
     
     //Setters
-    virtual void setCheckUpdateURL(QString url);
-    virtual void setLocalMdate(QString mdate);
+    virtual void setProgIndexName(QString name);
     virtual void setDelete(bool status);
     virtual void setNewDownload(bool status);
     virtual void setDownloadAttempts(int num);
-    virtual void setDownloadMirror(QString url);
-    virtual void setDownloadURL(QString url);
-    virtual void setDownloadURLFile(QString url);
-    virtual void setDownloadFile(QString file);
-    virtual void setDownloadMdate(QString mdate);
+    virtual void setProgDir(QString path);
     virtual void setDownloadMD5(QString md5);
     virtual void setDownloadFailed(bool status);
     virtual void setDownloadVersion(QString newver);
     virtual void setUpdateAvail(bool status);
     virtual void setName(QString name);
+    virtual void setArch(QString type);
     virtual void setVersion(QString version);
     virtual void setIconPath(QString iconPath);
     virtual void setAuthor(QString author);
     virtual void setWebsite(QString website);
-    virtual void setExePath(QStringList exePath);
-    virtual void setMimeFile(QStringList mimeFile);
     virtual void setStatusText(QString text);
     virtual void setWorkingStatus(int status);
     virtual void setDirty(bool status);
@@ -103,10 +87,6 @@
     virtual void paint(QPainter *p);
     
     virtual QString toString();
-    virtual void addMimeFile(QString mime);
-    virtual void addExePath(QString path);
-    virtual bool isDownloadMdateNewer();
-    virtual void removeTmpFile();
 
 private:
     bool dodelete;
@@ -116,19 +96,14 @@
     QString version;
     QString author;
     QString website;
-    QStringList exePath;
-    QStringList mimeFile;
     QString savedIconPath;
+    QString progDir;
+    QString progIndexName;
+    QString arch;
     int workingStatus;
-    QString checkUpdateURL;
-    QString downloadMirror;
-    QString downloadURLFile;
-    QString downloadURL;
     bool downloadFailed;
-    QString downloadFile;
     QString downloadVersion;
     QString downloadMD5;
-    QString downloadMdate;
     int downloadAttempts;
     bool dirty;
     bool update;

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.cpp
===================================================================
--- pcbsd/current/SoftwareManager/softconfigwidget.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -13,10 +13,9 @@
 #include <QSettings>
 #include <QString>
 #include <QFileDialog>
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
 
-// KDE Includes
-#include <kjob.h>
-
 // Local Includes
 #include "softmanager-main.h"
 #include "ui_softconfigwidget.h"
@@ -204,66 +203,70 @@
   QString URL, LFILE;
   URL= "http://updates.pcbsd.org/mirror-list.php";
   LFILE = "/tmp/.smmirrorlist";
-  mirrorJob = KIO::file_copy(URL, LFILE, -1, KIO::HideProgressInfo | KIO::Overwrite);
-  connect(mirrorJob, SIGNAL(result(KJob*)), this, SLOT(slotRefreshMirrorDone()));
 
+  mirrorJob = new QNetworkAccessManager(this);
+     
+  QNetworkRequest netRequest;
+  netRequest.setUrl(QUrl(URL));
+  mirrorReply = mirrorJob->get(netRequest);
+    
+  connect(mirrorJob, SIGNAL(finished(QNetworkReply *)), this, SLOT(slotRefreshMirrorDone() ) );
+  connect(mirrorReply, SIGNAL(readyRead()), this, SLOT(slotGetMirrorData() ) );
 }
 
+void softwareConfigWidget::slotGetMirrorData() {
+	while (mirrorReply->canReadLine() )
+		mirrorJobBuf << mirrorReply->readLine().simplified();
+}
+
 void softwareConfigWidget::slotRefreshMirrorDone() {
    QString MirrorName, MirrorURL, tmp;
 
 
-   if (mirrorJob->error() != 0)
+   if (mirrorReply->error() != QNetworkReply::NoError)
    {
       QMessageBox::critical( 0, tr("Refresh Mirrors"), tr("Error fetching mirror list! Check your internet connection, or try again later."), QMessageBox::Ok );
-   } else {
-      QFile mlist("/tmp/.smmirrorlist");
-      if ( mlist.exists() && mlist.open(QIODevice::ReadOnly) )
-      {
-         // Clear the combo box
-         comboMirrorList->clear();
-         int i = 0;
+	return;
+   } 
 
-         QTextStream stream( &mlist );
-         QString line;
-         while ( !stream.atEnd() ) {
-           line = stream.readLine(); // line of text excluding '\n' 
+   // Clear the combo box
+   comboMirrorList->clear();
+   int i = 0;
 
-           tmp = line;
-           tmp.truncate(line.indexOf("=") -1 );
-           MirrorName = tmp;
-           MirrorURL = line.remove(0, line.indexOf("=") + 1); 
-           mirrorNames[i] = MirrorName;
-           mirrorURLs[i] = MirrorURL.simplified(); 
-           comboMirrorList->addItem( MirrorName );
+   QString line;
+   for ( int z = 0; z < mirrorJobBuf.size(); z++ ) {
+     line = mirrorJobBuf.at(z);
 
-           if ( currentMirror == MirrorURL )
-              comboMirrorList->setCurrentIndex(i);
+     tmp = line;
+     tmp.truncate(line.indexOf("=") -1 );
+     MirrorName = tmp;
+     MirrorURL = line.remove(0, line.indexOf("=") + 1); 
+     mirrorNames[i] = MirrorName;
+     mirrorURLs[i] = MirrorURL.simplified(); 
+     comboMirrorList->addItem( MirrorName );
 
-           i++; 
-         }
+     if ( currentMirror == MirrorURL )
+        comboMirrorList->setCurrentIndex(i);
 
-         // Close our the array
-         mirrorNames[i] = "";
-         mirrorURLs[i] = "";
+     i++; 
+   }
 
-         // Close the file and save our array so we don't need to fetch every time
-         mlist.close();
+   // Close our the array
+   mirrorNames[i] = "";
+   mirrorURLs[i] = "";
 
-         QSettings settings("PCBSD");
-         settings.beginWriteArray("/PC-BSD/SoftwareManager/mirrorList");
-         i = 0;
-         while ( !mirrorNames[i].isEmpty() )
-         {
-            settings.setArrayIndex(i);
-            settings.setValue("MirrorName", mirrorNames[i]);
-            settings.setValue("MirrorURL", mirrorURLs[i].simplified());
-            i++;
-         }
-         settings.endArray();  
-      }
-      mlist.remove();
+   QSettings settings("PCBSD");
+   settings.beginWriteArray("/PC-BSD/SoftwareManager/mirrorList");
+   i = 0;
+   while ( !mirrorNames[i].isEmpty() )
+   {
+      settings.setArrayIndex(i);
+      settings.setValue("MirrorName", mirrorNames[i]);
+      settings.setValue("MirrorURL", mirrorURLs[i].simplified());
+      i++;
    }
+
+   settings.endArray();  
 }
 
 void softwareConfigWidget::slotCheckMirrorRadio() {

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.h
===================================================================
--- pcbsd/current/SoftwareManager/softconfigwidget.h	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softconfigwidget.h	2010-08-10 20:44:25 UTC (rev 7373)
@@ -2,8 +2,10 @@
 #ifndef SOFTCONFGWIDGET_H
 #define SOFTCONFIGWIDGET_H
 
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
+
 #include "ui_softconfigwidget.h"
-#include <kjob.h>
 
 class softwareConfigWidget : public QDialog, private Ui::softwareConfigWidget
 {
@@ -29,14 +31,20 @@
         void slotUpdateMirrorList();
         void slotRefreshMirrorDone();
         void slotCheckMirrorRadio();
+	void slotGetMirrorData();
 private:
         void saveSettings();
         void loadSettings();
 
+	QStringList mirrorJobBuf;
+
         QString currentMirror;
-        KJob *mirrorJob;
         QString mirrorNames[500];
         QString mirrorURLs[500];
+
+        QNetworkAccessManager *mirrorJob;
+        QNetworkReply *mirrorReply;
+
 signals:
         void saved();
 } ;

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
===================================================================
--- pcbsd/current/SoftwareManager/softmanager-main.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -32,9 +32,8 @@
 #include <QFileDialog>
 #include <QDateTime>
 #include <QList>
+#include <QDebug>
 
-#include <kmenu.h>
-
 /* Local includes */
 #include "ui_softmanager-main.h"
 #include "softmanager-main.h"
@@ -42,13 +41,7 @@
 #include "updaterDialog.h"
 #include "ui_updaterDialog.h"
 
-/* KDE */
-#include <kjob.h>
-#include <kio/job.h>
-#include <kio/copyjob.h>
-#include <kurl.h>
 
-
 void PBM::ProgramInit()
 { 
    qDebug("Application starting...");
@@ -91,18 +84,19 @@
    // Confirm if we are running as root
    checkRoot();
     
-   // Setup the filewatcher and PopulateList
-   fileWatcher = KDirWatch::self();
-   fileWatcher->addFile("/Programs/.config/ProgList");
    qDebug("Populating list...");
-   //QTimer::singleShot( 500, this, SLOT(PopulateList()) );
+
    // Populate the PBI List
    PopulateList();
+
+   // Setup the filewatcher and PopulateList
+   fileWatcher = new QFileSystemWatcher();
+   fileWatcher->addPath("/var/db/pbi");
+   connect(fileWatcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(PopulateList()));
+
    // Load any saved states for PBIs
    loadStatePBI(); 
-   connect(fileWatcher, SIGNAL(dirty(const QString&)), this, SLOT(PopulateList()));
     
- 
    // Get the username of the person running X
    RealUserName = getlogin();
 
@@ -159,12 +153,13 @@
   // If we are already working on a PBI, lets confirm the user wants to exit
   if ( isWorkingOnPBI ) {
      QString message = tr("You currently have PBIs downloading! Exit anyway?");
-     if (KMessageBox::warningYesNo(this, message ) == KMessageBox::No)
+     if (QMessageBox::question(this, tr("Confirm"), message, QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::No)
      {
         return false;
      } else {
         // Yep, ready to cancel, lets stop the download / update
-        copyJob->kill();
+	if ( pbiJob )
+          pbiJob->kill();
         isWorkingOnPBI = true;
         return true;
      }
@@ -187,7 +182,7 @@
 void PBM::RemoveButtonSlot()
 {
    //Stop the scanner from interfering
-   fileWatcher->stopScan();
+   fileWatcher->removePath("/var/db/pbi");
    
    QTreeWidgetItemIterator it(SoftwareListBox);
    while (*it) {
@@ -211,7 +206,7 @@
         }
 
         //Cancel if the user doesn't want to go ahead with removal
-        if (KMessageBox::warningYesNoList(this, message, removeapp) == KMessageBox::No)
+        if (QMessageBox::question(this, message, removeapp.join(""), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::No)
         {
           tabPBM->setEnabled(TRUE);
           return;
@@ -224,7 +219,7 @@
         PopulateList();
 
         //Restart scanner
-        fileWatcher->startScan();
+        fileWatcher->addPath("/var/db/pbi");
    
         tabPBM->setEnabled(TRUE);
         return;
@@ -244,11 +239,10 @@
     if ( ! pbi->isNewDownload() )
     {
       // This is a already installed PBI, lets remove it now
-      ProgDirName = pbi->getProgDirName();
-      qDebug("ProgDir: " + ProgDirName.toLatin1());
+      qDebug() << "Removing PBI: " + pbi->getProgIndexName();
 
       // Remove the PBI via pbidelete now
-      procommand = "pbidelete -GUI " + ProgDirName;
+      procommand = "pbi_delete " + pbi->getProgIndexName();
       getLineFromCommandOutput(procommand);
     }
 
@@ -347,140 +341,88 @@
 void PBM::PopulateList()
 {
     PBI *pbi = 0;
-    int foundPBI = 0;
-    QPixmap defaultIcon("/Programs/.config/application.png");
-    QString tmp;
+    bool foundPBI = false;
+    QPixmap defaultIcon("/usr/local/share/pcbsd/images/pbi.png");
+    QString tmp, line, name, progIndexName, version, prefix, author, website, arch, icon, sig;
 
     // Start by marking all PBIs as dirty
-    markAllPBIDirty(); 
+    markAllPBIDirty();
 
     // Remove any PBI's we've deleted
     removeAllDeletedPBI();
 
-    qDebug("Opening ProgList");
-    QFile file( "/Programs/.config/ProgList" );
-    if ( file.open( QIODevice::ReadOnly ) ) {
-        QTextStream stream( &file );
-        QString line;
-        
-	qDebug("Reading ProgList...");
-        while ( !stream.atEnd() ) {
-           line = stream.readLine(); // line of text excluding '\n'
-           if (line.indexOf("#" ) != 0)
-           {
-		if (line.indexOf("ProgName:" ) ==  0 )
-                {
-                    if (pbi != 0) { 
-                      // Check if this PBI is already loaded, and update its details if so
-                      if ( checkPBILoaded(pbi->getName()) )
-                      {
-                        // This PBI already exists, just update the existing entry
-                        PBI *item = getPBIFromName(pbi->getName());
-                        if(item->getVersion() != pbi->getVersion() )
-                        {
-                           item->setWorkingStatus(PBIINACTIVE);
-                        }
+    loadPBIs = new QProcess();
+    loadPBIs->setProcessChannelMode(QProcess::MergedChannels);
+    loadPBIs->start(QString("pbi_info"), QStringList() << "-v");
+    loadPBIs->waitForFinished(-1);
 
-                        item->setVersion(pbi->getVersion());
-                        item->setIconPath(pbi->getIconPath());
-                        item->setIcon(0, pbi->icon(0));
-                        item->setAuthor(pbi->getAuthor());
-                        item->setExePath(pbi->getExePath());
-                        item->setMimeFile(pbi->getMimeFile());
-                        item->setWebsite(pbi->getWebsite());
-                        item->setDirty(false);
-                        item->setDelete(false);
-                        item->setHidden(false);
-                      } else {
-                        // New PBI! Add it to our list
-                        SoftwareListBox->addTopLevelItem(pbi); 
-                      }
-                    }
+    qDebug("Reading PBI List");
+    while ( loadPBIs->canReadLine() ) {
+       	line = loadPBIs->readLine(); // line of text excluding '\n'
+	
+	if ( line.isEmpty() && !progIndexName.isEmpty() && !name.isEmpty() && !version.isEmpty() )
+		foundPBI = true;
 
-                    pbi = new PBI(defaultIcon.scaled(40,40));
-                    pbi->setName(line.replace("ProgName: ", ""));
-                    foundPBI = 1;
-		}
-		if ( line.indexOf("ProgVer:") == 0)
-		{
-                    pbi->setVersion(line.replace("ProgVer: ", ""));
-		}
-		if ( line.indexOf("DefaultIcon:") == 0)
-		{
-		    //ProgIcon[i] = line.replace("DefaultIcon: ", "");
-                    QString iconPath = line.replace("DefaultIcon: ", "");
-                    if (iconPath.isEmpty()) {
-                       iconPath = "/Programs/.config/application.png";
-                    } else  {
-                       iconPath = "/Programs/" + pbi->getProgDirName() + "/" + iconPath;
-                    }
-                    qDebug("iconPath: " + iconPath.toLatin1());
-                    QIcon custIcon;
-                    custIcon.addFile(iconPath);
+	if (line.indexOf("PBI Information for:" ) ==  0 )
+          progIndexName = line.replace("PBI Information for: ", "");
 
-                    // Set the icon, and set the icon path
-                    pbi->setIcon(0, custIcon);
-		    pbi->setIconPath(iconPath);
-		}
-		if ( line.indexOf("ProgAuthor:") == 0)
-		{
-                    pbi->setAuthor(line.replace("ProgAuthor: ", ""));
-		}
-		if ( line.indexOf("ProgWeb:") == 0)
-		{
-                    pbi->setWebsite(line.replace("ProgWeb: ", ""));
-		}
+	if (line.indexOf("Name:" ) ==  0 )
+          name = line.replace("Name: ", "");
+
+	if ( line.indexOf("Version:") == 0)
+	  version = line.replace("Version: ", "");
+
+	if ( line.indexOf("Icon:") == 0)
+          icon = line.replace("Icon: ", "");
+
+	if ( line.indexOf("Author:") == 0)
+          author = line.replace("Author: ", "");
+
+	if ( line.indexOf("Website:") == 0)
+          website = line.replace("Website: ", "");
+
+	if ( line.indexOf("Arch:") == 0)
+          arch = line.replace("Arch: ", "");
+
+	if ( foundPBI ) {
+	  foundPBI = false;
+          // Check if this PBI is already loaded, and update its details if so
+          if ( checkPBILoaded(name) )
+          {
+             // This PBI already exists, just update the existing entry
+             PBI *item = getPBIFromName(name);
+             if (item->getVersion() != version )
+                item->setWorkingStatus(PBIINACTIVE);
+             item->setVersion(version);
+             item->setIconPath(icon);
+             item->setAuthor(author);
+             item->setWebsite(website);
+             item->setDirty(false);
+             item->setDelete(false);
+             item->setHidden(false);
+           } else {
+             // New PBI! Add it to our list
+             pbi = new PBI(defaultIcon.scaled(40,40));
+             pbi->setProgIndexName(progIndexName);
+             pbi->setName(name);
+             pbi->setVersion(version);
+             pbi->setIconPath(icon);
+             pbi->setAuthor(author);
+             pbi->setWebsite(website);
+             pbi->setArch(arch);
+	     pbi->setDirty(false);
+	     pbi->setDelete(false);
+	     pbi->setHidden(false);
+             SoftwareListBox->addTopLevelItem(pbi); 
+             qDebug(pbi->text().toLatin1());
+           }
+
+    	}
 		
-		if ( line.indexOf("ExePath:") == 0)
-		{
-		    while ( line.indexOf("ExePath:") == 0)
-		    {
-                       pbi->addExePath(line.replace("ExePath: ", ""));
-                       line = stream.readLine();
-		    }
-		}
-		
-		if ( line.indexOf("MimeFile:") == 0)
-		{
-		    while ( line.indexOf("MimeFile:") == 0)
-		    {
-                       pbi->addMimeFile(line.replace("MimeFile: ", ""));
-                       line = stream.readLine();
-		    }
-		}
-            }
-	    
-        }
-        file.close();
     }
-    // Only insert the PBI into the list if we found some
-    if ( foundPBI == 1 ) {
-      // Check if this PBI is already loaded, and update its details if so
-      if ( checkPBILoaded(pbi->getName()) )
-      {
-         // This PBI already exists, just update the existing entry
-         PBI *item = getPBIFromName(pbi->getName() );
-         if (item->getVersion() != pbi->getVersion() )
-         {
-            item->setWorkingStatus(PBIINACTIVE);
-         }
-         item->setVersion(pbi->getVersion());
-         item->setIconPath(pbi->getIconPath());
-         item->setIcon(0, pbi->icon(0));
-         item->setAuthor(pbi->getAuthor());
-         item->setExePath(pbi->getExePath());
-         item->setMimeFile(pbi->getMimeFile());
-         item->setWebsite(pbi->getWebsite());
-         item->setDirty(false);
-         item->setDelete(false);
-         item->setHidden(false);
-       } else {
-         // New PBI! Add it to our list
-         SoftwareListBox->addTopLevelItem(pbi); 
-         qDebug(pbi->text().toLatin1());
-       }
-    }
+	    
 
+
     // Remove any PBIs still marked as dirty, they no longer are installed
     removeAllPBIDirty();
 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
===================================================================
--- pcbsd/current/SoftwareManager/softmanager-main.h	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2010-08-10 20:44:25 UTC (rev 7373)
@@ -8,10 +8,15 @@
 #include <qfile.h>
 #include <qmessagebox.h>
 #include <qdialog.h>
-#include <kdirwatch.h>
 #include <QListWidgetItem>
 #include <QListIterator>
 #include <QProcess>
+#include <QMenu>
+#include <QFileSystemWatcher>
+#include <QNetworkAccessManager>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+#include <QDebug>
 
 /* Local Includes */
 #include "ui_softmanager-main.h"
@@ -21,15 +26,6 @@
 #include "softconfigwidget.h"
 #include "ui_softconfigwidget.h"
 
-
-/* KDE */
-#include <kjob.h>
-#include <kio/job.h>
-#include <kio/copyjob.h>
-#include <khtml_part.h>
-#include <khtmlview.h>
-#include <kmenu.h>
-
 /* Change this to switch the default patch tmpdir */
 #define  PATCHTMPDIR_DEFAULT "/usr/local/tmp"
 
@@ -38,7 +34,6 @@
 #define SELECTMIRROR    1
 #define CUSTOMMIRROR    2
 
-
 /* The Update STATUS Flags */
 #define SYSTEM_UP2DATE 0
 #define SYSTEM_UPDATE_AVAIL 1
@@ -73,9 +68,10 @@
     void slotSysUpdateCheckFinished();
     void slotReadSystemUpdates();
     void slotStartPBIUpdateCheck();
+    void slotGetSysData();
+    void slotGetSysCopyData();
     bool checkPBISelectedUpdates();
     void slotPBICheckUpdate();
-    void slotRecieveData(KIO::Job*, const QByteArray& data);
     void slotOpenSysDetails(int id);
     void slotStartSystemUpdate();
     void slotDownloadSysUpdate();
@@ -104,16 +100,10 @@
     void slotPBISelectionChanged();
     void slotPBIUpdateCheckDone();
     void slotDownloadPBIUpdate();
-    void slotDownloadPBIDone();
-    void slotStartPBIInstall();
     void slotProcessPBIs();
     void markPBIForUpdate(PBI *item);
-    void slotJobUpdateTotalSize(KJob*, qulonglong size);
-    void slotJobUpdateProcessedSize(KJob *workingjob, qulonglong size);
-    void slotJobUpdateSpeed(KJob*, unsigned long speed);
     void slotFinishedPBIInstall();
     void slotPBIRightClicked();
-    void slotRegenPBIDownloadURL(PBI *item);
     void markAllPBIDirty();
     void removeAllPBIDirty();
     void removeAllDeletedPBI();
@@ -132,17 +122,16 @@
     void slotQuitButtonClicked();
     void slotRefreshButtonClicked();
     void slotStopButtonClicked();
-    void slotRecievePBISIDData(KIO::Job*, const QByteArray& data);
-    void slotPBIgetSIDDone(KJob *myjob);
-    void slotPBIsetSIDDone(KJob *myjob);
-    void slotReadPBISIDBuffer();
     void slotSetWebFailed();
     void slotParseHtmlForDownloadURL();
+    void slotRecievePBISIDData();
+    void slotReadPBISIDBuffer();
+    void slotPBIgetSIDDone();
+    void slotPBIsetSIDDone();
 
     // Configuration Slots
     void slotLoadSettings();
     void slotConfigButtonClicked();
-    void installPBIDesktopIcons();
 
 private:
     void RemovePBI( PBI * pbi );
@@ -151,15 +140,12 @@
     bool checkPBILoadedFuzzy(QString name);
     PBI *getPBIFromName(QString name);
     void startPBIDirLoad();
-    void scheduleNewPBIDownload(QString name, QString ver, QString url, QString mirror);
+    void scheduleNewPBIDownload(QString name, QString ver);
     void saveStatePBI();
     void loadStatePBI();
     void purgeAllDeletedPBI();  
     bool checkOkToClose();
    
-    KIO::TransferJob *getPBISIDJob;
-    KIO::TransferJob *setPBISIDJob;
-
     QString getLineFromCommandOutput( QString command );
     QString bytesToHumanReadable( float bytes );
     int getDirSize( QString path );
@@ -167,15 +153,22 @@
     QProcess *RemoveScript;
     QProcess *CheckRoot;
     QString RealUserName;
-    KDirWatch *fileWatcher;
-    KMenu *popup;
+    QFileSystemWatcher *fileWatcher;
+    QMenu *popup;
     QString PBIDIRSID;
     QString PBISIDBuffer;
     QString PBIUrl;
 
-    KJob *copyJob;
-    KJob *sysFetchJob;
-    KIO::TransferJob *checkPBIJob;
+    // Network access
+    QNetworkAccessManager *getSIDJob;
+    QNetworkReply *sidReply;
+    QNetworkAccessManager *setSIDJob;
+    QNetworkReply *sidReply2;
+    QNetworkAccessManager *sysFetchJob;
+    QNetworkReply *sysFetchReply;
+    QNetworkAccessManager *sysCopyJob;
+    QNetworkReply *sysCopyReply;
+
     updaterStatus *UpdaterStatusDialog;
     softwareConfigWidget *softConfig;
     void loadPatchData(QString patchFile, int patchNum);
@@ -212,6 +205,8 @@
     QProcess *checkPBIProc;
     QProcess *upgradePBIProc;
     QProcess *installPBIDesktopIcon;
+    QProcess *loadPBIs;
+    QProcess *pbiJob;
 
     // System Updater Variables
     QString SysUpdateName[500];
@@ -235,11 +230,6 @@
     bool autoDesktopIcons;
     bool keepDownloadedSoftware;
 
-    // Our copylabel variables
-    KIO::filesize_t copyLabelTotalSize;
-    KIO::filesize_t copyLabelProcessedSize;
-    unsigned long copyLabelSpeed;
-
 signals:
 
 } ;

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
===================================================================
--- pcbsd/current/SoftwareManager/softmanager-main.ui	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui	2010-08-10 20:44:25 UTC (rev 7373)
@@ -521,9 +521,7 @@
   </customwidget>
  </customwidgets>
  <includes>
-  <include location="global">kdirwatch.h</include>
   <include location="global">qfile.h</include>
-  <include location="global">kmessagebox.h</include>
   <include location="local">pbi.h</include>
  </includes>
  <resources>

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbiupdate.cpp
===================================================================
--- pcbsd/current/SoftwareManager/softmanager-pbiupdate.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbiupdate.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -19,52 +19,6 @@
     return;
   }
 
-  bool foundURL;
-  QString ProgDirName, line;
-
-  // Start by loading any / all PBI.UpdateURL.sh scripts
-  QTreeWidgetItemIterator it(SoftwareListBox);
-  while (*it) {
-    foundURL = false;
-    PBI *item = dynamic_cast<PBI*>(*it);
-    ProgDirName = item->getProgDirName(); 
-    QFile file( "/Programs/" + ProgDirName + "/PBI.UpdateURL.sh" );
-    if ( file.exists() && file.open( QIODevice::ReadOnly) ) {
-       QTextStream stream( &file );
-       while ( !stream.atEnd() ) {
-         line = stream.readLine(); // line of text excluding '\n'
-         if ( line.indexOf("PBIUpdateURL=\"" ) == 0)
-         {
-              line.replace("PBIUpdateURL=\"", "");
-              line.truncate(line.indexOf("\""));
-              item->setCheckUpdateURL(line);
-              foundURL = true;
-         }
-       }
-       file.close();
-    } 
-
-    if ( !foundURL) {
-      // No Update URL for this PBI
-      item->setCheckUpdateURL("");
-    }
-
-    // Also load the .mdate file, if present
-    QFile mdatefile( "/Programs/" + ProgDirName + "/.mdate");
-    if ( mdatefile.exists() && mdatefile.open( QIODevice::ReadOnly ) )
-    {
-        QTextStream mstream( &mdatefile );
-        line = mstream.readLine(); // line of text excluding '\n'
-        if ( ! line.isEmpty() ) {
-          // Sort the dates from the .mdate file
-          item->setLocalMdate(line);
-        }
-        mdatefile.close();
-     }
-    ++it;
-  }
-
-  
   // Set our Iterator, and start checking our list for updates!
   currentCheckingPBI = new QTreeWidgetItemIterator(SoftwareListBox);
   pbistatus = PBI_CHECKING4UPDATES;
@@ -76,13 +30,13 @@
 // Start checking our list of PBIs which may be updatable
 void PBM::slotPBICheckUpdate()
 {
-  // Need to loop through iterator here, and test if UpdateURL is set
+  // Need to loop through iterator here, and test each PBI for updates 
   // and if it is, check for update, then continue on to next currentCheckingPBI++ until we
   // are at the end of the list
   QTreeWidgetItemIterator it(*currentCheckingPBI);
   PBI *item = dynamic_cast<PBI*>(*it);
   if (*it) {
-    if ( item->getCheckUpdateURL().isEmpty() || item->getWorkingStatus() != PBIINACTIVE)
+    if ( item->getWorkingStatus() != PBIINACTIVE)
     {
        // This PBI is missing a update URL or is already busy, skip to next!
        (*currentCheckingPBI)++;
@@ -99,95 +53,35 @@
   // If we've gotten this far, we have a new PBI to check for updates to!
   item->setText(1, tr("Checking for Updates..."));
 
-  // Empty out our PBI buffer
-  PBIBuffer="";
+  checkPBIProc = new QProcess();
+  checkPBIProc->setProcessChannelMode(QProcess::MergedChannels);
+  connect(checkPBIProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotPBIUpdateCheckDone()) );
+  checkPBIProc->start(QString("pbi_update"), QStringList() << "-c" << item->getProgIndexName() );
 
-  QString tmp, command;
-
-  // We are ready! Lets send the request to the server and see what updates we may have
-  QString postData = "PBIName=" + item->getName() + "&PBIVer=" + item->getVersion() + "&PCBSDVER=" + Version + "&OSARCH=" + Arch;
-  checkPBIJob = KIO::http_post( item->getCheckUpdateURL(), postData.toUtf8(), KIO::HideProgressInfo);
-  connect(checkPBIJob, SIGNAL(result(KJob *)), this, SLOT(slotPBIUpdateCheckDone()) );
-  connect(checkPBIJob, SIGNAL(data(KIO::Job *, const QByteArray&)), this, SLOT(slotRecieveData(KIO::Job *, const QByteArray& ) ) );
-
-  checkPBIJob->addMetaData("content-type", "Content-type: application/x-www-form-urlencoded" );
-  
 }
 
-void PBM::slotRecieveData(KIO::Job*, const QByteArray& data)
-{
-    QString output(data);
-
-    PBIBuffer = PBIBuffer + output;
-}
-
 void PBM::slotReadPBIBuffer()
 {
     QTreeWidgetItemIterator it(*currentCheckingPBI);
     PBI *item = dynamic_cast<PBI*>(*it);
+    QString output, tmp;
 
-    QString output = PBIBuffer;
-    QString line, newPBIVersion, tmpMirror, tmpFilePath;
-    QStringList outputList;
-    if ( output.indexOf("Up2Date") == -1  && ! output.isEmpty())
-    {
+    // Read in the output from the update service
+    output = checkPBIProc->readAll().simplified();
 
-        outputList = output.split("\n");
-        for ( int i = 0; i < outputList.size(); i++)
-        {
-            line = outputList.at(i);
 
-             if (line.indexOf("NewVer:" ) ==  0 )
-             {
-                item->setDownloadVersion(line.replace("NewVer: ", ""));
-             }
-
-             if (line.indexOf("Mirror1:") == 0)
-             {
-                tmpMirror = line.replace("Mirror1: ", "");
-             }
-
-             if (line.indexOf("FileLoc:") == 0)
-             {
-                tmpFilePath = line.replace("FileLoc: ", "");
-             }
-             if (line.indexOf("MD5:") == 0)
-             {
-                item->setDownloadMD5(line.replace("MD5: ", ""));
-             } 
-             if (line.indexOf("MDATE:") == 0)
-             {
-                item->setDownloadMdate(line.replace("MDATE: ", ""));
-             } 
-        } // End of For loop reading line-by-line our data
-
-        
-
-        // Ensure we strip any "/" at the front of tmpFilePath
-        if ( tmpFilePath.indexOf("/") == 0 )
-        {
-          tmpFilePath = tmpFilePath.remove(0, 1);
-        }
-
-
-        // Set the download location now
-        item->setDownloadURLFile(tmpFilePath.simplified());
-        item->setDownloadMirror(tmpMirror.simplified());
-
-        // Check to ensure we have found all our variables and see if we need to update
-        if ( ! item->getDownloadVersion().isEmpty() && ! item->getDownloadMirror().isEmpty() && ! item->getDownloadURLFile().isEmpty() && ! item->getDownloadMD5().isEmpty() && item->isDownloadMdateNewer() )
-        {
+    if ( output.indexOf("Available:") == -1  && ! output.isEmpty())
+    {
+	  tmp = output.remove(0, output.indexOf("Available:"));
+	  tmp = tmp.replace("Available: ", "");
+          item->setDownloadVersion(tmp);
+	
           // Great, we have a PBI with an available update! Notify the widget now
           item->setUpdateAvail(true);
 
           // If the user has enabled updating all software automatically, mark it as so now
           if (autoUpdateSoftware )
              markPBIForUpdate(item);
-
-        } else {
-          // Update is invalid for some reason, no update for you!
-          item->setUpdateAvail(false);
-        }
     } else {
       // Update is invalid for some reason, no update for you!
       item->setUpdateAvail(false);
@@ -238,44 +132,11 @@
    return found;
 }
 
-void PBM::slotRegenPBIDownloadURL(PBI *item)
-{
-   // Make sure this tmpdir exists
-   system("mkdir -p '" + customTmpDir.toLatin1() + "' >/dev/null 2>/dev/null");
-
-   QString tmpMirror;
-
-   // Set the download location based on users mirror settings
-   switch(mirrorType) {
-      case AUTOMIRROR: 
-         tmpMirror = item->getDownloadMirror();
-      break;
-      case SELECTMIRROR: 
-         tmpMirror = mirrorURL;
-      break;
-      case CUSTOMMIRROR: 
-         tmpMirror = mirrorURL;
-      break;
-    }
-
-   // Ensure we have a "/" at the end of the mirror path 
-   if ( tmpMirror.lastIndexOf("/") != tmpMirror.size() )
-   {
-      tmpMirror = tmpMirror + "/";
-   }
-   item->setDownloadURL(tmpMirror.simplified() + item->getDownloadURLFile());
-}
-
 // Marks a PBI is ready for update
 void PBM::markPBIForUpdate(PBI *item)
 {
-   // Set the download file
-   QString downfile = item->getName().replace(" ", "") + "-" + item->getDownloadVersion() + ".pbi";
-   item->setDownloadFile(customTmpDir + "/" + downfile);
-
    // Mark the status as PBIUpgrading
    item->setWorkingStatus(PBIUPDATING);
-
    item->setStatusText(tr("Pending Upgrade"));
 }
 
@@ -285,15 +146,7 @@
 
   // Lets start by checking if we have any PBIs selected to update and populate the todo list
   if ( ! checkPBISelectedUpdates() ) 
-  {
      QMessageBox::critical( 0, tr("Update Manager"), tr("No software selected to update!"), QMessageBox::Ok );
-     return;
-  } else {
-
-     // Lets save our current PBIs state, in case we close the program
-
-  }
-
 }
 
 
@@ -336,9 +189,6 @@
     {
        isWorkingOnPBI = true;
 
-       // Regen the download URL with latest mirror settings
-       slotRegenPBIDownloadURL(item);
-
        // We've found a new PBI to work on, lets start it up
        item->setStatusText(tr("Starting Download"));
 
@@ -354,7 +204,6 @@
     currentWorkingPBI = new QTreeWidgetItemIterator(SoftwareListBox);
   }
   
-
   // Re-run this function to keep tabs on our children!
   QTimer::singleShot(300, this, SLOT(slotProcessPBIs() ) );
 }
@@ -370,7 +219,6 @@
   // Make sure this item hasn't been deleted
   if ( item->doDelete() ) {
      isWorkingOnPBI = false;
-     item->removeTmpFile();
      return;
   }
 
@@ -385,161 +233,35 @@
      isWorkingOnPBI = false;
      item->setStatusText(tr("Download failed! Please try again later."));
      item->setDownloadFailed(true);
-     item->removeTmpFile();
      return;
   }
 
-   // Update the status if the attempted download worked
-   if ( item->getDownloadAttempts() >= 1)
-       item->setStatusText(tr("Download failed... Attempting to re-download..."));
-   else
-       item->setStatusText(tr("Downloading..."));
+  fileWatcher->removePath("/var/db/pbi");
 
-   // Remove any leftover tmp file
-   item->removeTmpFile();
+  // Update the status if the attempted download worked
+  if ( item->getDownloadAttempts() >= 1)
+      item->setStatusText(tr("Download failed... Attempting to re-download..."));
+  else
+      item->setStatusText(tr("Downloading..."));
 
-   // Start the copy job
-   copyJob = KIO::file_copy(item->getDownloadURL(), item->getDownloadFile(), -1, KIO::HideProgressInfo);
-   connect(copyJob, SIGNAL(totalSize(KJob*, qulonglong)), this, SLOT(slotJobUpdateTotalSize( KJob*, qulonglong)));
-   connect(copyJob, SIGNAL(speed(KJob*, unsigned long)), this, SLOT(slotJobUpdateSpeed( KJob*, unsigned long)));
-   connect(copyJob, SIGNAL(processedSize(KJob*, qulonglong)), this, SLOT(slotJobUpdateProcessedSize( KJob*, qulonglong)));
-   connect(copyJob, SIGNAL(result(KJob*)), this, SLOT(slotDownloadPBIDone()));
-    
-}
-
-
-// Lets check to make sure the PBI download was good!
-void PBM::slotDownloadPBIDone()
-{
-  QTreeWidgetItemIterator it(*currentWorkingPBI);
-  PBI *item = dynamic_cast<PBI*>(*it);
-
-  // Make sure this item hasn't been deleted
-  if ( item->doDelete() ) {
-     isWorkingOnPBI = false;
-     item->removeTmpFile();
-     return;
-  }
-
-  if (copyJob->error() != 0)
-  {
-    // If the download didn't complete, lets increment the Redownload counter and try again
-    item->setDownloadAttempts(item->getDownloadAttempts() + 1);
-    slotDownloadPBIUpdate();
-  } else {
-    // Success!
-    item->setDownloadFailed(false);
-    
-    // The download finished, lets start the install / upgrade 
-    slotStartPBIInstall();
-  }
-}
-
-
-// Start installing the PBIs now!
-void PBM::slotStartPBIInstall()
-{
-  QTreeWidgetItemIterator it(*currentWorkingPBI);
-  PBI *item = dynamic_cast<PBI*>(*it);
-
-  // Lets make sure the PBI status didn't get changed while we were downloading
-  if ( item->getWorkingStatus() == PBIINACTIVE || item->doDelete() ) {
-     isWorkingOnPBI = false;
-     item->removeTmpFile();
-     return;
-  } 
-
-  // Stop the filewatcher until we are done
-  fileWatcher->stopScan();
-
-  // Make the checksum.sh script now
-  QFile file4( customTmpDir + "/.dopbi.sh" );
-  if ( file4.open( QIODevice::WriteOnly ) ) {
-    QTextStream stream4( &file4 );
-    stream4 << "#!/bin/sh\n";
-    stream4 << "DISPLAY="" ; export DISPLAY\n";
-    stream4 << "\n";
-
-    if ( item->getWorkingStatus() == PBIUPDATING )
-    {
-        item->setStatusText(tr("Upgrading..."));
-
-        stream4 << "sleep 10\n";
-        stream4 << "MD5=\"`cat '" + item->getDownloadFile() + "' | md5`\"\n";
-        stream4 << "if [ \"${MD5}\" != \"" + item->getDownloadMD5() + "\" ]\n";
-        stream4 << "then\n";
-        stream4 << "  rm '" + item->getDownloadFile() + "'\n";
-        stream4 << "  rm '" + customTmpDir + "/.dopbi.sh'\n";
-        stream4 << "  exit 255\n";
-        stream4 << "fi\n\n";
-
-        stream4 << "if [ -h '/Programs/" + item->getProgDirName() + "' ]\n" ;
-        stream4 << "then\n";
-        stream4 << "PBIDIR=\"`ls -al /Programs/" + item->getProgDirName()+ " | cut -d '>' -f 2-6 | cut -d ' ' -f 2 | sed 's," + item->getProgDirName() + ",,'`\"\n";
-        stream4 << "mkdir -p \"${PBIDIR}/" + item->getNewProgDirName() + "\"\n" ;
-        stream4 << "ln -s \"${PBIDIR}/" + item->getNewProgDirName() + "\" /Programs/" + item->getNewProgDirName() + "\n";
-        stream4 << "fi\n";
-        stream4 << "\n";
-        stream4 << "echo 'SETSTEPS: 1'\n";
-        stream4 << "echo 'MSG: Removing " + item->getProgDirName() + "'\n";
-        stream4 << "pbidelete -remove " + item->getProgDirName() + "\n\n";
-
-    } else {
-      item->setStatusText(tr("Installing..."));
-    }
-
-
-    stream4 << "echo 'SETSTEPS: 2'\n";
-    stream4 << "sleep 5\n";
-    stream4 << "echo 'MSG: Installing " + item->getNewProgDirName() + "'\n";
-    stream4 << "chmod 755 '" + item->getDownloadFile() + "'\n";
-    stream4 << "'" + item->getDownloadFile() + "' -text -accept\n";
-    stream4 << "if [ \"$?\" != \"0\" ]\n";
-    stream4 << "then\n";
-    // Don't delete the file if the user wants to keep them
-    if ( ! keepDownloadedSoftware )
-      stream4 << "  rm '" + item->getDownloadFile() + "'\n";
-    stream4 << "  rm '" + customTmpDir + "/.dopbi.sh'\n";
-    stream4 << "  exit 256\n";
-    stream4 << "fi\n";
-    stream4 << "echo 'SETSTEPS: 3'\n";
-    stream4 << "echo 'MSG: Finished installing " + item->getNewProgDirName() + "'\n";
-    // Don't delete the file if the user wants to keep them
-    if ( ! keepDownloadedSoftware )
-      stream4 << "rm '" + item->getDownloadFile() + "'\n";
-    stream4 << "rm '" + customTmpDir + "/.dopbi.sh'\n";
-    stream4 << "exit 0\n";
-    file4.close();
-
-  }
-
-
-  // start the update/install process
-  QString prog = "sh";
-  QStringList args;
-  args << customTmpDir + "/.dopbi.sh";
-
+  // Start the upgrade process
   upgradePBIProc = new QProcess( this );
   connect( upgradePBIProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotFinishedPBIInstall() ) );
-  //connect( upgradePBIProc, SIGNAL(readyReadStandardOutput()), this, SLOT(slotReadPBIStdout() ) );
-  upgradePBIProc->start(prog, args);
-
+  if ( item->getWorkingStatus() == PBINEWDOWNLOAD )
+    upgradePBIProc->start(QString("pbi_add"), QStringList() << "-r" << item->getName());
+  else
+    upgradePBIProc->start(QString("pbi_update"), QStringList() << item->getProgIndexName());
 }
 
-
 // Slot which checks a PBIs installation status and finishes up with this PBI
 void PBM::slotFinishedPBIInstall()
 {
   QTreeWidgetItemIterator it(*currentWorkingPBI);
   PBI *item = dynamic_cast<PBI*>(*it);
 
-  if ( upgradePBIProc->exitCode() == 255)
-  {
-     QMessageBox::critical( 0, tr("Online Update"), tr("The updated version of") + " " + item->getName() + \
-     " " + tr("failed the integrity check! Please try updating this PBI again later." ), QMessageBox::Ok );
-  } else if ( upgradePBIProc->exitStatus() == 256 ) {
-     QMessageBox::critical( 0, tr("Online Update"), tr("An error occurred while upgrading") + " " + \
-     item->getName() + " " + tr("You may need to re-install this PBI manually."), QMessageBox::Ok );
+  if ( upgradePBIProc->exitStatus() != 256 ) {
+     QMessageBox::critical( 0, tr("Online Update"), tr("An error occurred while installing") + " " + \
+     item->getName() + " " + tr("You may need to update this PBI manually."), QMessageBox::Ok );
   } else {
      // Update the status on the previous download to finished
      item->setStatusText(tr("Upgrade complete!"));
@@ -557,15 +279,6 @@
   if ( item->getWorkingStatus() == PBINEWDOWNLOAD ) {
     item->setDelete(true);
     item->setStatusText(tr("Install complete!"));
-
-    // Create the desktop icons for this app
-    if (autoDesktopIcons) {
-        QString prog = "su";
-        QStringList args;
-        args << RealUserName << "-c" << "/Programs/" + item->getProgDirName() + "/.sbin/install-desktop-icons.sh";
-        installPBIDesktopIcon = new QProcess( this );
-        installPBIDesktopIcon->start(prog, args);
-    }
   }
 
   item->setWorkingStatus(PBIINACTIVE);
@@ -577,7 +290,7 @@
   saveStatePBI();
 
   // Restart the PBI file watcher
-  fileWatcher->startScan();
+  fileWatcher->addPath("/var/db/pbi");
 
   // Mark this PBI as finished
   isWorkingOnPBI = false;
@@ -585,50 +298,6 @@
 }
 
 
-void PBM::slotJobUpdateTotalSize( KJob *, qulonglong size)
-{
-  copyLabelTotalSize = size;
-  generateCopyLabel();
-}
-
-
-void PBM::slotJobUpdateProcessedSize( KJob *workingjob, qulonglong size)
-{
-  QTreeWidgetItemIterator it(*currentWorkingPBI);
-  PBI *item = dynamic_cast<PBI*>(*it);
-
-  // Make sure this item hasn't been deleted
-  if ( item->doDelete() ) {
-     workingjob->kill();
-     isWorkingOnPBI = false;
-     item->removeTmpFile();
-     return;
-  }
-
-  copyLabelProcessedSize = size;
-  generateCopyLabel();
-}
-
-
-void PBM::slotJobUpdateSpeed( KJob *, unsigned long speed)
-{
-  copyLabelSpeed = speed;
-  generateCopyLabel();
-}
-
-
-void PBM::generateCopyLabel()
-{
-  QTreeWidgetItemIterator it(*currentWorkingPBI);
-  PBI *item = dynamic_cast<PBI*>(*it);
-
-  QString totalSize = QString::number(copyLabelTotalSize / 1048576) + "MB";
-  QString processedSize = QString::number(copyLabelProcessedSize / 1048576) + "MB";
-  QString speed = QString::number(copyLabelSpeed / 1024) + "KB/s";
-
-  item->setStatusText(tr("Downloading: ") + processedSize + tr(" of ") + totalSize + " (" + speed + ")");
-}
-
 void PBM::slotPBIRightClicked()
 {
    QTreeWidgetItemIterator it(SoftwareListBox);
@@ -636,16 +305,10 @@
       PBI *item = dynamic_cast<PBI*>(*it);
       if ( (*it)->isSelected() )
       {
-         popup = new KMenu();
+         popup = new QMenu();
          if ( ! item->isNewDownload() ) {
            popup->addAction( tr("Uninstall") + " " + item->getName() , this, SLOT(RemoveButtonSlot()));
            popup->addSeparator();
-
-           // Check if the desktop restore icons feature exists for this PBI
-           QFile myfile("/Programs/" + item->getProgDirName() + "/.sbin/install-desktop-icons.sh");
-           if (myfile.exists() )
-             popup->addAction( tr("Install Desktop Icons"), this, SLOT(installPBIDesktopIcons()));
-
            popup->exec( QCursor::pos() );
          } else {
            // If this is a new download, offer cancel option
@@ -682,27 +345,8 @@
    }
 }
 
-// Slot to re-create desktop icons
-void PBM::installPBIDesktopIcons()
-{
-   QTreeWidgetItemIterator it(SoftwareListBox);
-   while (*it) {
-      PBI *item = dynamic_cast<PBI*>(*it);
-      if ( (*it)->isSelected() )
-      {
-        QString prog = "su";
-        QStringList args;
-        args << RealUserName << "-c" << "/Programs/" + item->getProgDirName() + "/.sbin/install-desktop-icons.sh";
-        installPBIDesktopIcon = new QProcess( this );
-        installPBIDesktopIcon->start(prog, args);
-        return;
-      }
-      it++;
-    }
-}
-
 // Function which schedules a new PBI for download 
-void PBM::scheduleNewPBIDownload(QString name, QString ver, QString url, QString mirror)
+void PBM::scheduleNewPBIDownload(QString name, QString ver)
 {
   tabPBM->setCurrentIndex(1);
 
@@ -714,12 +358,8 @@
   pbi->setName(name);
   pbi->setVersion(ver);
   pbi->setDownloadVersion(ver);
-  pbi->setDownloadURLFile(url);
-  pbi->setDownloadMirror(mirror);
   pbi->setWorkingStatus(PBINEWDOWNLOAD);
   pbi->setUpdateAvail(false);
-  QString downfile = name.replace(" ", "") + "-" + ver + ".pbi";
-  pbi->setDownloadFile(customTmpDir + "/" + downfile);
 
   // Add to the list box
   SoftwareListBox->addTopLevelItem(pbi); 
@@ -749,9 +389,6 @@
       settings.setArrayIndex(i);
       settings.setValue("IconPath", item->getIconPath());
       settings.setValue("Version", item->getVersion());
-      settings.setValue("DownloadURLFile", item->getDownloadURLFile());
-      settings.setValue("DownloadFile", item->getDownloadFile());
-      settings.setValue("DownloadMirror", item->getDownloadMirror());
 
       // Massage the name to remove the download- in front of it
       tmp = item->getName();
@@ -789,9 +426,6 @@
      pbi->setName(settings.value("Name").toString());
      pbi->setVersion(settings.value("Version").toString());
      pbi->setDownloadVersion(settings.value("Version").toString());
-     pbi->setDownloadURLFile(settings.value("DownloadURLFile").toString());
-     pbi->setDownloadFile(settings.value("DownloadFile").toString());
-     pbi->setDownloadMirror(settings.value("DownloadMirror").toString());
 
      // Add to the list box
      SoftwareListBox->addTopLevelItem(pbi); 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-sysupdate.cpp
===================================================================
--- pcbsd/current/SoftwareManager/softmanager-sysupdate.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-sysupdate.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -4,6 +4,7 @@
 #include <QFlags>
 #include <QWebView>
 #include <QSettings>
+#include <QDateTime>
 
 
 /***********************************************************************************/
@@ -24,13 +25,13 @@
           // Check if this patch is ignored or not
           QFile file( "/PCBSD/SystemUpdater/system-updates/ignored/" + SysUpdatePatchFile[idnum] );
           if ( ! file.exists() ) {
-              popup = new KMenu();
+              popup = new QMenu();
               popup->addAction( tr("Ignore this update") , this, SLOT(slotIgnoreSysUpdate() )  );
               popup->addSeparator();
               popup->addAction( tr("View update details") , this, SLOT(slotViewDetailsClicked() )  );
               popup->exec( QCursor::pos() );
           } else {
-              popup = new KMenu();
+              popup = new QMenu();
               popup->addAction( tr("Un-Ignore this update") , this, SLOT(slotUnIgnoreSysUpdate() )  );
               popup->addSeparator();
               popup->addAction( tr("View update details") , this, SLOT(slotViewDetailsClicked() )  );
@@ -212,21 +213,33 @@
    }
 
   QString patchfile = "patch-" + PatchSet + "-" + Version + "-" + Arch + ".tgz";
-  sysPatchsetTmpFile = "/PCBSD/tmp/" + patchfile;
+  sysPatchsetTmpFile = "/tmp/" + patchfile;
   QString patchurl = SysUrl + "/" + patchfile;
 
-  // Start our KIO copy now
-  sysFetchJob = KIO::file_copy( patchurl, sysPatchsetTmpFile, -1, KIO::HideProgressInfo | KIO::Overwrite);
-  connect(sysFetchJob, SIGNAL(result(KJob *)), this, SLOT(slotSysUpdateCheckFinished() ) );
+    // Start our QNetworkManager Download now
+  sysFetchJob = new QNetworkAccessManager(this);
+    
+  QNetworkRequest netRequest;
+  netRequest.setUrl(QUrl(patchurl));
   
+  sysFetchReply = sysFetchJob->get(netRequest);
+   
+  connect(sysFetchJob, SIGNAL(finished(QNetworkReply *)), this, SLOT(slotSysUpdateCheckFinished() ) );
+  connect(sysFetchReply, SIGNAL(readyRead()), this, SLOT(slotGetSysData() ) );
 }
 
 
+void PBM::slotGetSysData()
+{
+  QFile sysSaveFile(sysPatchsetTmpFile);
+  if (!sysSaveFile.open(QIODevice::WriteOnly | QIODevice::Append)) {
+         return;
+  }
+  sysSaveFile.write(sysFetchReply->readAll());
+  sysSaveFile.close();
+}
 
 
-
-
-
 void PBM::slotSysUpdateCheckFinished() {
 
    // Now traverse the directory, see if we have updates.
@@ -235,7 +248,7 @@
   args << "/PCBSD/SystemUpdater/bin/readSysUpdates.sh" << Version;
 
   // Check to see if the update download was successful and warn if not
-  if ( sysFetchJob->error() != 0 && sysFetchJob->error() != 101 )
+  if ( sysFetchReply->error() != QNetworkReply::NoError )
   {
     QString newMsg = "<font color=\"#ff0000\">" + tr("Checking for updates failed!") + "</font>";
     textSysUpdatesLabel->setText(newMsg);
@@ -742,18 +755,33 @@
    QString downloadURL = tmpMirror.simplified() + SysUpdateURL[currentSysWorkingItem];
 
 
-
-    copyJob = KIO::file_copy(downloadURL, customTmpDir + "/patch" + tmp.setNum(currentSysWorkingItem) + ".lzma", -1, KIO::HideProgressInfo | KIO::Overwrite);
+   // Download the file now
+   sysCopyJob = new QNetworkAccessManager(this);
+     
+   QNetworkRequest netRequest;
+   netRequest.setUrl(QUrl(downloadURL));
     
-    connect(copyJob, SIGNAL(totalSize(KJob*, qulonglong)), UpdaterStatusDialog, SLOT(slotJobUpdateTotalSize( KJob*, qulonglong)));
-    connect(copyJob, SIGNAL(percent(KJob*, unsigned long)), UpdaterStatusDialog, SLOT(slotJobSetPercent(KJob*, unsigned long)));
-    connect(copyJob, SIGNAL(speed(KJob*, unsigned long)), UpdaterStatusDialog, SLOT(slotJobUpdateSpeed( KJob*, unsigned long)));
-    connect(copyJob, SIGNAL(processedSize(KJob*, qulonglong)), UpdaterStatusDialog, SLOT(slotJobUpdateProcessedSize( KJob*, qulonglong)));
-    connect(copyJob, SIGNAL(result(KJob *)), this, SLOT(slotStartCheckSysMD5()));
+   sysCopyReply = sysCopyJob->get(netRequest);
+    
+   connect(sysCopyJob, SIGNAL(finished(QNetworkReply *)), this, SLOT(slotStartCheckSysMD5() ) );
+   connect(sysCopyReply, SIGNAL(readyRead()), this, SLOT(slotRecieveSysCopyData() ) );
+   connect(sysCopyReply, SIGNAL(downloadProgress(qint64, qint64)), UpdaterStatusDialog, SLOT(slotJobUpdateProcessedSize( qint64, qint64)));
 
 
 }
 
+void PBM::slotGetSysCopyData()
+{
+  QString tmp;
+  QFile sysSaveFile(customTmpDir + "/patch" + tmp.setNum(currentSysWorkingItem) + ".lzma");
+  if (!sysSaveFile.open(QIODevice::WriteOnly | QIODevice::Append)) {
+         return;
+  }
+  sysSaveFile.write(sysCopyReply->readAll());
+  sysSaveFile.close();
+}
+
+
 void PBM::slotStartCheckSysMD5()
 {
 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-webview.cpp
===================================================================
--- pcbsd/current/SoftwareManager/softmanager-webview.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-webview.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -22,22 +22,22 @@
   progressPBIWeb->setValue(1);
   PBIDIRSID="";
   PBISIDBuffer = "";
+
   // Lets start by getting a SID from pbidir
-
-  // We are ready! Lets send the request to the server and see what updates we may have
-  QString postData = "";
-  QString url = "http://www.pbidir.com/bt/getsid";
-  getPBISIDJob = KIO::http_post( url, postData.toUtf8(), KIO::HideProgressInfo);
-  connect(getPBISIDJob, SIGNAL(result(KJob *)), this, SLOT(slotPBIgetSIDDone(KJob *)) );
-  connect(getPBISIDJob, SIGNAL(data(KIO::Job *, const QByteArray&)), this, SLOT(slotRecievePBISIDData(KIO::Job *, const QByteArray& )) );
-
+  getSIDJob = new QNetworkAccessManager(this);
+  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() ) );
 }
 
-void PBM::slotRecievePBISIDData(KIO::Job*, const QByteArray& data)
+void PBM::slotRecievePBISIDData()
 {
    progressPBIWeb->setValue(2);
-   QString output(data);
-   PBISIDBuffer = PBISIDBuffer + output;
+   while (sidReply->canReadLine() )
+     PBISIDBuffer = PBISIDBuffer + sidReply->readLine() + "\n";
 }
 
 void PBM::slotReadPBISIDBuffer()
@@ -86,15 +86,20 @@
 
      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 );        
-     setPBISIDJob = KIO::http_post( url, postData.toUtf8(), KIO::HideProgressInfo);
-     connect(setPBISIDJob, SIGNAL(result(KJob *)), this, SLOT(slotPBIsetSIDDone(KJob *)) );
+
+     setSIDJob = new QNetworkAccessManager(this);
+     QNetworkRequest netRequest;
+     netRequest.setUrl(QUrl(url));
+     sidReply2 = getSIDJob->get(netRequest);
+     connect(setSIDJob, SIGNAL(finished(QNetworkReply *)), this, SLOT(slotPBIsetSIDDone() ) );
+
      progressPBIWeb->setValue(5);
    }
 }
 
-void PBM::slotPBIgetSIDDone(KJob *myjob)
+void PBM::slotPBIgetSIDDone()
 {
-  if ( myjob->error())
+  if ( sidReply->error() != QNetworkReply::NoError)
   {
     // We had an error fetching the SID
     slotSetWebFailed();
@@ -104,9 +109,9 @@
   }
 }
 
-void PBM::slotPBIsetSIDDone(KJob *myjob)
+void PBM::slotPBIsetSIDDone()
 {
-  if ( myjob->error())
+  if ( sidReply2->error() != QNetworkReply::NoError)
   {
     // We had an error fetching the SID
     slotSetWebFailed();
@@ -254,7 +259,7 @@
     switch( QMessageBox::warning( this, tr("Install Software?"), tr("Do you want to install") + " " + name + " " + version + "?" + replaceStr, tr("OK"), tr("Cancel"), 0, 0, 1 ) ) {
             case 0: // The user clicked the OK again button or pressed Enter
                  // Schedule this PBI for download
-                 scheduleNewPBIDownload(name, version, pbiurl, mirror);
+                 scheduleNewPBIDownload(name, version);
             break;
             case 1: // The user clicked the cancel button
                  return;

Modified: pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.cpp
===================================================================
--- pcbsd/current/SoftwareManager/updaterDialog.cpp	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.cpp	2010-08-10 20:44:25 UTC (rev 7373)
@@ -97,37 +97,21 @@
 }
 
 
-void updaterStatus::slotJobSetPercent( KJob*, unsigned long percent )
+void updaterStatus::slotJobUpdateProcessedSize( qint64 rec, qint64 total )
 {
-   progressInstall->setValue(percent);
-}
-
-
-void updaterStatus::slotJobUpdateTotalSize( KJob *, qulonglong size )
-{
-   totalSize = size;
+   totalSize = total;
+   processedSize = rec;
+   progressInstall->setMaximum(total);
+   progressInstall->setValue(rec);
    generateCopyLabel();
 }
 
 
-void updaterStatus::slotJobUpdateProcessedSize( KJob *, qulonglong size )
-{
-   processedSize = size;
-   generateCopyLabel();
-}
-
-
-void updaterStatus::slotJobUpdateSpeed( KJob *, unsigned long speed )
-{
-   this->speed = speed;
-   generateCopyLabel();
-}
-
-
 void updaterStatus::generateCopyLabel()
 {
    QString totalSize = QString::number(this->totalSize / 1048576) + "MB";
    QString processedSize = QString::number(this->processedSize / 1048576) + "MB";
-   QString speed = QString::number(this->speed / 1024) + "KB/s";
-   textInstallStatusLabel->setText(processedSize + tr(" of ") + totalSize + " (" + speed + ")");
+   //QString speed = QString::number(this->speed / 1024) + "KB/s";
+   //textInstallStatusLabel->setText(processedSize + tr(" of ") + totalSize + " (" + speed + ")");
+   textInstallStatusLabel->setText(processedSize + tr(" of ") + totalSize);
 }

Modified: pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.h
===================================================================
--- pcbsd/current/SoftwareManager/updaterDialog.h	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.h	2010-08-10 20:44:25 UTC (rev 7373)
@@ -3,7 +3,6 @@
 #define UPDATERDIALOG_H
 
 #include "ui_updaterDialog.h"
-#include <kio/job.h>
 #include <qstring.h>
 
 class updaterStatus : public QDialog, private Ui::updaterStatus
@@ -28,10 +27,7 @@
 
 
 public slots:
-    void slotJobSetPercent(KJob*, unsigned long percent);
-    void slotJobUpdateTotalSize(KJob*, qulonglong size);
-    void slotJobUpdateProcessedSize(KJob*, qulonglong size);
-    void slotJobUpdateSpeed(KJob*, unsigned long speed);
+    void slotJobUpdateProcessedSize(qint64 rec, qint64 total);
 
 protected:
     void closeEvent( QCloseEvent *event );
@@ -39,9 +35,9 @@
 private slots:
 
 private:
-    KIO::filesize_t totalSize;
-    KIO::filesize_t processedSize;
     unsigned long speed;
+    qint64 totalSize;
+    qint64 processedSize;
 
 signals:
 

Modified: pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.ui
===================================================================
--- pcbsd/current/SoftwareManager/updaterDialog.ui	2010-08-09 18:36:08 UTC (rev 7368)
+++ pcbsd/current/src-qt4/pc-softwaremanager/updaterDialog.ui	2010-08-10 20:44:25 UTC (rev 7373)
@@ -101,7 +101,6 @@
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <includes>
-  <include location="global">kio/job.h</include>
  </includes>
  <resources>
   <include location="SoftwareManager.qrc"/>

Modified: pcbsd/current/src-qt4/src-qt4.pro
===================================================================
--- pcbsd/current/src-qt4/src-qt4.pro	2010-08-10 15:46:14 UTC (rev 7372)
+++ pcbsd/current/src-qt4/src-qt4.pro	2010-08-10 20:44:25 UTC (rev 7373)
@@ -7,6 +7,7 @@
 	 pc-pfmanager \
 	 pc-netmanager \
 	 pc-servicemanager \
+	 pc-softwaremanager \
 	 pc-sounderror \
 	 pc-su \
 	 pc-sysmanager \



More information about the Commits mailing list