[DEBUG #2 #7] close file and save it whan needed

This commit is contained in:
2014-09-15 07:21:22 +02:00
parent 0a054c209f
commit 05ac6a9210
13 changed files with 144 additions and 80 deletions

View File

@@ -45,14 +45,15 @@ void appl::WorkerCloseAllFile::init() {
return;
}
// create the worker :
m_worker = appl::WorkerCloseFile::create(m_bufferNameList.front());
m_worker = appl::WorkerCloseFile::create();
m_worker->signalCloseDone.bind(shared_from_this(), &appl::WorkerCloseAllFile::onCallbackCloseDone);
m_worker->startAction(m_bufferNameList.front());
// remove first element :
m_bufferNameList.erase(m_bufferNameList.begin());
if (m_bufferNameList.size() == 0) {
destroy();
return;
}
m_worker->signalCloseDone.bind(shared_from_this(), &appl::WorkerCloseAllFile::onCallbackCloseDone);
}
appl::WorkerCloseAllFile::~WorkerCloseAllFile() {
@@ -69,13 +70,14 @@ void appl::WorkerCloseAllFile::onCallbackCloseDone() {
return;
}
// create the worker :
m_worker = appl::WorkerCloseFile::create(m_bufferNameList.front());
m_worker = appl::WorkerCloseFile::create();
m_worker->signalCloseDone.bind(shared_from_this(), &appl::WorkerCloseAllFile::onCallbackCloseDone);
m_worker->startAction(m_bufferNameList.front());
// remove first element :
m_bufferNameList.erase(m_bufferNameList.begin());
if (m_bufferNameList.size() == 0) {
destroy();
return;
}
m_worker->signalCloseDone.bind(shared_from_this(), &appl::WorkerCloseAllFile::onCallbackCloseDone);
}