[PC-BSD Commits] r6456 - pcbsd/trunk/PBReg

svn at pcbsd.org svn at pcbsd.org
Fri Mar 26 13:25:03 PDT 2010


Author: kris
Date: 2010-03-26 13:25:03 -0700 (Fri, 26 Mar 2010)
New Revision: 6456

Modified:
   pcbsd/trunk/PBReg/PBReg.pro
   pcbsd/trunk/PBReg/main.cpp
Log:

Updated pbreg, now 100% QT4 and ready for porting



Modified: pcbsd/trunk/PBReg/PBReg.pro
===================================================================
--- pcbsd/trunk/PBReg/PBReg.pro	2010-03-26 20:17:32 UTC (rev 6455)
+++ pcbsd/trunk/PBReg/PBReg.pro	2010-03-26 20:25:03 UTC (rev 6456)
@@ -2,16 +2,15 @@
 LANGUAGE	= C++
 
 CONFIG	+= qt warn_on release
-TARGET  = PBReg
-DESTDIR = /usr/PCBSD/bin/
+TARGET  = pbreg
 
 SOURCES	+= main.cpp
 
 FORMS	= pbreg.ui
 
-QT +=qt3support
+INCLUDEPATH     += /usr/local/include
 
-INCLUDEPATH     += /usr/PCBSD/includes /usr/local/kde4/include
+QMAKE_LIBDIR = /usr/local/lib /usr/local/lib/qt4
 
-QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib
-
+target.path=/usr/local/bin
+INSTALLS+= target

Modified: pcbsd/trunk/PBReg/main.cpp
===================================================================
--- pcbsd/trunk/PBReg/main.cpp	2010-03-26 20:17:32 UTC (rev 6455)
+++ pcbsd/trunk/PBReg/main.cpp	2010-03-26 20:25:03 UTC (rev 6456)
@@ -12,9 +12,6 @@
 
 QSettings settings("PCBSD");
 
-// Where to open the reg files
-//QString SettingsFile="/PCBSD/conf/Registry";
-
 int main( int argc, char ** argv )
 {
     QCoreApplication a( argc, argv);
@@ -48,17 +45,9 @@
 int get_setting(QString key)
 {
  QString value;
- bool check = TRUE;
-
  
- value = settings.readEntry(key, value, &check);
- 
- if ( check)
- {
-   cout << value.toStdString();
- } else  {
-   return 1;
- }
+ value = settings.value(key, QString()).toString();
+ cout << value.toStdString();
 
  return 0; 
 
@@ -67,23 +56,14 @@
 // Set the value for <key>
 int save_setting(QString key, QString value)
 {
- bool check = TRUE;
-
-
- check = settings.writeEntry(key, value );
-
- if ( ! check)
- {
-   return 1;
- }
-
-
+ settings.setValue(key, value );
  return 0;
 }
 
 bool removeSetting(QString key)
 {
-  return settings.removeEntry(key);
+  settings.remove(key);
+  return true;
 }
 
 void show_opts(void)



More information about the Commits mailing list