summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-12-09 19:24:10 (UTC)
committer mickeyl <mickeyl>2003-12-09 19:24:10 (UTC)
commit1642df2b072858b5eec9ad007a23475cc5270bfe (patch) (side-by-side diff)
tree91980bac6b047aeedb82b6d0b4c9772f5fc5c8b2
parent26fde0e3b94659ea9c296afc80c7f873467267e8 (diff)
downloadopie-1642df2b072858b5eec9ad007a23475cc5270bfe.zip
opie-1642df2b072858b5eec9ad007a23475cc5270bfe.tar.gz
opie-1642df2b072858b5eec9ad007a23475cc5270bfe.tar.bz2
allow processing of events during the loading of the db
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/omanufacturerdb.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp
index 006ae72..595633d 100644
--- a/libopie2/opienet/omanufacturerdb.cpp
+++ b/libopie2/opienet/omanufacturerdb.cpp
@@ -25,28 +25,31 @@
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "omanufacturerdb.h"
/* OPIE CORE */
#include <opie2/odebug.h>
/* QT */
+#include <qapplication.h>
#include <qstring.h>
#include <qfile.h>
#include <qtextstream.h>
+#define OPIE_IMPROVE_GUI_LATENCY 1
+
OManufacturerDB* OManufacturerDB::_instance = 0;
OManufacturerDB* OManufacturerDB::instance()
{
if ( !OManufacturerDB::_instance )
{
odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl;
_instance = new OManufacturerDB();
}
return _instance;
}
@@ -79,24 +82,27 @@ OManufacturerDB::OManufacturerDB()
QString addr;
QString manu;
QString extManu;
while (!s.atEnd())
{
s >> addr;
s >> manu;
s >> extManu;
manufacturers.insert( addr, manu );
manufacturersExt.insert( addr, extManu );
odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl;
+ #ifdef OPIE_IMPROVE_GUI_LATENCY
+ if ( qApp ) qApp->processEvents();
+ #endif
}
}
}
OManufacturerDB::~OManufacturerDB()
{
}
const QString& OManufacturerDB::lookup( const QString& macaddr ) const
{