forked from qt-creator/qt-creator
Utils: remove unused variable in SaveFile class
Backup member was never set to true. Change-Id: I21dc889813820e2a463c5ba812b18b57766e03c4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Utils {
|
|||||||
QFile::Permissions SaveFile::m_umask = 0;
|
QFile::Permissions SaveFile::m_umask = 0;
|
||||||
|
|
||||||
SaveFile::SaveFile(const QString &filename) :
|
SaveFile::SaveFile(const QString &filename) :
|
||||||
m_finalFileName(filename), m_finalized(true), m_backup(false)
|
m_finalFileName(filename), m_finalized(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,8 +128,7 @@ bool SaveFile::commit()
|
|||||||
remove();
|
remove();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!m_backup)
|
QFile::remove(bakname);
|
||||||
QFile::remove(bakname);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -44,14 +44,11 @@ public:
|
|||||||
void rollback();
|
void rollback();
|
||||||
bool commit();
|
bool commit();
|
||||||
|
|
||||||
void setBackup(bool backup) { m_backup = backup; }
|
|
||||||
|
|
||||||
static void initializeUmask();
|
static void initializeUmask();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QString m_finalFileName;
|
const QString m_finalFileName;
|
||||||
bool m_finalized;
|
bool m_finalized;
|
||||||
bool m_backup;
|
|
||||||
static QFile::Permissions m_umask;
|
static QFile::Permissions m_umask;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user