[PC-BSD Commits] r2098 - pbibuild/pbi-source/PBIsource

svn at pcbsd.org svn at pcbsd.org
Fri Jun 13 11:32:31 PDT 2008


Author: kris
Date: 2008-06-13 11:32:31 -0700 (Fri, 13 Jun 2008)
New Revision: 2098

Modified:
   pbibuild/pbi-source/PBIsource/pbi.cpp
   pbibuild/pbi-source/PBIsource/pbi.h
Log:

Fixed up the layout functions in PBI installer, margins look proper now



Modified: pbibuild/pbi-source/PBIsource/pbi.cpp
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.cpp	2008-06-13 15:46:44 UTC (rev 2097)
+++ pbibuild/pbi-source/PBIsource/pbi.cpp	2008-06-13 18:32:31 UTC (rev 2098)
@@ -22,6 +22,7 @@
 #include <qtextstream.h>
 #include <qdir.h>
 #include <qstring.h>
+#include <qlist.h>
 #include "pbi.h"
 #include "ui_pbi.h"
 using namespace std;
@@ -1737,7 +1738,7 @@
     
 }
 
-/*
+
 void PBI::layOutButtonRow( QHBoxLayout *layout )
 {
     QBoxLayout * h = new QBoxLayout( QBoxLayout::LeftToRight );
@@ -1750,18 +1751,20 @@
     aHBar->hide();
     aHBar->setName("<hr>");
     
-    QObjectList *l = topLevelWidget()->queryList( "QFrame", "<hr>" );
-    QObjectListIt it( *l ); // iterate over the buttons
+    QObjectList l = topLevelWidget()->queryList( "QFrame", "<hr>" );
+    QList<QObject *> it( l ); 
     QObject *obj;
 
-    while ( (obj = it.current()) != 0 ) {
+    for (int i = 0; i < it.size(); ++i)
+    {
+      obj = it.at(i);
         // for each found object...
-        ++it;
-          ((QFrame*)obj)->setMargin(0);
+          ((QFrame*)obj)->setContentsMargins(0, 0, 0, 0);
           ((QFrame*)obj)->setLineWidth(1);
           ((QFrame*)obj)->setFixedHeight(2);
     }
-    delete l; // delete the list, not the objects
+
+    //delete l; // delete the list, not the objects
     
     
     layout->addSpacing( 6 );
@@ -1794,8 +1797,8 @@
      repaint();
       
 }
-*/
 
+
 void PBI::checkCustomGraphics()
 {
     

Modified: pbibuild/pbi-source/PBIsource/pbi.h
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.h	2008-06-13 15:46:44 UTC (rev 2097)
+++ pbibuild/pbi-source/PBIsource/pbi.h	2008-06-13 18:32:31 UTC (rev 2098)
@@ -20,7 +20,7 @@
         {
           setupUi(this);
         }
-//    void layOutButtonRow( QHBoxLayout * layout );
+    void layOutButtonRow( QHBoxLayout * layout );
     void checkCustomGraphics();
     void uninstall();
     void extractOnly();



More information about the Commits mailing list