minor code cleanup
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS})
|
||||
target_compile_options(
|
||||
${OLIVE_TARGET}
|
||||
PRIVATE
|
||||
$<$<CXX_COMPILER_ID:GNU>:-Werror -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion>)
|
||||
$<$<CXX_COMPILER_ID:GNU>:-Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion>)
|
||||
|
||||
target_link_libraries(${OLIVE_TARGET}
|
||||
PRIVATE
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
|
||||
#include "project/item/item.h"
|
||||
|
||||
/**
|
||||
* @brief The Folder class representing a directory in a project structure
|
||||
*
|
||||
*
|
||||
*/
|
||||
class Folder : public Item
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -106,27 +106,14 @@ void TaskManager::DeleteTask(Task *t)
|
||||
|
||||
void TaskManager::TaskCallback(Task::Status status)
|
||||
{
|
||||
switch (status) {
|
||||
case Task::kWaiting:
|
||||
//qDebug() << sender() << "is waiting...";
|
||||
break;
|
||||
case Task::kWorking:
|
||||
//qDebug() << sender() << "is working...";
|
||||
break;
|
||||
case Task::kFinished:
|
||||
//qDebug() << sender() << "finished successfully.";
|
||||
|
||||
if (status == Task::kFinished || status == Task::kError) {
|
||||
// The Task has finished, we can start a new one
|
||||
StartNextWaiting();
|
||||
|
||||
DeleteTask(static_cast<Task*>(sender()));
|
||||
break;
|
||||
case Task::kError:
|
||||
//qDebug() << sender() << "failed:" << static_cast<Task*>(sender())->error();
|
||||
|
||||
// The Task has finished, we can start a new one
|
||||
StartNextWaiting();
|
||||
break;
|
||||
if (status == Task::kFinished) {
|
||||
// The Task was successful, remove this Task from the queue
|
||||
DeleteTask(static_cast<Task*>(sender()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,9 @@ public:
|
||||
*/
|
||||
void Clear();
|
||||
|
||||
/**
|
||||
* @brief Undoable command for adding a Task to the TaskManager
|
||||
*/
|
||||
class AddTaskCommand : public QUndoCommand {
|
||||
public:
|
||||
AddTaskCommand(TaskPtr t, QUndoCommand* parent = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user