[SOLVED] QDir "File access error" (Qt 5.2.0)
-
wrote on 5 May 2014, 21:43 last edited by
I used to compile and run this code using Qt 4.8.x in a pretty clean way:
@
QDir projectDir("/tmp/test");
if (!projectDir.exists()) {
// Do something here
}
@Now, when I try to run the same code using Qt 5.2.0 I get this error message just before the crash:
QIODevice::open: File access not specifiedNote: Line 2 is where the program crashes
I tried to use the QFile.open() method to deal with this situation, but then I get the same error when I create an instance of QFile with the directory path.
Is this a possible bug? how do I deal with this issue?
Thanks!
-
wrote on 6 May 2014, 03:37 last edited by
If by "crash" you mean terminates abnormally then you need to run it in your debugger, inspect the backtrace when it crashes, and address the code that is actually triggering the crash.
-
wrote on 6 May 2014, 13:20 last edited by
Thank you! In my case, the issue is related to the Quazip wrapper :)
@
10 0x00007ffff3e6fdd5 in QObject::~QObject() () from /home/xtingray/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Core.so.5
11 0x00007ffff3d7fe82 in QFile::remove(QString const&) () from /home/xtingray/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Core.so.5
12 0x00007ffff014fc98 in JlCompress::compressDir(QString, QString, bool) () from /usr/lib/x86_64-linux-gnu/libquazip.so.0
13 0x00007ffff2ea1034 in TupPackageHandler::makePackage(QString const&, QString const&) () from /usr/local/tupi/lib64/tupi/libtupi.so.1
@
3/3