File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
#include " FileBuffer.h"
2
2
3
+
3
4
FileView::FileView (QString &path, bufsize_t maxSize)
4
5
: AbstractFileBuffer(path), fIn (path)
5
6
{
6
- if (fIn .open (QFileDevice ::ReadOnly) == false ) {
7
+ if (fIn .open (QIODevice ::ReadOnly) == false ) {
7
8
throw FileBufferException (" Cannot open the file: " + path);
8
9
}
9
10
this ->fileSize = fIn .size ();
@@ -39,9 +40,8 @@ bufsize_t FileView::getMappableSize(QFile &fIn)
39
40
40
41
ByteBuffer* AbstractFileBuffer::read (QString &path, bufsize_t minBufSize)
41
42
{
42
- // printf("reading file...");
43
43
QFile fIn (path);
44
- if (fIn .open (QFileDevice ::ReadOnly) == false ) {
44
+ if (fIn .open (QIODevice ::ReadOnly) == false ) {
45
45
throw FileBufferException (" Cannot open the file: " + path);
46
46
}
47
47
ByteBuffer *bufferedFile = read (fIn , minBufSize);
@@ -96,9 +96,8 @@ bufsize_t AbstractFileBuffer::getReadableSize(QFile &fIn)
96
96
bufsize_t AbstractFileBuffer::getReadableSize (QString &path)
97
97
{
98
98
if (path.length () == 0 ) return 0 ;
99
-
100
99
QFile fIn (path);
101
- if (fIn .open (QFileDevice ::ReadOnly) == false ) return 0 ;
100
+ if (fIn .open (QIODevice ::ReadOnly) == false ) return 0 ;
102
101
bufsize_t size = getReadableSize (fIn );
103
102
fIn .close ();
104
103
return size;
You can’t perform that action at this time.
0 commit comments