Reimplement QAbstractFileEngine::open() properly
The virtual function takes a QIODevice::OpenMode argument, not an int. tests/auto/corelib/io/qfile/test/../tst_qfile.cpp:1942: warning: 'MyEngine::open' hides overloaded virtual function [-Woverloaded- virtual] bool open(int ) { return false; } ^ src/corelib/io/qabstractfileengine.h:118: hidden overloaded virtual function 'QAbstractFileEngine::open' declared here virtual bool open(QIODevice::OpenMode openMode); ^ Change-Id: I92338dacb89c05d8c5cfbf8ce094dc519b84d3ba Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
parent
9c67364708
commit
58170cea15
@ -1939,7 +1939,7 @@ public:
|
||||
virtual ~MyEngine() {}
|
||||
|
||||
void setFileName(const QString &) {}
|
||||
bool open(int ) { return false; }
|
||||
bool open(QIODevice::OpenMode) { return false; }
|
||||
bool close() { return false; }
|
||||
bool flush() { return false; }
|
||||
qint64 size() const { return 123 + number; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user