Commit 1f443bde authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Replace QFileInfo(fileName.toString()) with fileName.toFileInfo()

Change-Id: Iac7f866b4846939af4dcee086ab07797cc6b8ff1
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent ddd9e96a
......@@ -236,7 +236,7 @@ FileName FileUtils::resolveSymlinks(const FileName &path)
*/
FileName FileUtils::canonicalPath(const FileName &path)
{
const QString result = QFileInfo(path.toString()).canonicalFilePath();
const QString result = path.toFileInfo().canonicalFilePath();
if (result.isEmpty())
return path;
return FileName::fromString(result);
......
......@@ -855,7 +855,7 @@ bool SessionManager::cloneSession(const QString &original, const QString &clone)
// If the file does not exist, we can still clone
if (!fi.exists() || fi.copy(sessionNameToFileName(clone).toString())) {
d->m_sessions.insert(1, clone);
d->m_sessionDateTimes.insert(clone, QFileInfo(sessionNameToFileName(clone).toString()).lastModified());
d->m_sessionDateTimes.insert(clone, sessionNameToFileName(clone).toFileInfo().lastModified());
return true;
}
return false;
......
......@@ -116,7 +116,7 @@ static QStringList candidatesForDirectory(const QString &dir)
QStringList QbsProjectImporter::importCandidates()
{
const QString projectDir = QFileInfo(projectFilePath().toString()).absolutePath();
const QString projectDir = projectFilePath().toFileInfo().absolutePath();
QStringList candidates = candidatesForDirectory(projectDir);
QSet<QString> seenCandidates;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment