[PC-BSD Commits] r4594 - pcbsd/trunk/kcmSoftwareManagerLauncher

svn at pcbsd.org svn at pcbsd.org
Tue Oct 6 22:13:01 PDT 2009


Author: kris
Date: 2009-10-06 22:13:00 -0700 (Tue, 06 Oct 2009)
New Revision: 4594

Modified:
   pcbsd/trunk/kcmSoftwareManagerLauncher/kcm.cpp
   pcbsd/trunk/kcmSoftwareManagerLauncher/kcmSML.pro
   pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.cpp
   pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.h
   pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.ui
Log:

Updated the kcmSoftwareManagerLauncher, QT4.5 native now



Modified: pcbsd/trunk/kcmSoftwareManagerLauncher/kcm.cpp
===================================================================
--- pcbsd/trunk/kcmSoftwareManagerLauncher/kcm.cpp	2009-10-07 03:35:40 UTC (rev 4593)
+++ pcbsd/trunk/kcmSoftwareManagerLauncher/kcm.cpp	2009-10-07 05:13:00 UTC (rev 4594)
@@ -1,6 +1,5 @@
 #include <qlayout.h>
-//Added by qt3to4:
-#include <Q3GridLayout>
+#include <QGridLayout>
 
 #include <klocale.h>
 #include <kglobal.h>
@@ -17,8 +16,7 @@
 PCBSDPBM::PCBSDPBM(QWidget *parent, const QVariantList &lst)
    :    KCModule(PCBSDPBMFactory::componentData(), parent, lst)
 {
-  layout = new Q3GridLayout(this);
-  layout->setAutoAdd(true);
+  layout = new QGridLayout(this);
   
   buttons();
   
@@ -26,7 +24,8 @@
   //NotRoot *nroot = new NotRoot(parent);
   NotRoot *nroot = new NotRoot();
   nroot->programInit();
-  nroot->reparent(this, QPoint());
+  layout->addWidget(nroot);
+  nroot->setParent(this);
    
 }
 

Modified: pcbsd/trunk/kcmSoftwareManagerLauncher/kcmSML.pro
===================================================================
--- pcbsd/trunk/kcmSoftwareManagerLauncher/kcmSML.pro	2009-10-07 03:35:40 UTC (rev 4593)
+++ pcbsd/trunk/kcmSoftwareManagerLauncher/kcmSML.pro	2009-10-07 05:13:00 UTC (rev 4594)
@@ -13,18 +13,12 @@
 
 FORMS	= notroot.ui
 
-IMAGES	= application.png \
-	NewLogoSmall.png
-
 TARGET  = kcm_pcbsdpbm
 
 DESTDIR = /usr/local/kde4/lib/kde4
 
 TRANSLATIONS = kcmSML_en_US.ts 
 
-QT +=  qt3support
-
 INCLUDEPATH     += /usr/PCBSD/includes /usr/local/kde4/include
 
 QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib
-

Modified: pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.cpp
===================================================================
--- pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.cpp	2009-10-07 03:35:40 UTC (rev 4593)
+++ pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.cpp	2009-10-07 05:13:00 UTC (rev 4594)
@@ -1,6 +1,4 @@
-//Added by qt3to4:
-#include <Q3TextStream>
-#include <Q3ValueList>
+#include <QTextStream>
 #include <QPixmap>
 #include <QTimer>
 /***************************************************************************
@@ -41,13 +39,11 @@
 void NotRoot::slotLaunchAdmin()
 {
     // Launch the kcmshell4 process as root
-    launchAdminProc = new Q3Process( this );
-    launchAdminProc->addArgument( "kdesu" );
-    launchAdminProc->addArgument( "pcSoftwareManager" );
- 
-    if ( !launchAdminProc->start() ) {
- 
-    }
+    launchAdminProc = new QProcess( this );
+    QString prog = "kdesu";
+    QStringList args;
+    args << "pcSoftwareManager";
+    launchAdminProc->start(prog, args);
 }
 
 

Modified: pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.h
===================================================================
--- pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.h	2009-10-07 03:35:40 UTC (rev 4593)
+++ pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.h	2009-10-07 05:13:00 UTC (rev 4594)
@@ -4,7 +4,7 @@
 #include <qfile.h>
 #include <qmessagebox.h>
 #include <qdialog.h>
-#include <Q3Process>
+#include <QProcess>
 #include "ui_notroot.h"
 
 class NotRoot : public QDialog, private Ui::NotRoot
@@ -25,7 +25,7 @@
 	void slotLaunchAdmin();
 
 private:
-	Q3Process *launchAdminProc;
+	QProcess *launchAdminProc;
 
 signals:
 

Modified: pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.ui
===================================================================
--- pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.ui	2009-10-07 03:35:40 UTC (rev 4593)
+++ pcbsd/trunk/kcmSoftwareManagerLauncher/notroot.ui	2009-10-07 05:13:00 UTC (rev 4594)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>NotRoot</class>
- <widget class="QDialog" name="NotRoot" >
-  <property name="geometry" >
+ <widget class="QDialog" name="NotRoot">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,21 +10,21 @@
     <height>409</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Root Access Required</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout" >
-   <item row="0" column="0" >
-    <layout class="QHBoxLayout" name="horizontalLayout" >
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
-      <spacer name="spacer3_2" >
-       <property name="orientation" >
+      <spacer name="spacer3_2">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeType" >
+       <property name="sizeType">
         <enum>QSizePolicy::Expanding</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>151</width>
          <height>21</height>
@@ -32,33 +33,33 @@
       </spacer>
      </item>
      <item>
-      <widget class="QLabel" name="pixmapLabel2" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+      <widget class="QLabel" name="pixmapLabel2">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
-       <property name="pixmap" >
-        <pixmap resource="PBM.qrc" >:/NewLogoSmall.png</pixmap>
+       <property name="pixmap">
+        <pixmap resource="kcmSML.qrc">:/NewLogoSmall.png</pixmap>
        </property>
-       <property name="scaledContents" >
+       <property name="scaledContents">
         <bool>true</bool>
        </property>
-       <property name="wordWrap" >
+       <property name="wordWrap">
         <bool>false</bool>
        </property>
       </widget>
      </item>
      <item>
-      <spacer name="spacer4_2" >
-       <property name="orientation" >
+      <spacer name="spacer4_2">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeType" >
+       <property name="sizeType">
         <enum>QSizePolicy::Expanding</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>161</width>
          <height>21</height>
@@ -68,15 +69,15 @@
      </item>
     </layout>
    </item>
-   <item row="1" column="0" >
-    <spacer name="spacer3" >
-     <property name="orientation" >
+   <item row="1" column="0">
+    <spacer name="spacer3">
+     <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeType" >
+     <property name="sizeType">
       <enum>QSizePolicy::Fixed</enum>
      </property>
-     <property name="sizeHint" stdset="0" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
        <height>30</height>
@@ -84,17 +85,17 @@
      </property>
     </spacer>
    </item>
-   <item row="2" column="0" >
-    <layout class="QHBoxLayout" name="horizontalLayout_2" >
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
-      <spacer name="spacer5" >
-       <property name="orientation" >
+      <spacer name="spacer5">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeType" >
+       <property name="sizeType">
         <enum>QSizePolicy::Fixed</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>61</width>
          <height>21</height>
@@ -103,39 +104,39 @@
       </spacer>
      </item>
      <item>
-      <widget class="QLabel" name="textLabel1" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
+      <widget class="QLabel" name="textLabel1">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
-       <property name="frameShape" >
+       <property name="frameShape">
         <enum>QFrame::NoFrame</enum>
        </property>
-       <property name="frameShadow" >
+       <property name="frameShadow">
         <enum>QFrame::Plain</enum>
        </property>
-       <property name="text" >
-        <string>This program must be run as root. Click the "Administrator Mode" button below or restart the program as root.</string>
+       <property name="text">
+        <string>This program must be run as root. Click the &quot;Administrator Mode&quot; button below or restart the program as root.</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignVCenter</set>
        </property>
-       <property name="wordWrap" >
+       <property name="wordWrap">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
-      <spacer name="spacer6" >
-       <property name="orientation" >
+      <spacer name="spacer6">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeType" >
+       <property name="sizeType">
         <enum>QSizePolicy::Fixed</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>61</width>
          <height>21</height>
@@ -145,12 +146,12 @@
      </item>
     </layout>
    </item>
-   <item row="3" column="0" >
-    <spacer name="verticalSpacer" >
-     <property name="orientation" >
+   <item row="3" column="0">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeHint" stdset="0" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
        <height>51</height>
@@ -158,14 +159,14 @@
      </property>
     </spacer>
    </item>
-   <item row="4" column="0" >
-    <layout class="QHBoxLayout" name="horizontalLayout_3" >
+   <item row="4" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_3">
      <item>
-      <spacer name="horizontalSpacer" >
-       <property name="orientation" >
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
@@ -174,18 +175,18 @@
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="pushAdmin" >
-       <property name="text" >
+      <widget class="QPushButton" name="pushAdmin">
+       <property name="text">
         <string>Run in Administrator Mode</string>
        </property>
       </widget>
      </item>
      <item>
-      <spacer name="horizontalSpacer_2" >
-       <property name="orientation" >
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
@@ -195,15 +196,15 @@
      </item>
     </layout>
    </item>
-   <item row="5" column="0" >
-    <spacer name="spacer4" >
-     <property name="orientation" >
+   <item row="5" column="0">
+    <spacer name="spacer4">
+     <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeType" >
+     <property name="sizeType">
       <enum>QSizePolicy::Expanding</enum>
      </property>
-     <property name="sizeHint" stdset="0" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
        <height>170</height>
@@ -213,10 +214,10 @@
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <layoutdefault spacing="6" margin="11"/>
  <resources>
-  <include location="PBM.qrc" />
+  <include location="kcmSML.qrc"/>
+  <include location="PBM.qrc"/>
  </resources>
  <connections/>
 </ui>



More information about the Commits mailing list