author | mickeyl <mickeyl> | 2003-12-09 19:24:10 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-12-09 19:24:10 (UTC) |
commit | 1642df2b072858b5eec9ad007a23475cc5270bfe (patch) (unidiff) | |
tree | 91980bac6b047aeedb82b6d0b4c9772f5fc5c8b2 | |
parent | 26fde0e3b94659ea9c296afc80c7f873467267e8 (diff) | |
download | opie-1642df2b072858b5eec9ad007a23475cc5270bfe.zip opie-1642df2b072858b5eec9ad007a23475cc5270bfe.tar.gz opie-1642df2b072858b5eec9ad007a23475cc5270bfe.tar.bz2 |
allow processing of events during the loading of the db
-rw-r--r-- | libopie2/opienet/omanufacturerdb.cpp | 6 |
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 @@ | |||
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "omanufacturerdb.h" | 31 | #include "omanufacturerdb.h" |
32 | 32 | ||
33 | /* OPIE CORE */ | 33 | /* OPIE CORE */ |
34 | #include <opie2/odebug.h> | 34 | #include <opie2/odebug.h> |
35 | 35 | ||
36 | /* QT */ | 36 | /* QT */ |
37 | #include <qapplication.h> | ||
37 | #include <qstring.h> | 38 | #include <qstring.h> |
38 | #include <qfile.h> | 39 | #include <qfile.h> |
39 | #include <qtextstream.h> | 40 | #include <qtextstream.h> |
40 | 41 | ||
42 | #define OPIE_IMPROVE_GUI_LATENCY 1 | ||
43 | |||
41 | OManufacturerDB* OManufacturerDB::_instance = 0; | 44 | OManufacturerDB* OManufacturerDB::_instance = 0; |
42 | 45 | ||
43 | OManufacturerDB* OManufacturerDB::instance() | 46 | OManufacturerDB* OManufacturerDB::instance() |
44 | { | 47 | { |
45 | if ( !OManufacturerDB::_instance ) | 48 | if ( !OManufacturerDB::_instance ) |
46 | { | 49 | { |
47 | odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; | 50 | odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; |
48 | _instance = new OManufacturerDB(); | 51 | _instance = new OManufacturerDB(); |
49 | } | 52 | } |
50 | return _instance; | 53 | return _instance; |
51 | } | 54 | } |
52 | 55 | ||
@@ -79,24 +82,27 @@ OManufacturerDB::OManufacturerDB() | |||
79 | QString addr; | 82 | QString addr; |
80 | QString manu; | 83 | QString manu; |
81 | QString extManu; | 84 | QString extManu; |
82 | while (!s.atEnd()) | 85 | while (!s.atEnd()) |
83 | { | 86 | { |
84 | s >> addr; | 87 | s >> addr; |
85 | s >> manu; | 88 | s >> manu; |
86 | s >> extManu; | 89 | s >> extManu; |
87 | 90 | ||
88 | manufacturers.insert( addr, manu ); | 91 | manufacturers.insert( addr, manu ); |
89 | manufacturersExt.insert( addr, extManu ); | 92 | manufacturersExt.insert( addr, extManu ); |
90 | odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; | 93 | odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; |
94 | #ifdef OPIE_IMPROVE_GUI_LATENCY | ||
95 | if ( qApp ) qApp->processEvents(); | ||
96 | #endif | ||
91 | } | 97 | } |
92 | } | 98 | } |
93 | } | 99 | } |
94 | 100 | ||
95 | 101 | ||
96 | OManufacturerDB::~OManufacturerDB() | 102 | OManufacturerDB::~OManufacturerDB() |
97 | { | 103 | { |
98 | } | 104 | } |
99 | 105 | ||
100 | 106 | ||
101 | const QString& OManufacturerDB::lookup( const QString& macaddr ) const | 107 | const QString& OManufacturerDB::lookup( const QString& macaddr ) const |
102 | { | 108 | { |