[PC-BSD Commits] r7905 - pcbsd/current/src-qt4/life-preserver

svn at pcbsd.org svn at pcbsd.org
Tue Oct 26 09:31:46 PDT 2010


Author: kris
Date: 2010-10-26 09:31:46 -0700 (Tue, 26 Oct 2010)
New Revision: 7905

Modified:
   pcbsd/current/src-qt4/life-preserver/externals.h
   pcbsd/current/src-qt4/life-preserver/main.cpp
Log:

Updated life-preserver to use PREFIX / config.h



Modified: pcbsd/current/src-qt4/life-preserver/externals.h
===================================================================
--- pcbsd/current/src-qt4/life-preserver/externals.h	2010-10-26 16:26:11 UTC (rev 7904)
+++ pcbsd/current/src-qt4/life-preserver/externals.h	2010-10-26 16:31:46 UTC (rev 7905)
@@ -1,2 +1,5 @@
-#define LIFEPRESERVERPATH QString("/usr/local/share/lifePreserver")
-#define LIFEPRESERVERSDIR LIFEPRESERVERPATH + QString("/preservers")
+#include <QString>
+#include "../config.h"
+
+const QString LIFEPRESERVERPATH( PREFIX + "/share/lifePreserver");
+const QString LIFEPRESERVERSDIR( LIFEPRESERVERPATH + QString("/preservers"));

Modified: pcbsd/current/src-qt4/life-preserver/main.cpp
===================================================================
--- pcbsd/current/src-qt4/life-preserver/main.cpp	2010-10-26 16:26:11 UTC (rev 7904)
+++ pcbsd/current/src-qt4/life-preserver/main.cpp	2010-10-26 16:31:46 UTC (rev 7905)
@@ -3,6 +3,7 @@
 #include <QDebug>
 #include "preserver.h"
 #include "lifePreserverMain.h"
+#include "../config.h"
 
 int main( int argc, char ** argv )
 {
@@ -11,9 +12,9 @@
     QTranslator translator;
     QLocale mylocale;
     QString langCode = mylocale.name();
-    if ( ! QFile::exists("/usr/local/share/lifePreserver/i18n/LifePreserver_" + langCode + ".qm" ) )
+    if ( ! QFile::exists( PREFIX + "/share/lifePreserver/i18n/LifePreserver_" + langCode + ".qm" ) )
       langCode.truncate(langCode.indexOf("_"));
-    translator.load( QString("LifePreserver_") + langCode, "/usr/local/share/lifePreserver/i18n/" );
+    translator.load( QString("LifePreserver_") + langCode, PREFIX + "/share/lifePreserver/i18n/" );
     a.installTranslator( &translator );
     qDebug() << "Locale:" << langCode;
 



More information about the Commits mailing list