I'm taking a look in a Qt project codebase, it's big enought I can't find from where the following is comming from.
QFSFileEngine::open: No file name specified
So far I tried two approaches:
- I tried to put a breakpoint near every
QFile::open()but that didn't led me any closer do find the issue. I step over all breakpoints with a clean output and then somewhere after I get a couple of:
QFSFileEngine::open: No file name specified
QFSFileEngine::open: No file name specified
QFSFileEngine::open: No file name specified
QFSFileEngine::open: No file name specified
- Used a macro to replace an instance of
QFilebyMyFile(did it before anything else inmain.cpp):
class MyFile : public QFile
{
int i = 0;
public:
MyFile(const QString &name, QObject *parent)
{
qDebug() << "a";
}
MyFile(QObject *parent)
{
qDebug() << "b";
}
MyFile()
{
qDebug() << "b";
}
MyFile(const QString& filename)
{
qDebug() << "d" << filename.size() << filename;
}
bool open(QIODevice::OpenMode flags)
{
qDebug() << i++ << flags;
return true;
}
};
#define QFile MyFile
With this I was expecting to break code logic as a side effect, but a least stop the:
QFSFileEngine::open: No file name specified
However I still get them.
Can I conclude the QFSFileEngine::open: No file name specified are not comming from my project but
from a 3rd party library loaded by my project?
Any suggestiongs on another approches I should try?