From 543d9d7c58c9601dba6f47b3a4011313d1d75499 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Fri, 06 May 2005 09:27:12 +0000 Subject: - OManufacturerDB: check if there is a QApplication before calling Global::statusMessage or qApp->processEvents() - ONetwork: skip hostap control interfaces 'wifi*' - OWirelessNetworkInterface: set \0 in SSID() and nickName() to work around (buggy) drivers not returning a zero-terminated string --- (limited to 'libopie2/opienet/omanufacturerdb.cpp') diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp index 123aee8..3af3d4c 100644 --- a/libopie2/opienet/omanufacturerdb.cpp +++ b/libopie2/opienet/omanufacturerdb.cpp @@ -28,8 +28,6 @@ #include "omanufacturerdb.h" -#define OPIE_IMPROVE_GUI_LATENCY 1 - /* OPIE */ #include #include @@ -63,9 +61,7 @@ OManufacturerDB* OManufacturerDB::instance() OManufacturerDB::OManufacturerDB() { - #ifdef OPIE_IMPROVE_GUI_LATENCY - Global::statusMessage( "Reading Manufacturers..." ); - #endif + if ( qApp ) Global::statusMessage( "Reading Manufacturers..." ); QString filename( "/etc/manufacturers" ); odebug << "OManufacturerDB: trying to read " << filename << oendl; if ( !QFile::exists( filename ) ) @@ -92,9 +88,8 @@ OManufacturerDB::OManufacturerDB() QString addr; QString manu; QString extManu; - #ifdef OPIE_IMPROVE_GUI_LATENCY int counter = 0; - #endif + while (!s.atEnd()) { s >> addr; @@ -104,19 +99,15 @@ OManufacturerDB::OManufacturerDB() manufacturers.insert( addr, manu ); manufacturersExt.insert( addr, extManu ); // odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; - #ifdef OPIE_IMPROVE_GUI_LATENCY counter++; if ( counter == 50 ) { - qApp->processEvents(); + if ( qApp ) qApp->processEvents(); counter = 0; } - #endif } odebug << "OManufacturerDB: manufacturer list completed." << oendl; - #ifdef OPIE_IMPROVE_GUI_LATENCY - Global::statusMessage( "Manufacturers Complete..." ); - #endif + if ( qApp ) Global::statusMessage( "Manufacturers Complete..." ); } } -- cgit v0.9.0.2