[PC-BSD Commits] r21834 - pcbsd/current/src-qt4/pc-controlpanel

svn at pcbsd.org svn at pcbsd.org
Tue Mar 12 15:09:30 PDT 2013


Author: kris
Date: 2013-03-12 22:09:30 +0000 (Tue, 12 Mar 2013)
New Revision: 21834

Modified:
   pcbsd/current/src-qt4/pc-controlpanel/mainwnd.cpp
Log:

Fix a bug in the control panel causing it to hang when the directory
gets auto-refreshed



Modified: pcbsd/current/src-qt4/pc-controlpanel/mainwnd.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-controlpanel/mainwnd.cpp	2013-03-12 12:10:49 UTC (rev 21833)
+++ pcbsd/current/src-qt4/pc-controlpanel/mainwnd.cpp	2013-03-12 22:09:30 UTC (rev 21834)
@@ -105,6 +105,7 @@
 void MainWnd::setupGroups()
 {
 
+    //qDebug() << "Running setup groups";
     setupGroup(&SoftwareList, ui->SoftwareGBox);
     setupGroup(&SystemList, ui->SystemGBox);
     setupGroup(&HardwareList, ui->HardwareGBox);
@@ -119,13 +120,15 @@
 	QGridLayout *layout = new QGridLayout(Parrent);
 	(*List)=new QGroupList(Parrent);
 	layout->addWidget(*List);
-	Parrent->setLayout(layout);        
+	Parrent->setLayout(layout); 
+        //qDebug() << "SetupGroup";
         QObject::connect(*List, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(on_itemActivated(QListWidgetItem*)));
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void MainWnd::fillGroups()
 {
+        //qDebug() << "Running fillGroups";
         mRefreshMutex.lock();
 
         bool isVisible;
@@ -173,6 +176,12 @@
           ToolsList->setGridSize(QSize(NetworkingList->sizeHintForColumn(0), NetworkingList->sizeHintForRow(0)));
           DEList->setGridSize(QSize(NetworkingList->sizeHintForColumn(0), NetworkingList->sizeHintForRow(0)));
           NetworkingList->setGridSize(QSize(NetworkingList->sizeHintForColumn(0), NetworkingList->sizeHintForRow(0)));
+          SystemList->update();
+          SoftwareList->update();
+          HardwareList->update();
+          ToolsList->update();
+          DEList->update();
+          NetworkingList->update();
           //qDebug() << NetworkingList->sizeHintForRow(0);
           //qDebug() << NetworkingList->sizeHintForColumn(0);
         } 
@@ -415,7 +424,11 @@
 void MainWnd::onDirectoryChanged(const QString& path)
 {
     //Refresh if items or installed pbis dir was changed
+    QObject::disconnect(&mDirWatcher,0,0,0);
+    //qDebug() << "onDirectoryChanged";
     on_toolButton_2_clicked();
+    QObject::connect(&mDirWatcher, SIGNAL(directoryChanged(const QString &)),
+                     this, SLOT(onDirectoryChanged(const QString &)));
 }
 
 ///////////////////////////////////////////////////////////////////////////////



More information about the Commits mailing list