[PC-BSD Commits] r8243 - pcbsd/stable/pcbsdusermanager

svn at pcbsd.org svn at pcbsd.org
Tue Dec 21 06:53:59 PST 2010


Author: kris
Date: 2010-12-21 06:53:59 -0800 (Tue, 21 Dec 2010)
New Revision: 8243

Modified:
   pcbsd/stable/pcbsdusermanager/SimpleDlg.ui
   pcbsd/stable/pcbsdusermanager/adddlgcode.cpp
   pcbsd/stable/pcbsdusermanager/adduser.ui
   pcbsd/stable/pcbsdusermanager/changepasscode.cpp
   pcbsd/stable/pcbsdusermanager/group.cpp
   pcbsd/stable/pcbsdusermanager/group.h
   pcbsd/stable/pcbsdusermanager/main.cpp
   pcbsd/stable/pcbsdusermanager/mainDlg.ui
   pcbsd/stable/pcbsdusermanager/maindlgcode.cpp
   pcbsd/stable/pcbsdusermanager/maindlgcode.h
   pcbsd/stable/pcbsdusermanager/pcbsdusermanager.cpp
   pcbsd/stable/pcbsdusermanager/pcbsdusermanager.pro
   pcbsd/stable/pcbsdusermanager/simpleaddcode.cpp
   pcbsd/stable/pcbsdusermanager/simpledlgcode.cpp
   pcbsd/stable/pcbsdusermanager/user.cpp
   pcbsd/stable/pcbsdusermanager/usermanagerback.cpp
   pcbsd/stable/pcbsdusermanager/usermanagerback.h
Log:

MFC the QT4 only user-manager, which also fixes some crashing issues



Modified: pcbsd/stable/pcbsdusermanager/SimpleDlg.ui
===================================================================
--- pcbsd/stable/pcbsdusermanager/SimpleDlg.ui	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/SimpleDlg.ui	2010-12-21 14:53:59 UTC (rev 8243)
@@ -1,63 +1,64 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>SimpleDlg</class>
- <widget class="QDialog" name="SimpleDlg" >
-  <property name="geometry" >
+ <widget class="QDialog" name="SimpleDlg">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>577</width>
-    <height>188</height>
+    <width>548</width>
+    <height>172</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>PC-BSD User Manager</string>
   </property>
-  <property name="windowIcon" >
-   <iconset resource="pcbsdusermanager.qrc" >
+  <property name="windowIcon">
+   <iconset resource="pcbsdusermanager.qrc">
     <normaloff>:/add_user.png</normaloff>:/add_user.png</iconset>
   </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" colspan="2" >
-    <layout class="QVBoxLayout" >
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0" colspan="2">
+    <layout class="QVBoxLayout">
      <item>
-      <layout class="QHBoxLayout" >
+      <layout class="QHBoxLayout">
        <item>
-        <widget class="QPushButton" name="addUserBut" >
-         <property name="text" >
+        <widget class="QPushButton" name="addUserBut">
+         <property name="text">
           <string>&amp;Add</string>
          </property>
-         <property name="icon" >
-          <iconset resource="pcbsdusermanager.qrc" >
+         <property name="icon">
+          <iconset resource="pcbsdusermanager.qrc">
            <normaloff>:/add_user.png</normaloff>:/add_user.png</iconset>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+A</string>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="QPushButton" name="removeUserBut" >
-         <property name="text" >
+        <widget class="QPushButton" name="removeUserBut">
+         <property name="text">
           <string>&amp;Remove</string>
          </property>
-         <property name="icon" >
-          <iconset resource="pcbsdusermanager.qrc" >
+         <property name="icon">
+          <iconset resource="pcbsdusermanager.qrc">
            <normaloff>:/delete_user.png</normaloff>:/delete_user.png</iconset>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+R</string>
          </property>
         </widget>
        </item>
        <item>
-        <spacer name="spacer10" >
-         <property name="orientation" >
+        <spacer name="spacer10">
+         <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>40</width>
            <height>31</height>
@@ -66,31 +67,31 @@
         </spacer>
        </item>
        <item>
-        <widget class="QPushButton" name="rootPasswordBut" >
-         <property name="text" >
+        <widget class="QPushButton" name="rootPasswordBut">
+         <property name="text">
           <string>&amp;Change Admin Password...</string>
          </property>
-         <property name="icon" >
-          <iconset resource="pcbsdusermanager.qrc" >
+         <property name="icon">
+          <iconset resource="pcbsdusermanager.qrc">
            <normaloff>:/admin_password.png</normaloff>:/admin_password.png</iconset>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+C</string>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="QPushButton" name="advancedBut" >
-         <property name="minimumSize" >
+        <widget class="QPushButton" name="advancedBut">
+         <property name="minimumSize">
           <size>
            <width>0</width>
            <height>31</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>A&amp;dvanced View</string>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+D</string>
          </property>
         </widget>
@@ -98,26 +99,26 @@
       </layout>
      </item>
      <item>
-      <widget class="Line" name="line2" >
-       <property name="frameShape" >
+      <widget class="Line" name="line2">
+       <property name="frameShape">
         <enum>QFrame::HLine</enum>
        </property>
-       <property name="frameShadow" >
+       <property name="frameShadow">
         <enum>QFrame::Sunken</enum>
        </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item row="1" column="0" >
-    <widget class="Q3ListBox" name="userList" >
-     <property name="sizePolicy" >
-      <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
+   <item row="1" column="0" rowspan="2">
+    <widget class="QListWidget" name="userList">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <property name="minimumSize" >
+     <property name="minimumSize">
       <size>
        <width>200</width>
        <height>0</height>
@@ -125,125 +126,95 @@
      </property>
     </widget>
    </item>
-   <item row="1" column="1" >
-    <layout class="QVBoxLayout" >
-     <item>
-      <widget class="Q3Frame" name="frame8" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="frameShape" >
-        <enum>QFrame::StyledPanel</enum>
-       </property>
-       <property name="frameShadow" >
-        <enum>QFrame::Raised</enum>
-       </property>
-       <property name="lineWidth" >
-        <number>0</number>
-       </property>
-       <layout class="QGridLayout" >
-        <item row="1" column="1" >
-         <widget class="QCheckBox" name="canAdminCheck" >
-          <property name="text" >
-           <string>Can administrate s&amp;ystem</string>
-          </property>
-          <property name="shortcut" >
-           <string>Alt+Y</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1" >
-         <widget class="QPushButton" name="changePasswordBut" >
-          <property name="text" >
-           <string>C&amp;hange Password...</string>
-          </property>
-          <property name="icon" >
-           <iconset resource="pcbsdusermanager.qrc" >
-            <normaloff>:/change_password.png</normaloff>:/change_password.png</iconset>
-          </property>
-          <property name="shortcut" >
-           <string>Alt+H</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1" >
-         <widget class="QLineEdit" name="fullnameBox" >
-          <property name="sizePolicy" >
-           <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
-            <horstretch>1</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="0" >
-         <widget class="QLabel" name="fullnameLbl" >
-          <property name="sizePolicy" >
-           <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text" >
-           <string>Full Name:</string>
-          </property>
-          <property name="wordWrap" >
-           <bool>false</bool>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-     <item>
-      <spacer name="spacer17" >
-       <property name="orientation" >
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0" >
-        <size>
-         <width>21</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
+   <item row="1" column="1">
+    <widget class="QFrame" name="frame">
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="fullnameLbl">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Full Name:</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="fullnameBox">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+          <horstretch>1</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QCheckBox" name="canAdminCheck">
+        <property name="text">
+         <string>Can administrate s&amp;ystem</string>
+        </property>
+        <property name="shortcut">
+         <string>Alt+Y</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="QPushButton" name="changePasswordBut">
+        <property name="text">
+         <string>C&amp;hange Password...</string>
+        </property>
+        <property name="icon">
+         <iconset resource="pcbsdusermanager.qrc">
+          <normaloff>:/change_password.png</normaloff>:/change_password.png</iconset>
+        </property>
+        <property name="shortcut">
+         <string>Alt+H</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
    </item>
+   <item row="2" column="1">
+    <spacer name="spacer17">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>21</width>
+       <height>8</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
- <customwidgets>
-  <customwidget>
-   <class>Q3Frame</class>
-   <extends>QFrame</extends>
-   <header>Qt3Support/Q3Frame</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>Q3ListBox</class>
-   <extends>Q3Frame</extends>
-   <header>q3listbox.h</header>
-  </customwidget>
- </customwidgets>
+ <layoutdefault spacing="6" margin="11"/>
  <tabstops>
   <tabstop>addUserBut</tabstop>
   <tabstop>removeUserBut</tabstop>
   <tabstop>rootPasswordBut</tabstop>
   <tabstop>advancedBut</tabstop>
-  <tabstop>userList</tabstop>
-  <tabstop>fullnameBox</tabstop>
-  <tabstop>canAdminCheck</tabstop>
-  <tabstop>changePasswordBut</tabstop>
  </tabstops>
  <resources>
-  <include location="pcbsdusermanager.qrc" />
+  <include location="pcbsdusermanager.qrc"/>
  </resources>
  <connections/>
 </ui>

Modified: pcbsd/stable/pcbsdusermanager/adddlgcode.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/adddlgcode.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/adddlgcode.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -28,11 +28,8 @@
 #include <qcombobox.h>
 #include <qlineedit.h>
 #include <qtooltip.h>
+#include <QMessageBox>
         
-#include <klineedit.h>
-#include <kmessagebox.h>
-#include <klocale.h>
-
 void AddDlgCode::programInit(UserManagerBackend *back)
 {
     this->back = back;
@@ -40,7 +37,8 @@
     red = QColor(255, 78, 78);
     orange = QColor(255, 211, 65);
     
-    connect(groupGroup, SIGNAL(clicked(int)), this, SLOT(changeGroupBox()));
+    connect(groupRadioOld, SIGNAL(clicked()), this, SLOT(changeGroupBox()));
+    connect(groupRadioNew, SIGNAL(clicked()), this, SLOT(changeGroupBox()));
     connect(usernameBox, SIGNAL(textChanged(const QString&)), this, SLOT(usernameChanged()));
     connect(passBox, SIGNAL(textChanged(const QString&)), this, SLOT(passwordChanged()));
     connect(confirmPassBox, SIGNAL(textChanged(const QString&)), this, SLOT(passwordChanged()));
@@ -52,13 +50,13 @@
     QStringList shells = back->getShells();
     shells.sort();
     shellBox->clear();
-    shellBox->insertStringList(shells);
+    shellBox->addItems(shells);
     
     //Populate group box
     QStringList groups = back->getAllGroups(-1, -1);
     groups.sort();
     groupBox->clear();
-    groupBox->insertStringList(groups);
+    groupBox->addItems(groups);
     
 }
 
@@ -70,7 +68,7 @@
 
 void AddDlgCode::usernameChanged()
 {
-    QString username = usernameBox->text().lower();
+    QString username = usernameBox->text().toLower();
     usernameBox->setText(username);
     
     QString groupText = tr("New Group");
@@ -93,23 +91,26 @@
     int usernameError = back->validateUsername(username);
     
     QColor usernameBoxColour = white;
-    QToolTip::add(usernameBox, tr("Good Input"));
+    usernameBox->setToolTip(tr("Good Input"));
     
     switch (usernameError) 
     {
     case 1:
-	QToolTip::add(usernameBox, tr("The field is empty"));
+	usernameBox->setToolTip( tr("The field is empty"));
 	break;
     case 2:
 	usernameBoxColour = red;
-	QToolTip::add(usernameBox, tr("This field can only accept letters and numbers"));
+	usernameBox->setToolTip(tr("This field can only accept letters and numbers"));
 	break;
     case 3:
 	usernameBoxColour = red;
-	QToolTip::add(usernameBox, tr("This username is already in use, please choose another."));
+	usernameBox->setToolTip(tr("This username is already in use, please choose another."));
     }
     
-    usernameBox->setPaletteBackgroundColor(usernameBoxColour);
+    QPalette bgPal(usernameBoxColour);
+    bgPal.setColor(QPalette::Window,usernameBoxColour);
+    usernameBox->setPalette(bgPal);
+
 }
 
 void AddDlgCode::passwordChanged()
@@ -117,23 +118,26 @@
     int passError = back->validatePassword(passBox->text(), confirmPassBox->text());
     
     QColor passBoxColour = white;
-    QToolTip::add(passBox, tr("Passwords match"));
+    passBox->setToolTip( tr("Passwords match"));
     
     switch (passError)
     {
     case 1:
-	QToolTip::add(passBox, "");
+	passBox->setToolTip( "");
 	break;
     case 2:
         passBoxColour = red;
-	QToolTip::add(passBox, tr("Passwords do not match"));
+	passBox->setToolTip(tr("Passwords do not match"));
 	break;
     case 3:
         passBoxColour = red;
-        QToolTip::add(passBox, tr("Invalid input"));
+        passBox->setToolTip(tr("Invalid input"));
     }
     
-    passBox->setPaletteBackgroundColor(passBoxColour);
+    QPalette bgPal(passBoxColour);
+    bgPal.setColor(QPalette::Window,passBoxColour);
+    passBox->setPalette(bgPal);
+
 }
 
 void AddDlgCode::fullnameChanged()
@@ -141,20 +145,23 @@
     int fullnameError = back->validateFullname(fullnameBox->text());
     
     QColor fullnameBoxColour = white;
-    QToolTip::add(fullnameBox, tr("Good Input"));
+    fullnameBox->setToolTip(tr("Good Input"));
     
     switch(fullnameError)
     {
     case 1:
-	QToolTip::add(fullnameBox, tr("The field is empty"));
+	fullnameBox->setToolTip(tr("The field is empty"));
 	break;
     case 2:
 	fullnameBoxColour = red;
-	QToolTip::add(fullnameBox, tr("This field may not contain ! @ or :"));
+	fullnameBox->setToolTip(tr("This field may not contain ! @ or :"));
 	break;
     }
     
-    fullnameBox->setPaletteBackgroundColor(fullnameBoxColour);
+    QPalette bgPal(fullnameBoxColour);
+    bgPal.setColor(QPalette::Window,fullnameBoxColour);
+    fullnameBox->setPalette(bgPal);
+
 }
 
 void AddDlgCode::homeChanged()
@@ -162,31 +169,34 @@
     int homeError = back->validateHome(homeBox->text());
     
     QColor homeBoxColour = white;
-    QToolTip::add(homeBox, tr("Directory will be used"));
+    homeBox->setToolTip(tr("Directory will be used"));
     
     switch (homeError)
     {
     case 1:
-	QToolTip::add(homeBox, tr("The field is empty"));
+	homeBox->setToolTip( tr("The field is empty"));
 	break;
     case 2:
 	homeBoxColour = red;
-	QToolTip::add(homeBox, tr("Invalid Path!"));
+	homeBox->setToolTip(tr("Invalid Path!"));
 	break;
     case 3:
-	QToolTip::add(homeBox, tr("Directory does not exist, but will be made"));
+	homeBox->setToolTip( tr("Directory does not exist, but will be made"));
 	break;
     case 4:
 	homeBoxColour = orange;
-	QToolTip::add(homeBox, tr("Placing home directory outside '/home/' can cause compatibility problems with some programs. NOT RECOMMENDED"));
+	homeBox->setToolTip(tr("Placing home directory outside '/home/' can cause compatibility problems with some programs. NOT RECOMMENDED"));
 	break;
     case 5:
 	homeBoxColour = red;
-	QToolTip::add(homeBox, tr("Requested path is a file (not a directory!)"));
+	homeBox->setToolTip(tr("Requested path is a file (not a directory!)"));
 	break;
     }
     
-    homeBox->setPaletteBackgroundColor(homeBoxColour);
+    QPalette bgPal(homeBoxColour);
+    bgPal.setColor(QPalette::Window,homeBoxColour);
+    homeBox->setPalette(bgPal);
+
 }
 
 void AddDlgCode::submit()
@@ -286,7 +296,7 @@
    if (inputError)
    {
        //Throw up the error box!
-       KMessageBox::error(this, inputText, tr("Error!"));
+       QMessageBox::critical(this, inputText, tr("Error!"));
    }
    else
    {

Modified: pcbsd/stable/pcbsdusermanager/adduser.ui
===================================================================
--- pcbsd/stable/pcbsdusermanager/adduser.ui	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/adduser.ui	2010-12-21 14:53:59 UTC (rev 8243)
@@ -1,187 +1,250 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>AddUserUI</class>
- <widget class="QDialog" name="AddUserUI" >
-  <property name="geometry" >
+ <widget class="QDialog" name="AddUserUI">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>472</width>
-    <height>367</height>
+    <width>462</width>
+    <height>321</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Add User</string>
   </property>
-  <property name="windowIcon" >
-   <iconset resource="pcbsdusermanager.qrc" >
+  <property name="windowIcon">
+   <iconset resource="pcbsdusermanager.qrc">
     <normaloff>:/add_user.png</normaloff>:/add_user.png</iconset>
   </property>
-  <property name="modal" >
+  <property name="modal">
    <bool>true</bool>
   </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
-    <widget class="Q3Frame" name="frame7" >
-     <property name="sizePolicy" >
-      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="frameShape" >
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0">
+    <widget class="QFrame" name="frame">
+     <property name="frameShape">
       <enum>QFrame::StyledPanel</enum>
      </property>
-     <property name="frameShadow" >
+     <property name="frameShadow">
       <enum>QFrame::Raised</enum>
      </property>
-     <property name="lineWidth" >
-      <number>0</number>
-     </property>
-     <layout class="QGridLayout" >
-      <item row="3" column="1" >
-       <widget class="QComboBox" name="shellBox" >
-        <property name="editable" >
-         <bool>true</bool>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="usernameLabel">
+        <property name="text">
+         <string>Username:</string>
         </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
        </widget>
       </item>
-      <item row="1" column="1" >
-       <widget class="QLineEdit" name="fullnameBox" />
-      </item>
-      <item row="0" column="1" >
-       <widget class="QLineEdit" name="usernameBox" >
-        <property name="toolTip" >
+      <item row="0" column="1" colspan="2">
+       <widget class="QLineEdit" name="usernameBox">
+        <property name="toolTip">
          <string>The field is empty</string>
         </property>
-        <property name="maxLength" >
+        <property name="maxLength">
          <number>16</number>
         </property>
        </widget>
       </item>
-      <item row="5" column="1" >
-       <widget class="QLineEdit" name="passBox" >
-        <property name="echoMode" >
-         <enum>QLineEdit::Password</enum>
+      <item row="1" column="0">
+       <widget class="QLabel" name="fullnameLabel">
+        <property name="enabled">
+         <bool>true</bool>
         </property>
-       </widget>
-      </item>
-      <item row="6" column="1" >
-       <widget class="QLineEdit" name="confirmPassBox" >
-        <property name="echoMode" >
-         <enum>QLineEdit::Password</enum>
+        <property name="frameShape">
+         <enum>QFrame::NoFrame</enum>
         </property>
+        <property name="frameShadow">
+         <enum>QFrame::Plain</enum>
+        </property>
+        <property name="text">
+         <string>Full Name:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
        </widget>
       </item>
-      <item row="2" column="0" >
-       <widget class="QLabel" name="homeLabel" >
-        <property name="enabled" >
+      <item row="1" column="1" colspan="2">
+       <widget class="QLineEdit" name="fullnameBox"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="homeLabel">
+        <property name="enabled">
          <bool>true</bool>
         </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" >
+        <property name="text">
          <string>Home Directory:</string>
         </property>
-        <property name="alignment" >
+        <property name="alignment">
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
         </property>
-        <property name="wordWrap" >
+        <property name="wordWrap">
          <bool>false</bool>
         </property>
        </widget>
       </item>
-      <item row="3" column="0" >
-       <widget class="QLabel" name="shellLabel" >
-        <property name="enabled" >
+      <item row="2" column="1" colspan="2">
+       <widget class="QLineEdit" name="homeBox">
+        <property name="mode" stdset="0">
+         <number>18</number>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="shellLabel">
+        <property name="enabled">
          <bool>true</bool>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Shell:</string>
         </property>
-        <property name="alignment" >
+        <property name="alignment">
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
         </property>
-        <property name="wordWrap" >
+        <property name="wordWrap">
          <bool>false</bool>
         </property>
        </widget>
       </item>
-      <item row="1" column="0" >
-       <widget class="QLabel" name="fullnameLabel" >
-        <property name="enabled" >
+      <item row="3" column="1" colspan="2">
+       <widget class="QComboBox" name="shellBox">
+        <property name="editable">
          <bool>true</bool>
         </property>
-        <property name="frameShape" >
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="groupLabel">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="text">
+         <string>Primary Group:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="passLabel">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
         </property>
-        <property name="frameShadow" >
+        <property name="frameShadow">
          <enum>QFrame::Plain</enum>
         </property>
-        <property name="text" >
-         <string>Full Name:</string>
+        <property name="text">
+         <string>Password:</string>
         </property>
-        <property name="alignment" >
+        <property name="alignment">
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
         </property>
-        <property name="wordWrap" >
+        <property name="wordWrap">
          <bool>false</bool>
         </property>
        </widget>
       </item>
-      <item row="4" column="1" >
-       <widget class="Q3ButtonGroup" name="groupGroup" >
-        <property name="title" >
-         <string/>
+      <item row="6" column="1" colspan="2">
+       <widget class="QLineEdit" name="passBox">
+        <property name="echoMode">
+         <enum>QLineEdit::Password</enum>
         </property>
-        <property name="lineWidth" >
-         <number>0</number>
+       </widget>
+      </item>
+      <item row="7" column="0">
+       <widget class="QLabel" name="confirmPassLabel">
+        <property name="enabled">
+         <bool>true</bool>
         </property>
-        <layout class="QGridLayout" >
-         <item row="1" column="0" >
-          <widget class="QRadioButton" name="groupRadioOld" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+        <property name="text">
+         <string>Confirm Password:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="1" colspan="2">
+       <widget class="QLineEdit" name="confirmPassBox">
+        <property name="echoMode">
+         <enum>QLineEdit::Password</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1">
+       <widget class="QGroupBox" name="groupGroup">
+        <property name="title">
+         <string/>
+        </property>
+        <layout class="QFormLayout" name="formLayout">
+         <item row="1" column="1">
+          <widget class="QComboBox" name="groupBox">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
-           <property name="text" >
-            <string/>
-           </property>
           </widget>
          </item>
-         <item row="1" column="1" >
-          <widget class="QComboBox" name="groupBox" >
-           <property name="enabled" >
-            <bool>false</bool>
-           </property>
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+         <item row="1" column="0">
+          <widget class="QRadioButton" name="groupRadioOld">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
+           <property name="text">
+            <string/>
+           </property>
           </widget>
          </item>
-         <item row="0" column="0" colspan="2" >
-          <widget class="QRadioButton" name="groupRadioNew" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+         <item row="0" column="0" colspan="2">
+          <widget class="QRadioButton" name="groupRadioNew">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
-           <property name="text" >
+           <property name="text">
             <string>New &amp;Group</string>
            </property>
-           <property name="shortcut" >
+           <property name="shortcut">
             <string>Alt+G</string>
            </property>
-           <property name="checked" >
+           <property name="checked">
             <bool>true</bool>
            </property>
           </widget>
@@ -189,106 +252,48 @@
         </layout>
        </widget>
       </item>
-      <item row="0" column="0" >
-       <widget class="QLabel" name="usernameLabel" >
-        <property name="text" >
-         <string>Username:</string>
-        </property>
-        <property name="alignment" >
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="wordWrap" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="6" column="0" >
-       <widget class="QLabel" name="confirmPassLabel" >
-        <property name="enabled" >
-         <bool>true</bool>
-        </property>
-        <property name="text" >
-         <string>Confirm Password:</string>
-        </property>
-        <property name="alignment" >
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="wordWrap" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="1" >
-       <widget class="QLineEdit" native="1" name="homeBox" >
-        <property name="mode" stdset="0" >
-         <number>18</number>
-        </property>
-       </widget>
-      </item>
-      <item row="4" column="0" >
-       <widget class="QLabel" name="groupLabel" >
-        <property name="enabled" >
-         <bool>true</bool>
-        </property>
-        <property name="text" >
-         <string>Primary Group:</string>
-        </property>
-        <property name="alignment" >
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="wordWrap" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="5" column="0" >
-       <widget class="QLabel" name="passLabel" >
-        <property name="enabled" >
-         <bool>true</bool>
-        </property>
-        <property name="frameShape" >
-         <enum>QFrame::NoFrame</enum>
-        </property>
-        <property name="frameShadow" >
-         <enum>QFrame::Plain</enum>
-        </property>
-        <property name="text" >
-         <string>Password:</string>
-        </property>
-        <property name="alignment" >
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="wordWrap" >
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
      </layout>
     </widget>
    </item>
-   <item row="2" column="0" >
-    <layout class="QVBoxLayout" >
+   <item row="1" column="0">
+    <spacer name="spacer9">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>450</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="0">
+    <layout class="QVBoxLayout">
      <item>
-      <widget class="Line" name="line1" >
-       <property name="frameShape" >
+      <widget class="Line" name="line1">
+       <property name="frameShape">
         <enum>QFrame::HLine</enum>
        </property>
-       <property name="frameShadow" >
+       <property name="frameShadow">
         <enum>QFrame::Sunken</enum>
        </property>
       </widget>
      </item>
      <item>
-      <layout class="QHBoxLayout" >
+      <layout class="QHBoxLayout">
        <item>
-        <spacer name="spacer12" >
-         <property name="orientation" >
+        <spacer name="spacer12">
+         <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>244</width>
            <height>31</height>
@@ -297,35 +302,35 @@
         </spacer>
        </item>
        <item>
-        <widget class="QPushButton" name="okButton" >
-         <property name="text" >
+        <widget class="QPushButton" name="okButton">
+         <property name="text">
           <string>&amp;Ok</string>
          </property>
-         <property name="icon" >
+         <property name="icon">
           <iconset>
            <normaloff>image0</normaloff>image0</iconset>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+O</string>
          </property>
-         <property name="default" >
+         <property name="default">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="QPushButton" name="cancelButton" >
-         <property name="text" >
+        <widget class="QPushButton" name="cancelButton">
+         <property name="text">
           <string>&amp;Cancel</string>
          </property>
-         <property name="icon" >
+         <property name="icon">
           <iconset>
            <normaloff>image1</normaloff>image1</iconset>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+C</string>
          </property>
-         <property name="default" >
+         <property name="default">
           <bool>false</bool>
          </property>
         </widget>
@@ -334,61 +339,19 @@
      </item>
     </layout>
    </item>
-   <item row="1" column="0" >
-    <spacer name="spacer9" >
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" stdset="0" >
-      <size>
-       <width>450</width>
-       <height>16</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
- <customwidgets>
-  <customwidget>
-   <class>Q3Frame</class>
-   <extends>QFrame</extends>
-   <header>Qt3Support/Q3Frame</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>Q3ButtonGroup</class>
-   <extends>Q3GroupBox</extends>
-   <header>Qt3Support/Q3ButtonGroup</header>
-   <container>1</container>
-  </customwidget>
- </customwidgets>
+ <layoutdefault spacing="6" margin="11"/>
  <tabstops>
-  <tabstop>usernameBox</tabstop>
-  <tabstop>fullnameBox</tabstop>
-  <tabstop>homeBox</tabstop>
-  <tabstop>shellBox</tabstop>
-  <tabstop>groupRadioNew</tabstop>
-  <tabstop>groupBox</tabstop>
-  <tabstop>passBox</tabstop>
-  <tabstop>confirmPassBox</tabstop>
   <tabstop>okButton</tabstop>
   <tabstop>cancelButton</tabstop>
-  <tabstop>groupRadioOld</tabstop>
  </tabstops>
  <includes>
-  <include location="global" >q3filedialog.h</include>
-  <include location="global" >usermanagerback.h</include>
-  <include location="global" >qmessagebox.h</include>
-  <include location="local" >klineedit.h</include>
-  <include location="local" >kpushbutton.h</include>
+  <include location="global">usermanagerback.h</include>
+  <include location="global">qmessagebox.h</include>
  </includes>
  <resources>
-  <include location="pcbsdusermanager.qrc" />
+  <include location="pcbsdusermanager.qrc"/>
  </resources>
  <connections>
   <connection>
@@ -397,11 +360,11 @@
    <receiver>AddUserUI</receiver>
    <slot>close()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>

Modified: pcbsd/stable/pcbsdusermanager/changepasscode.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/changepasscode.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/changepasscode.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -24,10 +24,8 @@
 #include <qpushbutton.h>
 #include <qlineedit.h>
 #include <qtooltip.h>
+#include <QMessageBox>
         
-#include <kmessagebox.h>
-#include <klocale.h>
-
 #include "changepasscode.h"
 
 void ChangePassCode::programInit(QString username, UserManagerBackend *back)
@@ -38,7 +36,7 @@
     white = QColor(255, 255, 255);
     red = QColor(255, 78, 78);
     
-    setCaption(tr("Change Password for '") + username + tr("'"));
+    setWindowTitle(tr("Change Password for '") + username + tr("'"));
     
     connect(okButton, SIGNAL(clicked()), this, SLOT(commit()));
     connect(passBox, SIGNAL(textChanged(const QString&)), this, SLOT(passwordChanged()));
@@ -56,13 +54,13 @@
             close();
             break;
         case 1:
-            KMessageBox::error(this, tr("You must specify a password"), tr("Error changing password..."));
+            QMessageBox::critical(this, tr("You must specify a password"), tr("Error changing password..."));
             break;
         case 2:
-            KMessageBox::error(this, tr("The passwords didn't match. Both boxes most contain the same value."), tr("Error changing password..."));
+            QMessageBox::critical(this, tr("The passwords didn't match. Both boxes most contain the same value."), tr("Error changing password..."));
             break;
         case 3:
-            KMessageBox::error(this, tr("Invalid password, please choose another."), tr("Error changing password..."));
+            QMessageBox::critical(this, tr("Invalid password, please choose another."), tr("Error changing password..."));
             break;
     }
 }
@@ -72,22 +70,24 @@
     int passError = back->validatePassword(passBox->text(), confirmPassBox->text());
     
     QColor passBoxColour = white;
-    QToolTip::add(passBox, tr("Passwords match"));
+    passBox->setToolTip(tr("Passwords match"));
     
     switch (passError)
     {
     case 1:
-	QToolTip::add(passBox, "");
+	passBox->setToolTip("");
 	break;
     case 2:
         passBoxColour = red;
-	QToolTip::add(passBox, tr("Passwords do not match"));
+	passBox->setToolTip(tr("Passwords do not match"));
 	break;
     case 3:
         passBoxColour = red;
-        QToolTip::add(passBox, tr("Invalid input"));
+        passBox->setToolTip(tr("Invalid input"));
     }
     
-    passBox->setPaletteBackgroundColor(passBoxColour);
+    QPalette bgPal(passBoxColour);
+    bgPal.setColor(QPalette::Window, passBoxColour);
+    passBox->setPalette(bgPal);
 }
 

Modified: pcbsd/stable/pcbsdusermanager/group.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/group.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/group.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -1,102 +1,102 @@
-/***************************************************************************
- *   Copyright (C) 2005 - 2007 by Tim McCormick   *
- *   tim at pcbsd.org   *
- *                                                                         *
- *   Permission is hereby granted, free of charge, to any person obtaining *
- *   a copy of this software and associated documentation files (the       *
- *   "Software"), to deal in the Software without restriction, including   *
- *   without limitation the rights to use, copy, modify, merge, publish,   *
- *   distribute, sublicense, and/or sell copies of the Software, and to    *
- *   permit persons to whom the Software is furnished to do so, subject to *
- *   the following conditions:                                             *
- *                                                                         *
- *   The above copyright notice and this permission notice shall be        *
- *   included in all copies or substantial portions of the Software.       *
- *                                                                         *
- *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
- *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
- *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
- *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
- *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
- *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
- *   OTHER DEALINGS IN THE SOFTWARE.                                       *
- ***************************************************************************/
-
-#include "group.h"
-
-Group::Group() {
-    groupname = "Not Set";
-    gid = -1;
-    members = QStringList();
-    status = -1;
-}
-
-Group::Group(QString groupname, int gid, QStringList members, bool isNew) {
-    this->groupname = groupname;
-    this->gid = gid;
-    this->members = members;
-    if (isNew) { status = 2; }
-    else { status = 0; }
-}
-
-Group::~Group() {
-    
-}
-
-QString Group::getGroupname() {
-    return groupname;
-}
-
-int Group::getGid() {
-    return gid;
-}
-
-QStringList Group::getMembers() {
-    return members;
-}
-
-bool Group::isMember(QString username) {
-    if (members.contains(username) > 0) { return true; }
-    return false;
-}
-
-bool Group::getChanges() {
-    return status == 1;
-}
-
-void Group::setChanges() {
-    if (status == 0) { status = 1; }
-}
-
-void Group::addMember(QString username) {
-    members += username;
-}
-
-void Group::removeMember(QString username) {
-    members.remove(username);
-}
-
-void Group::setDeleted()
-{
-    status = 3;
-}
-
-int Group::getStatus()
-{
-    return status;
-}
-
-bool Group::getDeleted()
-{
-    return status == 3;
-}
-
-void Group::setNew()
-{
-    status = 2;
-}
-
-bool Group::getNew()
-{
-    return status == 2;
-}
+/***************************************************************************
+ *   Copyright (C) 2005 - 2007 by Tim McCormick   *
+ *   tim at pcbsd.org   *
+ *                                                                         *
+ *   Permission is hereby granted, free of charge, to any person obtaining *
+ *   a copy of this software and associated documentation files (the       *
+ *   "Software"), to deal in the Software without restriction, including   *
+ *   without limitation the rights to use, copy, modify, merge, publish,   *
+ *   distribute, sublicense, and/or sell copies of the Software, and to    *
+ *   permit persons to whom the Software is furnished to do so, subject to *
+ *   the following conditions:                                             *
+ *                                                                         *
+ *   The above copyright notice and this permission notice shall be        *
+ *   included in all copies or substantial portions of the Software.       *
+ *                                                                         *
+ *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
+ *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
+ *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
+ *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
+ *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
+ *   OTHER DEALINGS IN THE SOFTWARE.                                       *
+ ***************************************************************************/
+
+#include "group.h"
+
+Group::Group() {
+    groupname = "Not Set";
+    gid = -1;
+    members = QStringList();
+    status = -1;
+}
+
+Group::Group(QString groupname, int gid, QStringList members, bool isNew) {
+    this->groupname = groupname;
+    this->gid = gid;
+    this->members = members;
+    if (isNew) { status = 2; }
+    else { status = 0; }
+}
+
+Group::~Group() {
+    
+}
+
+QString Group::getGroupname() {
+    return groupname;
+}
+
+int Group::getGid() {
+    return gid;
+}
+
+QStringList Group::getMembers() {
+    return members;
+}
+
+bool Group::isMember(QString username) {
+    if (members.contains(username) > 0) { return true; }
+    return false;
+}
+
+bool Group::getChanges() {
+    return status == 1;
+}
+
+void Group::setChanges() {
+    if (status == 0) { status = 1; }
+}
+
+void Group::addMember(QString username) {
+    members += username;
+}
+
+void Group::removeMember(QString username) {
+   members.removeAll(username);
+}
+
+void Group::setDeleted()
+{
+    status = 3;
+}
+
+int Group::getStatus()
+{
+    return status;
+}
+
+bool Group::getDeleted()
+{
+    return status == 3;
+}
+
+void Group::setNew()
+{
+    status = 2;
+}
+
+bool Group::getNew()
+{
+    return status == 2;
+}

Modified: pcbsd/stable/pcbsdusermanager/group.h
===================================================================
--- pcbsd/stable/pcbsdusermanager/group.h	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/group.h	2010-12-21 14:53:59 UTC (rev 8243)
@@ -1,57 +1,58 @@
-/***************************************************************************
- *   Copyright (C) 2005 - 2007 by Tim McCormick   *
- *   tim at pcbsd.org   *
- *                                                                         *
- *   Permission is hereby granted, free of charge, to any person obtaining *
- *   a copy of this software and associated documentation files (the       *
- *   "Software"), to deal in the Software without restriction, including   *
- *   without limitation the rights to use, copy, modify, merge, publish,   *
- *   distribute, sublicense, and/or sell copies of the Software, and to    *
- *   permit persons to whom the Software is furnished to do so, subject to *
- *   the following conditions:                                             *
- *                                                                         *
- *   The above copyright notice and this permission notice shall be        *
- *   included in all copies or substantial portions of the Software.       *
- *                                                                         *
- *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
- *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
- *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
- *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
- *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
- *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
- *   OTHER DEALINGS IN THE SOFTWARE.                                       *
- ***************************************************************************/
-
-#include <qapplication.h>
-
-#ifndef INC_GROUP_H
-#define INC_GROUP_H
-
-class Group {
-public:
-    Group();
-    Group(QString groupname, int gid, QStringList members, bool isNew = false);
-    virtual ~Group();
-    virtual QString getGroupname();
-    virtual int getGid();
-    virtual QStringList getMembers();
-    virtual bool isMember(QString username);
-    virtual bool getChanges();
-    virtual void setChanges();
-    virtual void addMember(QString username);
-    virtual void removeMember(QString username);
-    virtual void setDeleted();
-    virtual int getStatus();
-    virtual bool getDeleted();
-    virtual void setNew();
-    virtual bool getNew();
-    
-private:
-    QString groupname;
-    int gid;
-    QStringList members;
-    int status; // 0 = No change, 1 = Changes, 2 = New, 3 = Deleted
-    
-};
-
-#endif // INC_GROUP_H
+/***************************************************************************
+ *   Copyright (C) 2005 - 2007 by Tim McCormick   *
+ *   tim at pcbsd.org   *
+ *                                                                         *
+ *   Permission is hereby granted, free of charge, to any person obtaining *
+ *   a copy of this software and associated documentation files (the       *
+ *   "Software"), to deal in the Software without restriction, including   *
+ *   without limitation the rights to use, copy, modify, merge, publish,   *
+ *   distribute, sublicense, and/or sell copies of the Software, and to    *
+ *   permit persons to whom the Software is furnished to do so, subject to *
+ *   the following conditions:                                             *
+ *                                                                         *
+ *   The above copyright notice and this permission notice shall be        *
+ *   included in all copies or substantial portions of the Software.       *
+ *                                                                         *
+ *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
+ *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
+ *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
+ *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
+ *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
+ *   OTHER DEALINGS IN THE SOFTWARE.                                       *
+ ***************************************************************************/
+
+#include <qapplication.h>
+#include <QStringList>
+
+#ifndef INC_GROUP_H
+#define INC_GROUP_H
+
+class Group {
+public:
+    Group();
+    Group(QString groupname, int gid, QStringList members, bool isNew = false);
+    virtual ~Group();
+    virtual QString getGroupname();
+    virtual int getGid();
+    virtual QStringList getMembers();
+    virtual bool isMember(QString username);
+    virtual bool getChanges();
+    virtual void setChanges();
+    virtual void addMember(QString username);
+    virtual void removeMember(QString username);
+    virtual void setDeleted();
+    virtual int getStatus();
+    virtual bool getDeleted();
+    virtual void setNew();
+    virtual bool getNew();
+    
+private:
+    QString groupname;
+    int gid;
+    QStringList members;
+    int status; // 0 = No change, 1 = Changes, 2 = New, 3 = Deleted
+    
+};
+
+#endif // INC_GROUP_H

Modified: pcbsd/stable/pcbsdusermanager/main.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/main.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/main.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -1,33 +1,14 @@
-#include <kapplication.h>
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
 #include <qtranslator.h>
+#include <QApplication>
 #include <qlocale.h>
 #include <QDebug>
 #include "pcbsdusermanager.h"
 
-static const char description[] = I18N_NOOP("PC-BSD User Manager");
-
 int main( int argc, char ** argv )
 {
-    KAboutData aboutData("pcUserManager", 0, ki18n("pcUserManager"),
-                            "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");
+    QApplication a(argc, argv);
 
-    KCmdLineArgs::init(argc, argv, &aboutData);
-
-    KCmdLineOptions options;
-
-
-    // Tell which options are supported
-    KCmdLineArgs::addCmdLineOptions( options );
-
-
-    KApplication a;
-
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();

Modified: pcbsd/stable/pcbsdusermanager/mainDlg.ui
===================================================================
--- pcbsd/stable/pcbsdusermanager/mainDlg.ui	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/mainDlg.ui	2010-12-21 14:53:59 UTC (rev 8243)
@@ -1,90 +1,75 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>MainDlg</class>
- <widget class="QDialog" name="MainDlg" >
-  <property name="geometry" >
+ <widget class="QDialog" name="MainDlg">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>646</width>
-    <height>361</height>
+    <width>654</width>
+    <height>322</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>PC-BSD User Manager</string>
   </property>
-  <property name="windowIcon" >
-   <iconset resource="pcbsdusermanager.qrc" >
+  <property name="windowIcon">
+   <iconset resource="pcbsdusermanager.qrc">
     <normaloff>:/add_group.png</normaloff>:/add_group.png</iconset>
   </property>
-  <layout class="QGridLayout" >
-   <item row="1" column="0" >
-    <widget class="QTabWidget" name="mainTab" >
-     <property name="enabled" >
+  <layout class="QGridLayout">
+   <item row="1" column="0">
+    <widget class="QTabWidget" name="mainTab">
+     <property name="enabled">
       <bool>true</bool>
      </property>
-     <property name="currentIndex" >
+     <property name="currentIndex">
       <number>0</number>
      </property>
-     <widget class="QWidget" name="userTab" >
-      <attribute name="title" >
+     <widget class="QWidget" name="userTab">
+      <attribute name="title">
        <string>&amp;Users</string>
       </attribute>
-      <layout class="QGridLayout" >
-       <item rowspan="2" row="0" column="0" >
-        <widget class="Q3ListBox" name="userList" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>200</width>
-           <height>0</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0" colspan="2" >
-        <layout class="QHBoxLayout" >
+      <layout class="QGridLayout">
+       <item row="3" column="0" colspan="2">
+        <layout class="QHBoxLayout">
          <item>
-          <widget class="QPushButton" name="newButton" >
-           <property name="text" >
+          <widget class="QPushButton" name="newButton">
+           <property name="text">
             <string>&amp;Add</string>
            </property>
-           <property name="icon" >
-            <iconset resource="pcbsdusermanager.qrc" >
+           <property name="icon">
+            <iconset resource="pcbsdusermanager.qrc">
              <normaloff>:/add_user.png</normaloff>:/add_user.png</iconset>
            </property>
-           <property name="shortcut" >
+           <property name="shortcut">
             <string>Alt+A</string>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QPushButton" name="deleteButton" >
-           <property name="text" >
+          <widget class="QPushButton" name="deleteButton">
+           <property name="text">
             <string>&amp;Remove</string>
            </property>
-           <property name="icon" >
-            <iconset resource="pcbsdusermanager.qrc" >
+           <property name="icon">
+            <iconset resource="pcbsdusermanager.qrc">
              <normaloff>:/delete_user.png</normaloff>:/delete_user.png</iconset>
            </property>
-           <property name="shortcut" >
+           <property name="shortcut">
             <string>Alt+R</string>
            </property>
           </widget>
          </item>
          <item>
-          <spacer name="spacer1" >
-           <property name="orientation" >
+          <spacer name="spacer1">
+           <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>231</width>
              <height>30</height>
@@ -94,15 +79,15 @@
          </item>
         </layout>
        </item>
-       <item row="1" column="1" >
-        <spacer name="spacer22" >
-         <property name="orientation" >
+       <item row="1" column="1">
+        <spacer name="spacer22">
+         <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>50</width>
            <height>60</height>
@@ -110,204 +95,211 @@
          </property>
         </spacer>
        </item>
-       <item row="0" column="1" >
-        <widget class="Q3Frame" name="frame10" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="frameShape" >
+       <item row="0" column="1">
+        <widget class="QFrame" name="frame">
+         <property name="frameShape">
           <enum>QFrame::StyledPanel</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
-         <property name="lineWidth" >
-          <number>0</number>
-         </property>
-         <layout class="QGridLayout" >
-          <item row="2" column="0" >
-           <widget class="QLabel" name="homeLabel" >
-            <property name="text" >
-             <string>Home Directory:</string>
+         <layout class="QFormLayout" name="formLayout">
+          <item row="0" column="0">
+           <widget class="QLabel" name="uidLabel">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
             </property>
-            <property name="alignment" >
+            <property name="text">
+             <string>User ID:</string>
+            </property>
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="4" column="0" >
-           <widget class="QLabel" name="textLabel1" >
-            <property name="text" >
-             <string>Primary Group:</string>
+          <item row="0" column="1">
+           <widget class="QLabel" name="uidBox">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
             </property>
-            <property name="alignment" >
-             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            <property name="text">
+             <string/>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="3" column="0" >
-           <widget class="QLabel" name="shellLabel" >
-            <property name="text" >
-             <string>Shell:</string>
+          <item row="1" column="0">
+           <widget class="QLabel" name="fullnameLabel">
+            <property name="text">
+             <string>Full Name:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="0" column="0" >
-           <widget class="QLabel" name="uidLabel" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
+          <item row="1" column="1">
+           <widget class="QLineEdit" name="fullnameBox">
+            <property name="enabled">
+             <bool>true</bool>
             </property>
-            <property name="text" >
-             <string>User ID:</string>
+            <property name="readOnly">
+             <bool>false</bool>
             </property>
-            <property name="alignment" >
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <widget class="QLabel" name="homeLabel">
+            <property name="text">
+             <string>Home Directory:</string>
+            </property>
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="1" column="0" >
-           <widget class="QLabel" name="fullnameLabel" >
-            <property name="text" >
-             <string>Full Name:</string>
+          <item row="2" column="1">
+           <widget class="QLineEdit" name="homeBox">
+            <property name="enabled">
+             <bool>true</bool>
             </property>
-            <property name="alignment" >
+           </widget>
+          </item>
+          <item row="3" column="0">
+           <widget class="QLabel" name="shellLabel">
+            <property name="text">
+             <string>Shell:</string>
+            </property>
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="3" column="1" >
-           <widget class="QComboBox" name="shellBox" >
-            <property name="editable" >
+          <item row="3" column="1">
+           <widget class="QComboBox" name="shellBox">
+            <property name="editable">
              <bool>true</bool>
             </property>
-            <property name="autoCompletion" >
+            <property name="autoCompletion">
              <bool>true</bool>
             </property>
            </widget>
           </item>
-          <item row="0" column="1" >
-           <widget class="QLabel" name="uidBox" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
+          <item row="4" column="0">
+           <widget class="QLabel" name="textLabel1">
+            <property name="text">
+             <string>Primary Group:</string>
             </property>
-            <property name="text" >
-             <string/>
+            <property name="alignment">
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="2" column="1" >
-           <widget class="QLineEdit" name="homeBox" >
-            <property name="enabled" >
-             <bool>true</bool>
-            </property>
-           </widget>
+          <item row="4" column="1">
+           <widget class="QComboBox" name="groupBox"/>
           </item>
-          <item row="5" column="1" >
-           <widget class="QPushButton" name="passwordButton" >
-            <property name="text" >
+          <item row="5" column="1">
+           <widget class="QPushButton" name="passwordButton">
+            <property name="text">
              <string>Chan&amp;ge Password...</string>
             </property>
-            <property name="icon" >
-             <iconset resource="pcbsdusermanager.qrc" >
+            <property name="icon">
+             <iconset resource="pcbsdusermanager.qrc">
               <normaloff>:/change_password.png</normaloff>:/change_password.png</iconset>
             </property>
-            <property name="shortcut" >
+            <property name="shortcut">
              <string>Alt+G</string>
             </property>
            </widget>
           </item>
-          <item row="1" column="1" >
-           <widget class="QLineEdit" name="fullnameBox" >
-            <property name="enabled" >
-             <bool>true</bool>
-            </property>
-            <property name="readOnly" >
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-          <item row="4" column="1" >
-           <widget class="QComboBox" name="groupBox" />
-          </item>
          </layout>
         </widget>
        </item>
+       <item row="0" column="0">
+        <widget class="QListWidget" name="userList">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>200</width>
+           <height>0</height>
+          </size>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="groupTab" >
-      <attribute name="title" >
+     <widget class="QWidget" name="groupTab">
+      <attribute name="title">
        <string>&amp;Groups</string>
       </attribute>
-      <layout class="QGridLayout" >
-       <item row="5" column="0" colspan="6" >
-        <layout class="QHBoxLayout" >
+      <layout class="QGridLayout">
+       <item row="7" column="0" colspan="7">
+        <layout class="QHBoxLayout">
          <item>
-          <widget class="QPushButton" name="addGroupBut" >
-           <property name="text" >
+          <widget class="QPushButton" name="addGroupBut">
+           <property name="text">
             <string>A&amp;dd</string>
            </property>
-           <property name="icon" >
-            <iconset resource="pcbsdusermanager.qrc" >
+           <property name="icon">
+            <iconset resource="pcbsdusermanager.qrc">
              <normaloff>:/add_group.png</normaloff>:/add_group.png</iconset>
            </property>
-           <property name="shortcut" >
+           <property name="shortcut">
             <string>Alt+D</string>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QPushButton" name="removeGroupBut" >
-           <property name="text" >
+          <widget class="QPushButton" name="removeGroupBut">
+           <property name="text">
             <string>&amp;Remove</string>
            </property>
-           <property name="icon" >
-            <iconset resource="pcbsdusermanager.qrc" >
+           <property name="icon">
+            <iconset resource="pcbsdusermanager.qrc">
              <normaloff>:/delete_group.png</normaloff>:/delete_group.png</iconset>
            </property>
-           <property name="shortcut" >
+           <property name="shortcut">
             <string>Alt+R</string>
            </property>
           </widget>
          </item>
          <item>
-          <spacer name="spacer2" >
-           <property name="orientation" >
+          <spacer name="spacer2">
+           <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>140</width>
              <height>31</height>
@@ -317,66 +309,34 @@
          </item>
         </layout>
        </item>
-       <item rowspan="5" row="0" column="0" >
-        <widget class="Q3ListBox" name="groupList" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
+       <item row="0" column="2">
+        <widget class="QLabel" name="availLbl">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="minimumSize" >
-          <size>
-           <width>140</width>
-           <height>180</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item rowspan="4" row="1" column="1" >
-        <widget class="Q3ListBox" name="availableList" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>200</width>
-           <height>160</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1" >
-        <widget class="QLabel" name="availLbl" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text" >
+         <property name="text">
           <string>Available:  </string>
          </property>
-         <property name="alignment" >
+         <property name="alignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item row="0" column="2" colspan="2" >
-        <spacer name="spacer23" >
-         <property name="orientation" >
+       <item row="0" column="3" colspan="2">
+        <spacer name="spacer23">
+         <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>91</width>
            <height>31</height>
@@ -384,49 +344,49 @@
          </property>
         </spacer>
        </item>
-       <item row="2" column="2" >
-        <widget class="QPushButton" name="makeMemberBut" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <item row="2" column="3">
+        <widget class="QPushButton" name="makeMemberBut">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="text" >
+         <property name="text">
           <string/>
          </property>
-         <property name="icon" >
-          <iconset resource="pcbsdusermanager.qrc" >
+         <property name="icon">
+          <iconset resource="pcbsdusermanager.qrc">
            <normaloff>:/rightarrow.png</normaloff>:/rightarrow.png</iconset>
          </property>
         </widget>
        </item>
-       <item row="3" column="2" >
-        <widget class="QPushButton" name="makeAvailableBut" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <item row="3" column="3">
+        <widget class="QPushButton" name="makeAvailableBut">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="text" >
+         <property name="text">
           <string/>
          </property>
-         <property name="icon" >
-          <iconset resource="pcbsdusermanager.qrc" >
+         <property name="icon">
+          <iconset resource="pcbsdusermanager.qrc">
            <normaloff>:/leftarrow.png</normaloff>:/leftarrow.png</iconset>
          </property>
         </widget>
        </item>
-       <item row="4" column="2" >
-        <spacer name="spacer4" >
-         <property name="orientation" >
+       <item row="4" column="3">
+        <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>31</width>
            <height>110</height>
@@ -434,15 +394,15 @@
          </property>
         </spacer>
        </item>
-       <item row="1" column="2" >
-        <spacer name="spacer3" >
-         <property name="orientation" >
+       <item row="1" column="3">
+        <spacer name="spacer3">
+         <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>30</width>
            <height>110</height>
@@ -450,50 +410,34 @@
          </property>
         </spacer>
        </item>
-       <item rowspan="4" row="1" column="3" colspan="2" >
-        <widget class="Q3ListBox" name="memberList" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
+       <item row="0" column="5">
+        <widget class="QLabel" name="groupLbl">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="minimumSize" >
-          <size>
-           <width>200</width>
-           <height>160</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="4" >
-        <widget class="QLabel" name="groupLbl" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="text" >
+         <property name="text">
           <string>Members:</string>
          </property>
-         <property name="alignment" >
+         <property name="alignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item rowspan="5" row="0" column="5" >
-        <spacer name="spacer24" >
-         <property name="orientation" >
+       <item row="0" column="6" rowspan="5">
+        <spacer name="spacer24">
+         <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>40</width>
            <height>50</height>
@@ -501,39 +445,87 @@
          </property>
         </spacer>
        </item>
+       <item row="1" column="2" rowspan="4">
+        <widget class="QListWidget" name="availableList">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>200</width>
+           <height>0</height>
+          </size>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1" rowspan="5">
+        <widget class="QListWidget" name="groupList">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>150</width>
+           <height>0</height>
+          </size>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="5" rowspan="4">
+        <widget class="QListWidget" name="memberList">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>200</width>
+           <height>0</height>
+          </size>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
     </widget>
    </item>
-   <item row="0" column="0" >
-    <layout class="QVBoxLayout" >
+   <item row="0" column="0">
+    <layout class="QVBoxLayout">
      <item>
-      <layout class="QHBoxLayout" >
+      <layout class="QHBoxLayout">
        <item>
-        <widget class="QLabel" name="textLabel1_2" >
-         <property name="font" >
+        <widget class="QLabel" name="textLabel1_2">
+         <property name="font">
           <font>
            <weight>75</weight>
            <bold>true</bold>
           </font>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>PC-BSD User Manager - Advanced Mode</string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
        <item>
-        <spacer name="spacer12" >
-         <property name="orientation" >
+        <spacer name="spacer12">
+         <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>219</width>
            <height>31</height>
@@ -542,17 +534,17 @@
         </spacer>
        </item>
        <item>
-        <widget class="QPushButton" name="simpleBut" >
-         <property name="minimumSize" >
+        <widget class="QPushButton" name="simpleBut">
+         <property name="minimumSize">
           <size>
            <width>0</width>
            <height>31</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>Simple &amp;View</string>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+V</string>
          </property>
         </widget>
@@ -560,11 +552,11 @@
       </layout>
      </item>
      <item>
-      <widget class="Line" name="line3" >
-       <property name="frameShape" >
+      <widget class="Line" name="line3">
+       <property name="frameShape">
         <enum>QFrame::HLine</enum>
        </property>
-       <property name="frameShadow" >
+       <property name="frameShadow">
         <enum>QFrame::Sunken</enum>
        </property>
       </widget>
@@ -573,41 +565,19 @@
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
- <customwidgets>
-  <customwidget>
-   <class>Q3Frame</class>
-   <extends>QFrame</extends>
-   <header>Qt3Support/Q3Frame</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>Q3ListBox</class>
-   <extends>Q3Frame</extends>
-   <header>q3listbox.h</header>
-  </customwidget>
- </customwidgets>
+ <layoutdefault spacing="6" margin="11"/>
  <tabstops>
   <tabstop>simpleBut</tabstop>
   <tabstop>mainTab</tabstop>
-  <tabstop>userList</tabstop>
-  <tabstop>fullnameBox</tabstop>
-  <tabstop>homeBox</tabstop>
-  <tabstop>shellBox</tabstop>
-  <tabstop>groupBox</tabstop>
-  <tabstop>passwordButton</tabstop>
   <tabstop>newButton</tabstop>
   <tabstop>deleteButton</tabstop>
-  <tabstop>groupList</tabstop>
-  <tabstop>availableList</tabstop>
   <tabstop>makeMemberBut</tabstop>
   <tabstop>makeAvailableBut</tabstop>
-  <tabstop>memberList</tabstop>
   <tabstop>addGroupBut</tabstop>
   <tabstop>removeGroupBut</tabstop>
  </tabstops>
  <resources>
-  <include location="pcbsdusermanager.qrc" />
+  <include location="pcbsdusermanager.qrc"/>
  </resources>
  <connections/>
 </ui>

Modified: pcbsd/stable/pcbsdusermanager/maindlgcode.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/maindlgcode.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/maindlgcode.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -24,25 +24,21 @@
 #include "maindlgcode.h"
 #include "user.h"
 #include "group.h"
+#include <QMessageBox>
+#include <QInputDialog>
+#include <QDebug>
 
-#include <Q3ListBox>
 #include <qcombobox.h>
 #include <qlabel.h>
 #include <qlineedit.h>
 #include <qpushbutton.h>
 #include <qtooltip.h>
         
-#include <kinputdialog.h>
-#include <kmessagebox.h>
-#include <klocale.h>
-
 void mainDlgCode::programInit(UserManagerBackend *back)
 {
     setEnabled(false);
     
     this->back = back;
-    userListPointer = 0;
-    groupListPointer = 0;
     availablePointer = 0;
     memberPointer = 0;
     white = QColor(255, 255, 255);
@@ -57,7 +53,7 @@
     setEnabled(true);
     
     //Make connections
-    connect(groupList, SIGNAL(highlighted( const QString & )), this, SLOT(getGroupDetails( const QString& )));
+    connect(groupList, SIGNAL(currentTextChanged( const QString & )), this, SLOT(getGroupDetails( const QString& )));
     connect(newButton, SIGNAL(clicked()), this, SLOT(showAddDlg()));
     connect(back, SIGNAL(usersChanged()), this, SLOT(usersChanged()));
     connect(deleteButton, SIGNAL(clicked()), this, SLOT(removeUser()));
@@ -76,21 +72,19 @@
 
 void mainDlgCode::updateUserList()
 {
-    qDebug("MainDlg: Updating user list");
-    disconnect(userList, SIGNAL(highlighted( const QString & )), 0, 0);
+    qDebug() << "MainDlg: Updating user list";
+    disconnect(userList, SIGNAL(currentTextChanged( const QString & )), 0, 0);
     
-    userListPointer = userList->currentItem();
-    if (userListPointer < 0) { userListPointer = 0; }
     QStringList users = back->getAllUsers(-1, -1);
     users.sort();
     userList->clear();
-    userList->insertStringList(users);
-    userList->setSelected(userListPointer, true);
-    userList->ensureCurrentVisible();
-    getUserDetails(userList->currentText());
+    userList->addItems(users);
+    userList->setCurrentRow(0);
     
-    connect(userList, SIGNAL(highlighted( const QString & )), this, SLOT(getUserDetails( const QString& )));
+    getUserDetails(userList->currentItem()->text());
     
+    connect(userList, SIGNAL(currentTextChanged( const QString & )), this, SLOT(getUserDetails( const QString& )));
+    
     //These won't always invoke first time without these lines
     fullnameChanged();
     homeChanged();
@@ -98,27 +92,30 @@
 
 void mainDlgCode::updateShellList()
 {
-    qDebug("MainDlg: Updating shell list");
+    qDebug() << "MainDlg: Updating shell list";
     QStringList shells = back->getShells();
     shells.sort();
     shellBox->clear();
-    shellBox->insertStringList(shells);
+    shellBox->addItems(shells);
 }
 
 void mainDlgCode::updateGroupList()
 {
-    qDebug("MainDlg: Updating group list");
-    groupListPointer = groupList->currentItem();
-    if (groupListPointer < 0) { groupListPointer = 0; }
+    qDebug() << "MainDlg: Updating group list";
+    disconnect(groupList, SIGNAL(currentTextChanged( const QString & )), 0, 0);
+
     QStringList groups = back->getAllGroups(-1, -1);
     groups.sort();
     groupBox->clear();
-    groupBox->insertStringList(groups);
+    groupBox->addItems(groups);
     groupList->clear();
-    groupList->insertStringList(groups);
-    groupList->setSelected(groupListPointer, true);
-    groupList->ensureCurrentVisible();
-    getGroupDetails(groupList->currentText());
+    groupList->addItems(groups);
+    groupList->setCurrentRow(0);
+
+    getGroupDetails(groupList->currentItem()->text());
+
+    qDebug() << "MainDlg: Done with updateGroupList()";
+    connect(groupList, SIGNAL(currentTextChanged( const QString & )), this, SLOT(getGroupDetails( const QString& )));
 }
 
 void mainDlgCode::enableEdits(bool enable)
@@ -133,7 +130,7 @@
 {
     systemChange = true;
     
-    qDebug("Fetching details for user: %s", username.ascii());
+    qDebug() << "Fetching details for user: " << username;
     User *user = back->getUser(username);
     
     //Disable certain form fields if the user is root, to stop changing of important fields
@@ -147,19 +144,24 @@
     fullnameBox->setText(user->getFullname());
     homeBox->setText(user->getHome());
     
-    shellBox->setCurrentText(user->getShell());
+    shellBox->setItemText(shellBox->currentIndex(), user->getShell());
     
-    Group *group = back->getGroup(user->getGid());
-    QString groupname = group->getGroupname();
-    if (groupname == "Not Set") { groupname = username; }
-    groupBox->setCurrentText(groupname);
+    QString groupname;
+    if ( user->getGid() != -1 ) {
+    	Group *group = back->getGroup(user->getGid());
+    	groupname = group->getGroupname();
+    	if (groupname == "Not Set") { groupname = username; }
+    } else {
+    	groupname = username;
+    }
+    groupBox->setItemText(groupBox->currentIndex(), groupname);
     
     systemChange = false;
 }
 
 void mainDlgCode::getGroupDetails(const QString &groupname)
 {
-    qDebug("Fetching details for group: %s", groupname.ascii());
+    qDebug() << "Fetching details for group: " << groupname;
     QStringList users = back->getAllUsers(-1, -1);
     users.sort();
     Group *group = back->getGroup(groupname);
@@ -174,13 +176,11 @@
     //Traverse the user list, if the user is a member place in the 'members' box, otherwise place them in the 'available' box.
     for (QStringList::Iterator it = users.begin(); it != users.end(); it++)
     {
-        if (group->isMember(*it) == true) { memberList->insertItem(*it); }
-	else { availableList->insertItem(*it); }
+        if (group->isMember(*it) == true) { memberList->addItem(*it); }
+	else { availableList->addItem(*it); }
     }
-    memberList->setSelected(memberPointer, true);
-    memberList->ensureCurrentVisible();
-    availableList->setSelected(availablePointer, true);
-    availableList->ensureCurrentVisible();
+    memberList->setCurrentItem(memberPointer);
+    availableList->setCurrentItem(availablePointer);
 }
 
 void mainDlgCode::showAddDlg()
@@ -204,18 +204,18 @@
 
 void mainDlgCode::removeUser()
 {
-    QString username = userList->currentText();
+    QString username = userList->currentItem()->text();
     back->deleteUser(username);
 }
 
 void mainDlgCode::makeAvailable()
 {
-    back->removeUserFromGroup(memberList->currentText(), groupList->currentText());
+    back->removeUserFromGroup(memberList->currentItem()->text(), groupList->currentItem()->text());
 }
 
 void mainDlgCode::makeMember()
 {
-    back->addUserToGroup(availableList->currentText(), groupList->currentText());
+    back->addUserToGroup(availableList->currentItem()->text(), groupList->currentItem()->text());
 }
 
 void mainDlgCode::groupsChanged()
@@ -226,7 +226,7 @@
 
 void mainDlgCode::removeGroup()
 {
-    back->deleteGroup(groupList->currentText());
+    back->deleteGroup(groupList->currentItem()->text());
 }
 
 void mainDlgCode::addGroup()
@@ -238,17 +238,17 @@
         switch(valid)
         {
             case 1:
-                KMessageBox::error(this, tr("You must specify a name for your group"), tr("Error adding group..."));
+                QMessageBox::critical(this, tr("You must specify a name for your group"), tr("Error adding group..."));
                 break;
             case 2:
-                KMessageBox::error(this, tr("Invalid group name specified. Group names may contain only letters and number. Spaces are NOT permitted"), tr("Error adding group..."));
+                QMessageBox::critical(this, tr("Invalid group name specified. Group names may contain only letters and number. Spaces are NOT permitted"), tr("Error adding group..."));
                 break;
             case 3:
-                KMessageBox::error(this, tr("The group '") + group + tr("' already exists, please choose a different name"), tr("Error adding group..."));
+                QMessageBox::critical(this, tr("The group '") + group + tr("' already exists, please choose a different name"), tr("Error adding group..."));
                 break;
         }
         
-        group = KInputDialog::getText(tr("New Group"), tr("Please enter a name for your new group"), group, 0, this);
+        group = QInputDialog::getText(this, tr("New Group"), tr("Please enter a name for your new group"));
         if (group == QString::null) { return; }
         valid = back->validateGroupname(group);
     }
@@ -258,38 +258,38 @@
 void mainDlgCode::changePassword()
 {
     changePassUi = new ChangePassCode();
-    changePassUi->programInit(userList->currentText(), back);
+    changePassUi->programInit(userList->currentItem()->text(), back);
     changePassUi->show();
 }
 
 void mainDlgCode::homeChanged()
 {
-    User *user = back->getUser(userList->currentText());
+    User *user = back->getUser(userList->currentItem()->text());
     
     int homeError = back->validateHome(homeBox->text());
     
     QColor homeBoxColour = white;
-    QToolTip::add(homeBox, tr("Directory will be used"));
+    homeBox->setToolTip(tr("Directory will be used"));
     
     switch (homeError)
     {
     case 1:
-	QToolTip::add(homeBox, tr("The field is empty"));
+	homeBox->setToolTip(tr("The field is empty"));
 	break;
     case 2:
 	homeBoxColour = red;
-	QToolTip::add(homeBox, tr("Invalid Path!"));
+	homeBox->setToolTip(tr("Invalid Path!"));
 	break;
     case 3:
-	QToolTip::add(homeBox, tr("Directory does not exist, but will be made"));
+	homeBox->setToolTip(tr("Directory does not exist, but will be made"));
 	break;
     case 4:
 	homeBoxColour = orange;
-	QToolTip::add(homeBox, tr("Placing home directory outside '/home/' can cause compatibility problems with some programs. NOT RECOMMENDED"));
+	homeBox->setToolTip(tr("Placing home directory outside '/home/' can cause compatibility problems with some programs. NOT RECOMMENDED"));
 	break;
     case 5:
 	homeBoxColour = red;
-	QToolTip::add(homeBox, tr("Requested path is a file (not a directory!)"));
+	homeBox->setToolTip(tr("Requested path is a file (not a directory!)"));
 	break;
     }
     
@@ -300,26 +300,28 @@
         emit changed(true);
     }
     
-    homeBox->setPaletteBackgroundColor(homeBoxColour);
+    QPalette bgPal(homeBoxColour);
+    bgPal.setColor(QPalette::Window,homeBoxColour);
+    homeBox->setPalette(bgPal);
 }
 
 void mainDlgCode::fullnameChanged()
 {
-    User *user = back->getUser(userList->currentText());
+    User *user = back->getUser(userList->currentItem()->text());
     
     int fullnameError = back->validateFullname(fullnameBox->text());
     
     QColor fullnameBoxColour = white;
-    QToolTip::add(fullnameBox, tr("Good Input"));
+    fullnameBox->setToolTip(tr("Good Input"));
     
     switch(fullnameError)
     {
     case 1:
-	QToolTip::add(fullnameBox, tr("The field is empty"));
+	fullnameBox->setToolTip(tr("The field is empty"));
 	break;
     case 2:
 	fullnameBoxColour = red;
-	QToolTip::add(fullnameBox, tr("This field may not contain ! @ or :"));
+	fullnameBox->setToolTip(tr("This field may not contain ! @ or :"));
 	break;
     }
     
@@ -330,7 +332,9 @@
         emit changed(true);
     }
     
-    fullnameBox->setPaletteBackgroundColor(fullnameBoxColour);
+    QPalette bgPal(fullnameBoxColour);
+    bgPal.setColor(QPalette::Window,fullnameBoxColour);
+    fullnameBox->setPalette(bgPal);
 }
 
 void mainDlgCode::simplePressed()
@@ -340,7 +344,7 @@
 
 void mainDlgCode::shellChanged()
 {
-    User *user = back->getUser(userList->currentText());
+    User *user = back->getUser(userList->currentItem()->text());
     
     if (! systemChange)
     {
@@ -352,7 +356,7 @@
 
 void mainDlgCode::groupChanged()
 {
-    User *user = back->getUser(userList->currentText());
+    User *user = back->getUser(userList->currentItem()->text());
     
     if (! systemChange)
     {

Modified: pcbsd/stable/pcbsdusermanager/maindlgcode.h
===================================================================
--- pcbsd/stable/pcbsdusermanager/maindlgcode.h	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/maindlgcode.h	2010-12-21 14:53:59 UTC (rev 8243)
@@ -31,6 +31,7 @@
         
 #include <qstringlist.h>
 #include <qcolor.h>
+#include <QListWidgetItem>
 
 class mainDlgCode: public QDialog, private Ui::MainDlg {
 Q_OBJECT
@@ -67,10 +68,8 @@
     UserManagerBackend *back;
     QStringList *users;
     AddDlgCode *addui;
-    int userListPointer;
-    int groupListPointer;
-    int availablePointer;
-    int memberPointer;
+    QListWidgetItem *availablePointer;
+    QListWidgetItem *memberPointer;
     ChangePassCode *changePassUi;
     QColor white;
     QColor red;

Modified: pcbsd/stable/pcbsdusermanager/pcbsdusermanager.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/pcbsdusermanager.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/pcbsdusermanager.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -30,15 +30,10 @@
 
 void PCBSDUserManager::setupUMDialogs()
 {
-
-    QTranslator translator( 0 );
-    translator.load( QString("pcbsdusermanager_") + QTextCodec::locale(), "/PCBSD/LANGS/" );
-    qApp->installTranslator( &translator );
-    
     layout = new QGridLayout(widgetUserContainer);
 
     //Init GUI
-   if (getuid() == 0) //Check for root
+    if (getuid() == 0) //Check for root
     {
        // Setup our buttons
        pushSave->setEnabled(false);

Modified: pcbsd/stable/pcbsdusermanager/pcbsdusermanager.pro
===================================================================
--- pcbsd/stable/pcbsdusermanager/pcbsdusermanager.pro	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/pcbsdusermanager.pro	2010-12-21 14:53:59 UTC (rev 8243)
@@ -3,7 +3,7 @@
 
 CONFIG  += qt warn_on release
 
-LIBS += -L/usr/local/kde4/lib -lkdecore -lkio -lkdeui -Ikdelibs -lcrypt
+LIBS += -lcrypt
 
 SOURCES += group.cpp \
 	pcbsdusermanager.cpp \
@@ -35,7 +35,7 @@
 
 RESOURCES += pcbsdusermanager.qrc
 
-INCLUDEPATH += /usr/local/kde4/include /usr/local/include/qt4
+INCLUDEPATH += /usr/local/include/qt4
 
 TARGET = /usr/local/kde4/bin/pcUserManager
 
@@ -109,6 +109,4 @@
 
 INSTALLS += desktop dotrans
 
-QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib
-
-QT += qt3support
+QMAKE_LIBDIR = /usr/local/lib/qt4 /usr/local/lib

Modified: pcbsd/stable/pcbsdusermanager/simpleaddcode.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/simpleaddcode.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/simpleaddcode.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -26,10 +26,9 @@
 #include <qlineedit.h>
 #include <qtooltip.h>
 #include <qpushbutton.h>
+#include <QMessageBox>
+#include <QDebug>
         
-#include <kmessagebox.h>
-#include <klocale.h>
-
 void SimpleAddCode::programInit(UserManagerBackend *back)
 {
     this->back = back;
@@ -45,30 +44,33 @@
 
 void SimpleAddCode::usernameChanged()
 {
-    QString username = usernameBox->text().lower();
+    QString username = usernameBox->text().toLower();
     usernameBox->setText(username);
     
     //Validate
     int usernameError = back->validateUsername(username);
     
     QColor usernameBoxColour = white;
-    QToolTip::add(usernameBox, tr("Good Input"));
+    usernameBox->setToolTip( tr("Good Input"));
     
     switch (usernameError) 
     {
     case 1:
-	QToolTip::add(usernameBox, tr("The field is empty"));
+	usernameBox->setToolTip( tr("The field is empty"));
 	break;
     case 2:
 	usernameBoxColour = red;
-	QToolTip::add(usernameBox, tr("This field can only accept letters and numbers"));
+	usernameBox->setToolTip( tr("This field can only accept letters and numbers"));
 	break;
     case 3:
 	usernameBoxColour = red;
-	QToolTip::add(usernameBox, tr("This username is already in use, please choose another."));
+	usernameBox->setToolTip(tr("This username is already in use, please choose another."));
     }
     
-    usernameBox->setPaletteBackgroundColor(usernameBoxColour);
+    QPalette bgPal(usernameBoxColour);
+    bgPal.setColor(QPalette::Window,usernameBoxColour);
+    usernameBox->setPalette(bgPal);
+
 }
 
 void SimpleAddCode::passwordChanged()
@@ -76,23 +78,26 @@
     int passError = back->validatePassword(passBox->text(), confirmPassBox->text());
     
     QColor passBoxColour = white;
-    QToolTip::add(passBox, tr("Passwords match"));
+    passBox->setToolTip(tr("Passwords match"));
     
     switch (passError)
     {
     case 1:
-	QToolTip::add(passBox, "");
+	passBox->setToolTip("");
 	break;
     case 2:
         passBoxColour = red;
-	QToolTip::add(passBox, tr("Passwords do not match"));
+	passBox->setToolTip(tr("Passwords do not match"));
 	break;
     case 3:
         passBoxColour = red;
-        QToolTip::add(passBox, tr("Invalid input"));
+        passBox->setToolTip(tr("Invalid input"));
     }
     
-    passBox->setPaletteBackgroundColor(passBoxColour);
+    QPalette bgPal(passBoxColour);
+    bgPal.setColor(QPalette::Window,passBoxColour);
+    passBox->setPalette(bgPal);
+
 }
 
 void SimpleAddCode::fullnameChanged()
@@ -100,25 +105,27 @@
     int fullnameError = back->validateFullname(fullnameBox->text());
     
     QColor fullnameBoxColour = white;
-    QToolTip::add(fullnameBox, tr("Good Input"));
+    fullnameBox->setToolTip(tr("Good Input"));
     
     switch(fullnameError)
     {
     case 1:
-	QToolTip::add(fullnameBox, tr("The field is empty"));
+	fullnameBox->setToolTip(tr("The field is empty"));
 	break;
     case 2:
 	fullnameBoxColour = red;
-	QToolTip::add(fullnameBox, tr("This field may not contain ! @ or :"));
+	fullnameBox->setToolTip(tr("This field may not contain ! @ or :"));
 	break;
     }
     
-    fullnameBox->setPaletteBackgroundColor(fullnameBoxColour);
+    QPalette bgPal(fullnameBoxColour);
+    bgPal.setColor(QPalette::Window,fullnameBoxColour);
+    fullnameBox->setPalette(bgPal);
 }
 
 void SimpleAddCode::submit()
 {
-    qDebug("starting submit()");
+    qDebug() << "starting submit()";
 
     //Validate all data fields, prompt with errors or create the new user as requested
     bool inputError = false;
@@ -127,7 +134,7 @@
     QString warnText = tr("The following non-critical errors occurred whilst trying to add a new user, do you wish to continue?\n");
     
     //Username validation
-    qDebug("before username validation.........");
+    qDebug() << "before username validation.........";
     QString username = usernameBox->text();
     int usernameError = back->validateUsername(username);
     
@@ -148,7 +155,7 @@
     
 
     //Full name validation
-    qDebug("before full name validation.........");
+    qDebug() << "before full name validation.........";
     QString fullname = fullnameBox->text();
     int fullnameError = back->validateFullname(fullname);
     switch (fullnameError)
@@ -164,17 +171,17 @@
     }
     
     //Password validation
-    qDebug("before password validation.........");
+    qDebug() << "before password validation.........";
     QString password = passBox->text();
     QString confirmPassword = confirmPassBox->text();
     
     int passError = back->validatePassword(password, confirmPassword);
-    qDebug("after password validation.........");
+    qDebug() << "after password validation.........";
     
     switch (passError)
     {
     case 0:
-        qDebug("Case 0 was found!!!........." + username + " pass: " + password);
+        qDebug() << "Case 0 was found!!!........." + username + " pass: " + password;
 	//back->changePassword(username, password);
 	close();
 	break;
@@ -197,7 +204,7 @@
    if (inputError)
    {
        //Throw up the error box!
-       KMessageBox::error(this, inputText, tr("Error!"));
+       QMessageBox::critical(this, inputText, tr("Error!"));
    }
    else
    {
@@ -210,10 +217,10 @@
        //Check we didn't abort the operation
        if (abortAdd == 0)
        {
-           qDebug("Before back->addUser");
+           qDebug() << "Before back->addUser";
 	   back->addUser(username, fullname, "/home/" + username, "/bin/sh", QString::null, password);
 	   back->changePassword(username, password);
-           qDebug("After back->addUser");
+           qDebug() << "After back->addUser";
        }
    }
 }

Modified: pcbsd/stable/pcbsdusermanager/simpledlgcode.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/simpledlgcode.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/simpledlgcode.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -24,14 +24,13 @@
 #include "simpledlgcode.h"
 #include "user.h"
         
-#include <klocale.h>
-        
 #include <qstringlist.h>
 #include <qpushbutton.h>
 #include <qcheckbox.h>
 #include <qlineedit.h>
 #include <qtooltip.h>
 #include <qcolor.h>
+#include <QDebug>
 
 void SimpleDlgCode::programInit(UserManagerBackend *back)
 {
@@ -42,7 +41,7 @@
     refreshUsers();
     
     connect(advancedBut, SIGNAL(clicked()), this, SLOT(advancedPressed()));
-    connect(userList, SIGNAL(highlighted( const QString & )), this, SLOT(getUserDetails( const QString& )));
+    connect(userList, SIGNAL(currentTextChanged( const QString & )), this, SLOT(getUserDetails( const QString& )));
     connect(fullnameBox, SIGNAL(textChanged(const QString&)), this, SLOT(fullnameChanged()));
     connect(canAdminCheck, SIGNAL(toggled(bool)), this, SLOT(canAdminChanged(bool)));
     connect(changePasswordBut, SIGNAL(clicked()), this, SLOT(changePassword()));
@@ -55,17 +54,24 @@
 void SimpleDlgCode::refreshUsers()
 {
     qDebug("Adding user to userlist:" );
+
+    disconnect(userList, SIGNAL(currentTextChanged( const QString & )), 0, 0);
+
+    QString tmp;
     wheel = back->getGroup(0);
     QStringList users = back->getAllUsers();
     users.sort();
     userList->clear();
     
+    qDebug() << "All Users in list:" << users;
     for ( QStringList::Iterator it = users.begin(); it != users.end(); ++it )
     {
-        userList->insertItem(userImage, *it + " (" + back->getUser(*it)->getFullname() + ")");
+	new QListWidgetItem(userImage, *it + " (" + back->getUser(*it)->getFullname() + ")", userList);
     }
-    userList->setCurrentItem(0);
-    getUserDetails(userList->currentText());
+    userList->setCurrentRow(0);
+    getUserDetails(userList->currentItem()->text());
+
+    connect(userList, SIGNAL(currentTextChanged( const QString & )), this, SLOT(getUserDetails( const QString& )));
 }
 
 void SimpleDlgCode::advancedPressed()
@@ -75,10 +81,10 @@
 
 void SimpleDlgCode::getUserDetails(const QString& username)
 {
-    qDebug("Simple dialog, fetching information for: %s", username.ascii());
+    qDebug() << "Simple dialog, fetching information for: " << username;
     
     systemChange = true;
-    User *user = back->getUser(QStringList::split(" ", username)[0]);
+    User *user = back->getUser(username.section(" ", 0, 0));
     
     fullnameBox->setText(user->getFullname());
     
@@ -92,21 +98,21 @@
 
 void SimpleDlgCode::fullnameChanged()
 {
-    User *user = back->getUser(QStringList::split(" ", userList->currentText())[0]);
+    User *user = back->getUser(userList->currentItem()->text().section(" ", 0, 0));
     
     int fullnameError = back->validateFullname(fullnameBox->text());
     
     QColor fullnameBoxColour("white");
-    QToolTip::add(fullnameBox, tr("Good Input"));
+    fullnameBox->setToolTip(tr("Good Input"));
     
     switch(fullnameError)
     {
     case 1:
-	QToolTip::add(fullnameBox, tr("The field is empty"));
+	fullnameBox->setToolTip(tr("The field is empty"));
 	break;
     case 2:
 	fullnameBoxColour.setRed(fullnameBoxColour.red());
-	QToolTip::add(fullnameBox, tr("This field may not contain ! @ or :"));
+	fullnameBox->setToolTip(tr("This field may not contain ! @ or :"));
 	break;
     }
     
@@ -114,18 +120,20 @@
     {
         user->setFullname(fullnameBox->text());
         user->setChanges();
-        userList->changeItem(userImage, user->getUsername() + " (" + fullnameBox->text() + ")", userList->currentItem());
+        userList->currentItem()->setText(user->getUsername() + " (" + fullnameBox->text() + ")");
         emit changed();
     }
     
-    fullnameBox->setPaletteBackgroundColor(fullnameBoxColour);
+    QPalette bgPal(fullnameBoxColour);
+    bgPal.setColor(QPalette::Window, fullnameBoxColour);
+    fullnameBox->setPalette(bgPal);
 }
 
 void SimpleDlgCode::canAdminChanged(bool on)
 {
     if (! systemChange)
     {
-        QString username = QStringList::split(" ", userList->currentText())[0];
+        QString username = userList->currentItem()->text().section(" ", 0, 0);
         
         if ((! wheel->isMember(username)) && on) { back->addUserToGroup(username, "wheel"); }
         else if (wheel->isMember(username) && (! on)) { back->removeUserFromGroup(username, "wheel"); }
@@ -135,7 +143,7 @@
 void SimpleDlgCode::changePassword()
 {
     changePassUi = new ChangePassCode();
-    changePassUi->programInit(QStringList::split(" ", userList->currentText())[0], back);
+    changePassUi->programInit(userList->currentItem()->text().section(" ", 0, 0), back);
     changePassUi->show();
 }
 
@@ -148,7 +156,7 @@
 
 void SimpleDlgCode::removeUser()
 {
-    back->deleteUser(QStringList::split(" ", userList->currentText())[0]);
+    back->deleteUser(userList->currentItem()->text().section(" ", 0, 0));
 }
 
 void SimpleDlgCode::addUser()

Modified: pcbsd/stable/pcbsdusermanager/user.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/user.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/user.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -25,6 +25,7 @@
 #include <unistd.h>
         
 #include "user.h"
+#include <QDebug>
 
 User::User() {
     username = "Not set";
@@ -126,7 +127,7 @@
 
 void User::setPassword(QString password)
 {
-    this->password = crypt(password, "KG");
+    this->password = crypt(password.toAscii(), "KG");
     qDebug("Done with crypt now........");
     setChanges();
 }

Modified: pcbsd/stable/pcbsdusermanager/usermanagerback.cpp
===================================================================
--- pcbsd/stable/pcbsdusermanager/usermanagerback.cpp	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/usermanagerback.cpp	2010-12-21 14:53:59 UTC (rev 8243)
@@ -24,7 +24,9 @@
 
 #include "usermanagerback.h"
 #include <qtextstream.h>
-#include <Q3UrlOperator>
+#include <QDebug>
+#include <QUrl>
+#include <QFileInfo>
 
 UserManagerBackend::UserManagerBackend() {
    programInit();
@@ -41,24 +43,26 @@
 QStringList UserManagerBackend::getAllUsers(int minId, int maxId) {
     if (userList.empty()) { refreshUsers(); }
     
+    qDebug() << "Generating new user list for UI...";
+
     QStringList result;
     QMap<QString, User>::Iterator it;
-    
-    qDebug("Generating new user list for UI...");
+
     for ( it = userList.begin(); it != userList.end(); ++it ) {
-	if ((! it.data().getDeleted()) && (((it.data().getUid() >= minId) || (minId == -1)) && (it.data().getUid() <= maxId) || (maxId == -1) || (it.data().getUid() < 0))) {
-	    result.append(it.data().getUsername());
+	if ((! it->getDeleted()) && (((it->getUid() >= minId) || (minId == -1)) && (it->getUid() <= maxId) || (maxId == -1) || (it->getUid() < 0))) {
+	    result.append(it->getUsername());
 	}
     }
     
+    qDebug() << "Done Generating new user list for UI...";
     return result;
 }
 
 void UserManagerBackend::refreshUsers() {
-    qDebug("Refreshing user list...");
+    qDebug() << "Refreshing user list...";
     userList.clear();
     QFile userFile("/etc/passwd");
-    if ( userFile.open(IO_ReadOnly) ) {
+    if ( userFile.open(QIODevice::ReadOnly) ) {
 	QTextStream stream(&userFile);
 	stream.setCodec("UTF-8");
 	QString line;
@@ -85,13 +89,13 @@
 }
 
 User* UserManagerBackend::getUser(const QString &user) {
-    return &userList.find(user).data();
+    return &userList.find(user).value();
 }
 
 QStringList UserManagerBackend::getShells() {
     QStringList result;
     QFile shellFile("/etc/shells");
-    if ( shellFile.open(IO_ReadOnly) ) {
+    if ( shellFile.open(QIODevice::ReadOnly) ) {
 	QTextStream stream(&shellFile);
 	stream.setCodec("UTF-8");
 
@@ -122,21 +126,23 @@
     QStringList result;
     QMap<int, Group>::Iterator it;
     
-    qDebug("Generating new group list for UI...");
+    qDebug() << "Generating new group list for UI...";
+
     for ( it = groupList.begin(); it != groupList.end(); ++it ) {
-	if ((! it.data().getDeleted()) && (((it.data().getGid() >= minId) || (minId == -1) ) && ((it.data().getGid() <= maxId) || (maxId == -1 )))) {
-	    result.append(it.data().getGroupname());
+	if ((! it->getDeleted()) && (((it->getGid() >= minId) || (minId == -1) ) && ((it->getGid() <= maxId) || (maxId == -1 )))) {
+	    result.append(it->getGroupname());
 	}
     }
-    
+
+    qDebug() << "Done Generating new group list for UI...";
     return result;
 }
 
 void UserManagerBackend::refreshGroups() {
-    qDebug("Refreshing group list...");
+    qDebug() << "Refreshing group list...";
     groupList.clear();
     QFile groupFile("/etc/group");
-    if ( groupFile.open(IO_ReadOnly) ) {
+    if ( groupFile.open(QIODevice::ReadOnly) ) {
 	QTextStream stream(&groupFile);
 	stream.setCodec("UTF-8");
 
@@ -149,7 +155,7 @@
 		QString groupname = line.section(":",0,0);
 		int gid = line.section(":",2,2).toInt();
 		QString memberString = line.section(":",3,3);
-		QStringList members = QStringList::split(",", memberString);
+		QStringList members = memberString.split(",");
 		
 		groupList[gid] = Group(groupname, gid, members);
 	    }
@@ -162,7 +168,7 @@
 }
 
 Group* UserManagerBackend::getGroup(int gid) {
-    return &groupList.find(gid).data();
+    return &groupList.find(gid).value();
 }
 
 Group* UserManagerBackend::getGroup(QString groupname) {
@@ -170,8 +176,8 @@
     QMap<int, Group>::Iterator it;
     
     for ( it = groupList.begin(); it != groupList.end(); ++it ) {
-	if (it.data().getGroupname() == groupname) {
-	    result = &it.data();
+	if (it->getGroupname() == groupname) {
+	    result = &it.value();
 	}
     }
     
@@ -194,7 +200,7 @@
 
 void UserManagerBackend::changePassword(QString username, QString password)
 {
-    qDebug("running changePassword() ");
+    qDebug() << "running changePassword()";
     userList[username].setPassword(password);
     emit usersChanged();
 }
@@ -215,14 +221,14 @@
 int UserManagerBackend::validateHome(QString home) {
     int result = 0;
     QFileInfo homeDir(home);
-    Q3UrlOperator *homePath = new Q3UrlOperator(home);
+    QUrl *homePath = new QUrl(home);
     if (home == "") {
 	result = 1;
     }
-    if ((! homePath->isDir()) && (home != "")) {
+    if ((! homeDir.isDir()) && (home != "")) {
 	result = 3;
     }
-    if ((homeLocRegExp.search(home) == -1) && (home != "")) {
+    if ((homeLocRegExp.indexIn(home) == -1) && (home != "")) {
 	result = 4;
     }    
     if ((homeDir.isFile()) && (home != "")) {
@@ -260,22 +266,23 @@
 
 void UserManagerBackend::addUser(QString username, QString fullname, QString home, QString shell, QString group, QString password)
 {
-    qDebug("Starting addUser: " + username);
+    qDebug() << "Starting addUser " << username;
     int gid = -1;
     QMap<int, Group>::Iterator it;
     
     for ( it = groupList.begin(); it != groupList.end(); ++it )
     {
-	if (it.data().getGroupname() == group)
+	if (it->getGroupname() == group)
         {
-            gid = it.data().getGid();
+            gid = it->getGid();
             break;
         }
     }
     userList[username] = User(username, home, shell, fullname, password, gid);
     
+    qDebug() << "KPM: userList" << username << home << shell << fullname << password << gid << group;
     emit usersChanged();
-    qDebug("Finished addUser: " + username);
+    qDebug() << "Finished addUser: " << username;
 }
 
 void UserManagerBackend::deleteGroup(QString groupname)
@@ -299,7 +306,7 @@
     QMap<int, Group>::Iterator it;
     
     for ( it = groupList.begin(); it != groupList.end(); ++it ) {
-	if (it.data().getGroupname() == groupname) {
+	if (it->getGroupname() == groupname) {
 	    result = 3;
 	}
     }
@@ -334,76 +341,68 @@
     
     //Process users
     QMap<QString, User>::Iterator userIt;
+
+    QStringList args;
     
     for ( userIt = userList.begin(); userIt != userList.end(); ++userIt )
     {
-        pw = new Q3Process(0);
-        switch(userIt.data().getStatus())
+	args.clear();
+        switch(userIt->getStatus())
         {
             case 1:
                 //Modify User
-                qDebug("Modifying user '%s'", userIt.data().getUsername().ascii());
-                pw->addArgument("pw");
-                pw->addArgument("usermod");
-                pw->addArgument(userIt.data().getUsername());
-                pw->addArgument("-d");
-                pw->addArgument(userIt.data().getHome());
-                pw->addArgument("-s");
-                pw->addArgument(userIt.data().getShell());
-                pw->addArgument("-c");
-                pw->addArgument(userIt.data().getFullname());
-                pw->start();
-                while(pw->isRunning());
+                qDebug() << "Modifying user " << userIt->getUsername();
+                args << "usermod";
+                args << userIt->getUsername();
+                args << "-d";
+                args << userIt->getHome();
+                args << "-s";
+                args << userIt->getShell();
+                args << "-c";
+                args << userIt->getFullname();
+		QProcess::execute("pw", args);
                 
-                if (userIt.data().getPassword() != "")
+                if (userIt->getPassword() != "")
                 {
-                    pw = new Q3Process(0);
-                    pw->addArgument("chpass");
-                    pw->addArgument("-p");
-                    pw->addArgument(userIt.data().getPassword());
-                    pw->addArgument(userIt.data().getUsername());
-                    pw->start();
-                    while(pw->isRunning());
+		    args.clear();
+                    args << "-p";
+                    args << userIt->getPassword();
+                    args << userIt->getUsername();
+		    QProcess::execute("chpass", args);
                 }
                 break;
             case 2:
                 //Add User
-                qDebug("Adding user '%s'", userIt.data().getUsername().ascii());
-                pw->addArgument("pw");
-                pw->addArgument("useradd");
-                pw->addArgument(userIt.data().getUsername());
-                pw->addArgument("-c");
-                pw->addArgument(userIt.data().getFullname());
-                pw->addArgument("-d");
-                pw->addArgument(userIt.data().getHome());
-                pw->addArgument("-s");
-                pw->addArgument(userIt.data().getShell());
-                if (userIt.data().getGid() != -1)
+                qDebug() << "Adding user " << userIt->getUsername();
+                args << "useradd";
+                args << userIt->getUsername();
+                args << "-c";
+                args << userIt->getFullname();
+                args << "-d";
+                args << userIt->getHome();
+                args << "-s";
+                args << userIt->getShell();
+                if (userIt->getGid() != -1)
                 {
-                    pw->addArgument("-g");
-                    pw->addArgument(QString::number(userIt.data().getGid()));
+                    args << "-g";
+                    args << QString::number(userIt->getGid());
                 }
-                if (validateHome(userIt.data().getHome()) == 3) { pw->addArgument("-m"); }
-                pw->start();
-                while(pw->isRunning());
+                if (validateHome(userIt->getHome()) == 3) { args << "-m"; }
+		QProcess::execute("pw", args);
                 
-                pw = new Q3Process(0);
-                pw->addArgument("chpass");
-                pw->addArgument("-p");
-                pw->addArgument(userIt.data().getPassword());
-                pw->addArgument(userIt.data().getUsername());
-                pw->start();
-                while(pw->isRunning());
+		args.clear();
+                args << "-p";
+                args << userIt->getPassword();
+                args << userIt->getUsername();
+		QProcess::execute("chpass", args);
                 break;
             case 3:
                 //Delete User
-                qDebug("Deleting user '%s'", userIt.data().getUsername().ascii());
-                pw->addArgument("pw");
-                pw->addArgument("userdel");
-                pw->addArgument(userIt.data().getUsername());
-                pw->addArgument("-r");
-                pw->start();
-                while(pw->isRunning());
+                qDebug() << "Deleting user " << userIt->getUsername();
+                args << "userdel";
+                args << userIt->getUsername();
+                args << "-r";
+		QProcess::execute("pw", args);
                 break;
         }
     }
@@ -411,42 +410,36 @@
     
     //Process groups
     QMap<int, Group>::Iterator groupIt;
-    
+ 
     for ( groupIt = groupList.begin(); groupIt != groupList.end(); ++groupIt )
     {
-        pw = new Q3Process(0);
-        switch(groupIt.data().getStatus())
+	args.clear();
+        switch(groupIt->getStatus())
         {
             case 1:
                 //Modify Group
-                qDebug("Modifying group '%s'", groupIt.data().getGroupname().ascii());
-                pw->addArgument("pw");
-                pw->addArgument("groupmod");
-                pw->addArgument(groupIt.data().getGroupname());
-                pw->addArgument("-M");
-                pw->addArgument(groupIt.data().getMembers().join(","));
-                pw->start();
-                while(pw->isRunning());
+                qDebug() << "Modifying group " << groupIt->getGroupname();
+		args << "groupmod";
+		args << groupIt->getGroupname();
+		args << "-M";
+		args << groupIt->getMembers().join(",");
+		QProcess::execute("pw", args);
                 break;
             case 2:
                 //Add Group
-                qDebug("Adding group '%s'", groupIt.data().getGroupname().ascii());
-                pw->addArgument("pw");
-                pw->addArgument("groupadd");
-                pw->addArgument(groupIt.data().getGroupname());
-                pw->addArgument("-M");
-                pw->addArgument(groupIt.data().getMembers().join(","));
-                pw->start();
-                while(pw->isRunning());
+                qDebug() << "Adding group " << groupIt->getGroupname();
+                args << "groupadd";
+                args << groupIt->getGroupname();
+                args << "-M";
+                args << groupIt->getMembers().join(",");
+		QProcess::execute("pw", args);
                 break;
             case 3:
                 //Delete Group
-                qDebug("Deleting group '%s'", groupIt.data().getGroupname().ascii());
-                pw->addArgument("pw");
-                pw->addArgument("groupdel");
-                pw->addArgument(groupIt.data().getGroupname());
-                pw->start();
-                while(pw->isRunning());
+                qDebug() << "Deleting group " << groupIt->getGroupname();
+                args << "groupdel";
+                args << groupIt->getGroupname();
+		QProcess::execute("pw", args);
                 break;
 	}
     }

Modified: pcbsd/stable/pcbsdusermanager/usermanagerback.h
===================================================================
--- pcbsd/stable/pcbsdusermanager/usermanagerback.h	2010-12-21 14:53:16 UTC (rev 8242)
+++ pcbsd/stable/pcbsdusermanager/usermanagerback.h	2010-12-21 14:53:59 UTC (rev 8243)
@@ -27,9 +27,8 @@
 #include <user.h>
 #include <qmap.h>
 #include <group.h>
-#include <Q3Process>
 #include <qregexp.h>
-#include <Q3UrlOperator>
+#include <QProcess>
 #include <qmessagebox.h>
 
 #ifndef INC_USERMANAGERBACKEND_H
@@ -70,7 +69,7 @@
     QRegExp usernameRegExp;
     QRegExp passwordRegExp;
     QRegExp groupnameRegExp;
-    Q3Process *pw;
+    QProcess *pw;
     
 signals:
     void usersChanged();



More information about the Commits mailing list