mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: effectively revert 6ae96c3c1d
due to Katie changes (see 7c840afcb12096778ecb1539f7baba3e02ba6f85 in the Katie repo) reading lines is much faster Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b591e29541
commit
33138d4a49
1 changed files with 0 additions and 10 deletions
|
@ -21,9 +21,6 @@
|
|||
#include "kdebug.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#define KDEVICEDATABASE_TIMEOUT 100
|
||||
|
||||
struct KDeviceEntry
|
||||
{
|
||||
|
@ -78,19 +75,12 @@ static void extractIDs(QFile *idsfile,
|
|||
{
|
||||
// qDebug() << Q_FUNC_INFO << idsfile->fileName();
|
||||
|
||||
int counter = 0;
|
||||
char idbuffer[5];
|
||||
char strbuffer[1024];
|
||||
bool classessection = false;
|
||||
QByteArray lastvendorid;
|
||||
QByteArray lastdeviceid;
|
||||
while (!idsfile->atEnd()) {
|
||||
counter++;
|
||||
if (counter >= KDEVICEDATABASE_TIMEOUT) {
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, KDEVICEDATABASE_TIMEOUT);
|
||||
counter = 0;
|
||||
}
|
||||
|
||||
const QByteArray dbline = idsfile->readLine();
|
||||
const QByteArray trimmeddbline = dbline.trimmed();
|
||||
// qDebug() << Q_FUNC_INFO << dbline;
|
||||
|
|
Loading…
Add table
Reference in a new issue