I have a problem migrating my code from Qt 4.7.4 to Qt 5.8:
In my old code I use
void GuiUtil::setLastPath(QString path)
{
QFileInfo finfo(path);
if (finfo.isDir())
GuiUtil::get()->lastPath = finfo.absoluteFilePath();
else
GuiUtil::get()->lastPath = finfo.absolutePath();
}
When I migrate this to Qt 5.8 my code compiles but finfo is not accessible.
Does anybody know why?
The problem is in the first line
QFileInfo finfo(path);
where from the beginning path is my directory path = "C:/Users/s" type QString
After completing this line fifo is set to
fifo = "C:/Users/s" type QFileInfo ( in Qt 4.7.4)
fifo = "" type QFileInfo ( in Qt 5.8)