Changeset View
Changeset View
Standalone View
Standalone View
iso/qfilehack.cpp
Show All 15 Lines | |||||
16 | * * | 16 | * * | ||
17 | * You should have received a copy of the GNU General Public License * | 17 | * You should have received a copy of the GNU General Public License * | ||
18 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | 18 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | ||
19 | *****************************************************************************/ | 19 | *****************************************************************************/ | ||
20 | 20 | | |||
21 | #include "qfilehack.h" | 21 | #include "qfilehack.h" | ||
22 | 22 | | |||
23 | QFileHack::QFileHack() | 23 | QFileHack::QFileHack() | ||
24 | { | 24 | = default; | ||
25 | } | | |||
26 | 25 | | |||
27 | QFileHack::QFileHack(const QString & name) : QFile(name) | 26 | QFileHack::QFileHack(const QString & name) : QFile(name) | ||
28 | { | 27 | { | ||
29 | } | 28 | } | ||
30 | 29 | | |||
31 | QFileHack::~QFileHack() | 30 | QFileHack::~QFileHack() | ||
32 | { | 31 | = default; | ||
33 | } | | |||
34 | 32 | | |||
35 | bool QFileHack::open(QFile::OpenMode m) | 33 | bool QFileHack::open(QFile::OpenMode m) | ||
36 | { | 34 | { | ||
37 | bool ret; | 35 | bool ret; | ||
38 | 36 | | |||
39 | #ifdef Q_OS_UNIX | 37 | #ifdef Q_OS_UNIX | ||
40 | // m |= IO_Async; // On linux, set O_NONBLOCK, opens CD-ROMs faster | 38 | // m |= IO_Async; // On linux, set O_NONBLOCK, opens CD-ROMs faster | ||
41 | #endif | 39 | #endif | ||
42 | ret = QFile::open(m); | 40 | ret = QFile::open(m); | ||
43 | // if (ret && isSequential() ) { | 41 | // if (ret && isSequential() ) { | ||
44 | // setOpenMode(m | (QFile::OpenMode)IO_Direct); | 42 | // setOpenMode(m | (QFile::OpenMode)IO_Direct); | ||
45 | // } | 43 | // } | ||
46 | return ret; | 44 | return ret; | ||
47 | } | 45 | } |