mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T730, style
* set object name * use m_XYZ member name
This commit is contained in:
committed by
Mat Sutcliffe
parent
c604ced11c
commit
857e3581b0
@@ -18,13 +18,13 @@ namespace BlackMisc
|
||||
void CFileDeleter::addFileForDeletion(const QString &file)
|
||||
{
|
||||
if (file.isEmpty()) { return; }
|
||||
if (!this->m_fileNames.contains(file)) this->m_fileNames.append(file);
|
||||
if (!m_fileNames.contains(file)) m_fileNames.append(file);
|
||||
}
|
||||
|
||||
void CFileDeleter::addFilesForDeletion(const QStringList &files)
|
||||
{
|
||||
if (files.isEmpty()) { return; }
|
||||
this->m_fileNames.append(files);
|
||||
m_fileNames.append(files);
|
||||
}
|
||||
|
||||
CFileDeleter::~CFileDeleter()
|
||||
@@ -49,14 +49,15 @@ namespace BlackMisc
|
||||
QObject(parent)
|
||||
{
|
||||
Q_ASSERT_X(!file.isEmpty(), Q_FUNC_INFO, "No file name");
|
||||
this->setObjectName("CTimedFileDeleter");
|
||||
if (deleteAfterMs < 100) { deleteAfterMs = 100; } // makes sure timer is started properly
|
||||
this->m_fileDeleter.addFileForDeletion(file);
|
||||
m_fileDeleter.addFileForDeletion(file);
|
||||
m_timerId = startTimer(deleteAfterMs);
|
||||
}
|
||||
|
||||
void CTimedFileDeleter::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
Q_UNUSED(event)
|
||||
if (m_timerId > 0) { this->killTimer(m_timerId); }
|
||||
m_timerId = -1;
|
||||
m_fileDeleter.deleteFiles();
|
||||
|
||||
Reference in New Issue
Block a user