minor code cleanup

This commit is contained in:
itsmattkc
2019-07-06 21:17:19 -05:00
parent f32d1d2c85
commit a9ff2389e6
4 changed files with 14 additions and 19 deletions
+1 -1
View File
@@ -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
+5
View File
@@ -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:
+5 -18
View File
@@ -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()));
}
}
}
+3
View File
@@ -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);