summaryrefslogtreecommitdiff
authorzecke <zecke>2004-08-23 23:15:06 (UTC)
committer zecke <zecke>2004-08-23 23:15:06 (UTC)
commit94611edc1942717faa15861adef25418e40ea626 (patch) (side-by-side diff)
treeea45e973c948c50adb4ac813255b57193b919574
parentf8f1d4f340b591f21cd7c10259da1241ecf69dd9 (diff)
downloadopie-94611edc1942717faa15861adef25418e40ea626.zip
opie-94611edc1942717faa15861adef25418e40ea626.tar.gz
opie-94611edc1942717faa15861adef25418e40ea626.tar.bz2
Do not hardcode /opt/QtPalmtop but use QPEApplication::qpeDir
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/omanufacturerdb.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp
index 3003e12..32bae0a 100644
--- a/libopie2/opienet/omanufacturerdb.cpp
+++ b/libopie2/opienet/omanufacturerdb.cpp
@@ -23,28 +23,31 @@
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "omanufacturerdb.h"
#define OPIE_IMPROVE_GUI_LATENCY 1
/* OPIE */
#include <opie2/odebug.h>
+#include <qpe/qpeapplication.h>
#ifdef OPIE_IMPROVE_GUI_LATENCY
#include <qpe/global.h>
#endif
+
+
/* QT */
#include <qapplication.h>
#include <qfile.h>
#include <qtextstream.h>
using namespace Opie::Core;
namespace Opie {
namespace Net {
OManufacturerDB* OManufacturerDB::_instance = 0;
OManufacturerDB* OManufacturerDB::instance()
@@ -58,25 +61,25 @@ OManufacturerDB* OManufacturerDB::instance()
}
OManufacturerDB::OManufacturerDB()
{
#ifdef OPIE_IMPROVE_GUI_LATENCY
Global::statusMessage( "Reading Manufacturers..." );
#endif
QString filename( "/etc/manufacturers" );
odebug << "OManufacturerDB: trying to read " << filename << oendl;
if ( !QFile::exists( filename ) )
{
- filename = "/opt/QtPalmtop/etc/manufacturers";
+ filename = QPEApplication::qpeDir()+"/etc/manufacturers";
odebug << "OManufacturerDB: trying to read " << filename << oendl;
if ( !QFile::exists( filename ) )
{
filename = "/usr/share/wellenreiter/manufacturers";
odebug << "OManufacturerDB: trying to read " << filename << oendl;
}
}
QFile file( filename );
bool hasFile = file.open( IO_ReadOnly );
if (!hasFile)
{