Main Page
Modules
Namespaces
Classes
Files
File List
File Members
sm
apps
qtv
qfilereader.cpp
Go to the documentation of this file.
1
#include "
qfilereader.h
"
2
#include "qfilereader.moc"
3
4
QFileReader::QFileReader
(QIODevice * source) :
5
source(source) {
6
7
}
8
9
void
QFileReader::run
() {
10
printf(
"Running\n"
);
11
12
while
(1) {
13
char
buf
[10024];
14
qint64 lineLength =
source
->readLine(buf,
sizeof
(buf));
15
if
(lineLength == -1)
break
;
16
emit
new_line
(QString(buf));
17
18
/* source->waitForBytesWritten(-1);
19
if(source->canReadLine()) {
20
printf("can\n");
21
QByteArray data = source->readLine();
22
emit new_line(QString(data));
23
} else {
24
printf(".");
25
}*/
26
}
27
28
emit
eof
();
29
}
30
QFileReader::QFileReader
QFileReader(QIODevice *source)
Definition:
qfilereader.cpp:4
qfilereader.h
QFileReader::new_line
void new_line(QString)
QFileReader::source
QIODevice * source
Definition:
qfilereader.h:11
QFileReader::run
void run()
Definition:
qfilereader.cpp:9
QFileReader::eof
void eof()
buf
char buf[100]
Definition:
ld_recover.c:87
csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23