File indexing completed on 2024-12-01 05:20:02
0001 /* 0002 SPDX-FileCopyrightText: 2002 Szombathelyi György <gyurco@users.sourceforge.net> 0003 SPDX-FileCopyrightText: 2004-2022 Krusader Krew <https://krusader.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #include "qfilehack.h" 0009 0010 QFileHack::QFileHack() = default; 0011 0012 QFileHack::QFileHack(const QString &name) 0013 : QFile(name) 0014 { 0015 } 0016 0017 QFileHack::~QFileHack() = default; 0018 0019 bool QFileHack::open(QFile::OpenMode m) 0020 { 0021 bool ret; 0022 0023 #ifdef Q_OS_UNIX 0024 // m |= IO_Async; // On linux, set O_NONBLOCK, opens CD-ROMs faster 0025 #endif 0026 ret = QFile::open(m); 0027 // if (ret && isSequential() ) { 0028 // setOpenMode(m | (QFile::OpenMode)IO_Direct); 0029 // } 0030 return ret; 0031 }