FileName FileName::tempName(string const & mask)
{
- QFileInfo tmp_fi(toqstr(mask));
- if (!tmp_fi.isAbsolute())
- tmp_fi.setFile(package().temp_dir().d->fi.absoluteDir(), toqstr(mask));
- return FileName(createTempFile(tmp_fi.absoluteFilePath()));
+ return tempName(package().temp_dir(), mask);
}
// This is supposed to be fixed for Qt5.
if (lhs.empty())
+ // QFileInfo::operator==() returns false if the two QFileInfo are empty.
return rhs.empty();
if (rhs.empty())
- // Avoid unnecessary checks.
+ // Avoid unnecessary checks below.
return false;
lhs.d->refresh();
if (!lhs.d->fi.isSymLink() && !rhs.d->fi.isSymLink())
return lhs.d->fi == rhs.d->fi;
+ // FIXME: When/if QFileInfo support symlink comparison, remove this code.
QFileInfo fi1(lhs.d->fi);
if (fi1.isSymLink())
fi1 = QFileInfo(fi1.symLinkTarget());