summaryrefslogtreecommitdiff
path: root/libopie2/opienet/omanufacturerdb.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opienet/omanufacturerdb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/omanufacturerdb.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp
index 595633d..f61270b 100644
--- a/libopie2/opienet/omanufacturerdb.cpp
+++ b/libopie2/opienet/omanufacturerdb.cpp
@@ -73,37 +73,46 @@ OManufacturerDB::OManufacturerDB()
bool hasFile = file.open( IO_ReadOnly );
if (!hasFile)
{
owarn << "OManufacturerDB: no valid manufacturer list found." << oendl;
}
else
{
odebug << "OManufacturerDB: found manufacturer list in " << filename << oendl;
QTextStream s( &file );
QString addr;
QString manu;
QString extManu;
+ #ifdef OPIE_IMPROVE_GUI_LATENCY
+ int counter = 0;
+ #endif
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;
+ // odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl;
#ifdef OPIE_IMPROVE_GUI_LATENCY
- if ( qApp ) qApp->processEvents();
+ counter++;
+ if ( counter == 50 )
+ {
+ qApp->processEvents();
+ counter = 0;
+ }
#endif
}
+ odebug << "OManufacturerDB: manufacturer list completed." << oendl;
}
}
OManufacturerDB::~OManufacturerDB()
{
}
const QString& OManufacturerDB::lookup( const QString& macaddr ) const
{
return manufacturers[macaddr.upper().left(8)];