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 #ifndef QFILEHACK_H 0009 #define QFILEHACK_H 0010 0011 // QtCore 0012 #include <QFile> 0013 #include <QString> 0014 0015 /** 0016 * Qt thinks if a file is not S_IFREG, you cannot seek in it. 0017 * It's false (what about block devices for example ?) 0018 */ 0019 class QFileHack : public QFile 0020 { 0021 public: 0022 QFileHack(); 0023 explicit QFileHack(const QString &name); 0024 ~QFileHack(); 0025 virtual bool open(QFile::OpenMode m) override; 0026 }; 0027 0028 #endif