Introduce and use FileName::exists()

This can use the faster route through QFileInfo::exist now.

Change-Id: Idb41b5d5185d7f02eacba498fb01f483d95e8d57
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
hjk
2014-10-24 13:15:54 +02:00
parent 36f94d3661
commit 9477ed0a3f
25 changed files with 58 additions and 51 deletions

View File

@@ -883,7 +883,7 @@ bool SessionManager::loadSession(const QString &session)
// Try loading the file
FileName fileName = sessionNameToFileName(session);
PersistentSettingsReader reader;
if (fileName.toFileInfo().exists()) {
if (fileName.exists()) {
if (!reader.load(fileName)) {
QMessageBox::warning(ICore::dialogParent(), tr("Error while restoring session"),
tr("Could not restore session %1").arg(fileName.toUserOutput()));
@@ -919,7 +919,7 @@ bool SessionManager::loadSession(const QString &session)
d->m_sessionName = session;
EditorManager::updateWindowTitles();
if (fileName.toFileInfo().exists()) {
if (fileName.exists()) {
d->m_virginSession = false;
ProgressManager::addTask(d->m_future.future(), tr("Loading Session"),
@@ -1021,7 +1021,7 @@ QStringList SessionManager::projectsForSessionName(const QString &session)
{
const FileName fileName = sessionNameToFileName(session);
PersistentSettingsReader reader;
if (fileName.toFileInfo().exists()) {
if (fileName.exists()) {
if (!reader.load(fileName)) {
qWarning() << "Could not restore session" << fileName.toUserOutput();
return QStringList();