Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.4.3
-
None
-
ef3a544436beaecb4d26349ce115be39b680ef6a
Description
As per the documentation QTemporaryFile::createLocalFile should copy the file on network path and put it in the local file and return a pointer to QTemporaryFile. But when the file is not on a local disk the function return NULL.
Example code:
#include <QApplication>
#include <QTemporaryFile>
int main( int argc, char** argv )
{
int ret = 0;
QApplication app( argc, argv );
QFile file1("\\\\Server1\\attri
at_02.txt"); // change to point to a file that do exist, not local
file1.open(QIODevice::ReadOnly);
QTemporaryFile* file = QTemporaryFile::createLocalFile(file1);
qDebug() << file->fileName();
return app.exec();
}