doxygen fixes

This commit is contained in:
Evgenii Alekseev 2017-03-11 06:30:09 +03:00
parent 57281bbb88
commit b1821507dc
17 changed files with 101 additions and 151 deletions

View File

@ -2,7 +2,7 @@
find_package (Doxygen) find_package (Doxygen)
configure_file ("doxygen.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf") configure_file ("doxygen.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf")
add_custom_target ("oxygen-docs" ALL COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf") add_custom_target ("docs" ALL COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf")
# html docs # html docs
install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/html" DESTINATION "${DATA_INSTALL_DIR}/doc/${SUBPROJECT}") install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/docs/html" DESTINATION "${DATA_INSTALL_DIR}/doc/${SUBPROJECT}")

View File

@ -98,7 +98,7 @@ public:
void set(const QString &_key, const QVariant &_value); void set(const QString &_key, const QVariant &_value);
/** /**
* @brief upload configuration from database in to internal format * @brief upload configuration from database in to internal format
* @param _value * @param _values
* configuration values from database * configuration values from database
*/ */
void set(const QList<QVariantHash> &_values); void set(const QList<QVariantHash> &_values);

View File

@ -32,18 +32,17 @@
/** /**
* @defgroup QueuedCfg * @addtogroup QueuedCfg
* @brief Queued configuration related types * @brief Queued configuration related types
*/ */
namespace QueuedCfg namespace QueuedCfg
{ {
/** /**
* @ingroup QueuedCfg
* @struct QueuedAdminSetup * @struct QueuedAdminSetup
* @brief structure to define administrator user * @brief structure to define administrator user
* @var name * @var QueuedAdminSetup::name
* administrator user name * administrator user name
* @var password * @var QueuedAdminSetup::password
* administrator user password * administrator user password
*/ */
typedef struct { typedef struct {
@ -51,20 +50,19 @@ typedef struct {
QString password; QString password;
} QueuedAdminSetup; } QueuedAdminSetup;
/** /**
* @ingroup QueuedCfg
* @struct QueuedDBSetup * @struct QueuedDBSetup
* @brief structure to define database setup * @brief structure to define database setup
* @var driver * @var QueuedDBSetup::driver
* driver name * driver name
* @var hostname * @var QueuedDBSetup::hostname
* hostname to connect * hostname to connect
* @var password * @var QueuedDBSetup::password
* password to connect if any * password to connect if any
* @var path * @var QueuedDBSetup::path
* path to database * path to database
* @var port * @var QueuedDBSetup::port
* port to connect * port to connect
* @var username * @var QueuedDBSetup::username
* username to connect if any * username to connect if any
*/ */
typedef struct { typedef struct {
@ -76,7 +74,6 @@ typedef struct {
QString username; QString username;
} QueuedDBSetup; } QueuedDBSetup;
/** /**
* @ingroup QueuedCfg
* @enum QueuedSettings * @enum QueuedSettings
* @brief settings keys enum * @brief settings keys enum
* @var QueuedSettings::Invalid * @var QueuedSettings::Invalid
@ -113,14 +110,11 @@ enum class QueuedSettings {
Plugins = 1 << 9, Plugins = 1 << 9,
}; };
/** /**
* @ingroup QueuedCfg
* @struct QueuedSettingsField * @struct QueuedSettingsField
* @brief structure to define advanced settings field * @brief structure to define advanced settings field
* @var id * @var QueuedSettingsField::id
* interval field ID * interval field ID
* @var key * @var QueuedSettingsField::defaultValue
* settings key
* @var defaultValue
* settings default value * settings default value
*/ */
typedef struct { typedef struct {
@ -128,13 +122,11 @@ typedef struct {
QVariant defaultValue; QVariant defaultValue;
} QueuedSettingsField; } QueuedSettingsField;
/** /**
* @ingroup QueuedCfg * @typedef QueuedSettingsDefaultMap
* @typedef QueuedProcessConnectionMap
* map of settings indices to related values * map of settings indices to related values
*/ */
typedef QHash<QString, QueuedSettingsField> QueuedSettingsDefaultMap; typedef QHash<QString, QueuedSettingsField> QueuedSettingsDefaultMap;
/** /**
* @ingroup QueuedCfg
* @brief default settings map * @brief default settings map
*/ */
const QueuedSettingsDefaultMap QueuedSettingsDefaults const QueuedSettingsDefaultMap QueuedSettingsDefaults

View File

@ -29,13 +29,12 @@
/** /**
* @defgroup QueuedCoreAdaptor * @addtogroup QueuedCoreAdaptor
* @brief adaptor to DBus methods * @brief adaptor to DBus methods
*/ */
namespace QueuedCoreAdaptor namespace QueuedCoreAdaptor
{ {
/** /**
* @ingroup QueuedCoreAdaptor
* @brief common DBus request * @brief common DBus request
* @param _service * @param _service
* DBus service name * DBus service name
@ -53,7 +52,6 @@ QVariantList sendRequest(const QString &_service, const QString &_path,
const QString &_interface, const QString &_cmd, const QString &_interface, const QString &_cmd,
const QVariantList &_args); const QVariantList &_args);
/** /**
* @ingroup QueuedCoreAdaptor
* @brief additional method to avoid conversion from DBus type to native ones * @brief additional method to avoid conversion from DBus type to native ones
* @param _data * @param _data
* source data * source data

View File

@ -87,8 +87,6 @@ public slots:
* @brief remove plugin * @brief remove plugin
* @param plugin * @param plugin
* plugin name * plugin name
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful plugin removal * @return true on successful plugin removal
@ -116,8 +114,6 @@ public slots:
* limit by GPU memory * limit by GPU memory
* @param storage * @param storage
* limit by storage * limit by storage
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful task addition * @return true on successful task addition
@ -141,6 +137,8 @@ public slots:
* nice level or 0 * nice level or 0
* @param uid * @param uid
* new uid or 0 * new uid or 0
* @param gid
* new gid or 0
* @param state * @param state
* new state or 0 * new state or 0
* @param cpu * @param cpu
@ -153,12 +151,6 @@ public slots:
* new limit by GPU memory or -1 * new limit by GPU memory or -1
* @param storage * @param storage
* new limit by storage or -1 * new limit by storage or -1
* @param start
* new start time in ISO format or empty
* @param end
* new end time in ISO format or empty
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful task edition * @return true on successful task edition
@ -173,8 +165,6 @@ public slots:
* @brief force start task * @brief force start task
* @param id * @param id
* task ID * task ID
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful task start * @return true on successful task start
@ -184,8 +174,6 @@ public slots:
* @brief force stop task * @brief force stop task
* @param id * @param id
* task ID * task ID
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful task stop * @return true on successful task stop
@ -211,8 +199,6 @@ public slots:
* limit by GPU memory * limit by GPU memory
* @param storage * @param storage
* limit by storage * limit by storage
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful task addition * @return true on successful task addition
@ -242,8 +228,6 @@ public slots:
* new limit by GPU memory or -1 * new limit by GPU memory or -1
* @param storage * @param storage
* new limit by storage or -1 * new limit by storage or -1
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful user edition * @return true on successful user edition
@ -259,8 +243,6 @@ public slots:
* user ID * user ID
* @param permission * @param permission
* permission to add * permission to add
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful permission addition * @return true on successful permission addition
@ -273,8 +255,6 @@ public slots:
* user ID * user ID
* @param permission * @param permission
* permission to remove * permission to remove
* @param whoAmI
* auth user name
* @param token * @param token
* auth user token * auth user token
* @return true on successful permission removal * @return true on successful permission removal

View File

@ -64,7 +64,7 @@ public:
void startWorker(); void startWorker();
// properties // properties
/** /**
* @breef database actions interval * @brief database actions interval
* @return interval in milliseconds * @return interval in milliseconds
*/ */
long long interval() const; long long interval() const;

View File

@ -29,42 +29,37 @@
/** /**
* @defgroup QueuedDB * @addtogroup QueuedDB
* @brief Queued database related constants * @brief Queued database related constants
*/ */
namespace QueuedDB namespace QueuedDB
{ {
/** /**
* @ingroup QueuedDB
* @brief settings table name * @brief settings table name
*/ */
const char SETTINGS_TABLE[] = "settings"; const char SETTINGS_TABLE[] = "settings";
/** /**
* @ingroup QueuedDB
* @brief tasks table name * @brief tasks table name
*/ */
const char TASKS_TABLE[] = "tasks"; const char TASKS_TABLE[] = "tasks";
/** /**
* @ingroup QueuedDB
* @brief tokens table name * @brief tokens table name
*/ */
const char TOKENS_TABLE[] = "tokens"; const char TOKENS_TABLE[] = "tokens";
/** /**
* @ingroup QueuedDB
* @brief users table name * @brief users table name
*/ */
const char USERS_TABLE[] = "users"; const char USERS_TABLE[] = "users";
/** /**
*@ingroup QueuedDB
* @struct QueuedDBField * @struct QueuedDBField
* @brief describes database column * @brief describes database column
* @var name * @var QueuedDBField::name
* column name * column name
* @var sqlDescription * @var QueuedDBField::sqlDescription
* description to create column * description to create column
* @var type * @var QueuedDBField::type
* Qt type of column for cast * Qt type of column for cast
* @var adminField * @var QueuedDBField::adminField
* is admin permissions required to edit or not * is admin permissions required to edit or not
*/ */
typedef struct { typedef struct {
@ -74,13 +69,11 @@ typedef struct {
bool adminField; bool adminField;
} QueuedDBField; } QueuedDBField;
/** /**
* @ingroup QueuedDB
* @typedef QueuedDBSchema * @typedef QueuedDBSchema
* custom map for database schemas descriptions * custom map for database schemas descriptions
*/ */
typedef QHash<QString, QHash<QString, QueuedDBField>> QueuedDBSchema; typedef QHash<QString, QHash<QString, QueuedDBField>> QueuedDBSchema;
/** /**
* @ingroup QueuedDB
* @brief database schema * @brief database schema
*/ */
const QueuedDBSchema DBSchema = { const QueuedDBSchema DBSchema = {

View File

@ -53,13 +53,12 @@ Q_DECLARE_LOGGING_CATEGORY(LOG_PL)
Q_DECLARE_LOGGING_CATEGORY(LOG_SERV) Q_DECLARE_LOGGING_CATEGORY(LOG_SERV)
/** /**
* @defgroup QueuedDebug * @addtogroup QueuedDebug
* @brief Queued debug functions * @brief Queued debug functions
*/ */
namespace QueuedDebug namespace QueuedDebug
{ {
/** /**
* @ingroup QueuedDebug
* @brief default log format * @brief default log format
*/ */
const char LOG_FORMAT[] = "[%{time " const char LOG_FORMAT[] = "[%{time "
@ -68,12 +67,10 @@ const char LOG_FORMAT[] = "[%{time "
"fatal}FF%{endif}][%{category}][%{function}] " "fatal}FF%{endif}][%{category}][%{function}] "
"%{message}"; "%{message}";
/** /**
* @ingroup QueuedDebug
* @brief method to enable debug messages * @brief method to enable debug messages
*/ */
void enableDebug(); void enableDebug();
/** /**
* @ingroup QueuedDebug
* @brief additional method to get build details declared in version.h * @brief additional method to get build details declared in version.h
*/ */
QStringList getBuildData(); QStringList getBuildData();

View File

@ -26,24 +26,23 @@
/** /**
* @defgroup QueuedEnums * @addtogroup QueuedEnums
* @brief Queued enumerations * @brief Queued enumerations
*/ */
namespace QueuedEnums namespace QueuedEnums
{ {
/** /**
* @ingroup QueuedEnums * @enum Permission
* @enum Permissions
* @brief available user permissions * @brief available user permissions
* @var Permissions::Admin * @var Permission::SuperAdmin
* "allow all" permissions
* @var Permission::Admin
* administrative permissions * administrative permissions
* @var Permissions::JobOwner * @var Permission::JobOwner
* owner job related permissions * owner job related permissions
* @var Permissions::User * @var Permission::Web
* user related permissions
* @var Permissions::Web
* web server access * web server access
* @var Permissions::Reports * @var Permission::Reports
* access to reports * access to reports
*/ */
enum class Permission { enum class Permission {
@ -55,6 +54,15 @@ enum class Permission {
}; };
Q_DECLARE_FLAGS(Permissions, Permission) Q_DECLARE_FLAGS(Permissions, Permission)
Q_DECLARE_OPERATORS_FOR_FLAGS(Permissions) Q_DECLARE_OPERATORS_FOR_FLAGS(Permissions)
/**
* @enum ExitAction
* @brief action with child process on destruction
* @var ExitAction::Terminate
* send SIGTERM on exit
* @var ExitAction::Kill
* send SIGKILL on exit
*/
enum class ExitAction { Terminate = 1 << 1, Kill = 1 << 2 };
}; };

View File

@ -28,25 +28,24 @@
/** /**
* @defgroup QueuedLimits * @addtogroup QueuedLimits
* @brief Queued limits * @brief Queued limits
*/ */
namespace QueuedLimits namespace QueuedLimits
{ {
/** /**
* @ingroup QueuedLimits
* @struct Limits * @struct Limits
* @var cpu * @var Limits::cpu
* limit by CPU * limit by CPU
* @var gpu * @var Limits::gpu
* limit by GPU * limit by GPU
* @var memory * @var Limits::memory
* limit by memory * limit by memory
* @var gpumemory * @var Limits::gpumemory
* limit by GPU memory * limit by GPU memory
* @var storage * @var Limits::storage
* limit by storage * limit by storage
* @var valid * @var Limits::valid
* is this permissions default generated or not * is this permissions default generated or not
*/ */
struct Limits { struct Limits {
@ -100,9 +99,9 @@ struct Limits {
}; };
/** /**
* @brief structure constructor from fields * @brief structure constructor from fields
* @param _cpuLimit * @param _cpu
* limit by CPU cores * limit by CPU cores
* @param _gpuLimit * @param _gpu
* limit by GPU cores * limit by GPU cores
* @param _memory * @param _memory
* limit by memory * limit by memory
@ -111,18 +110,16 @@ struct Limits {
* @param _storage * @param _storage
* limit by storage * limit by storage
*/ */
Limits(const long long _cpuLimit, const long long _gpuLimit, Limits(const long long _cpu, const long long _gpu, const long long _memory,
const long long _memoryLimit, const long long _gpumemoryLimit, const long long _gpumemory, const long long _storage)
const long long _storage) : cpu(_cpu)
: cpu(_cpuLimit) , gpu(_gpu)
, gpu(_gpuLimit) , memory(_memory)
, memory(_memoryLimit) , gpumemory(_gpumemory)
, gpumemory(_gpumemoryLimit)
, storage(_storage) , storage(_storage)
, valid(true){}; , valid(true){};
}; };
/** /**
* @ingroup QueuedLimits
* @brief convert QString memory value to integer * @brief convert QString memory value to integer
* @param _value * @param _value
* value to convert * value to convert
@ -132,7 +129,6 @@ struct Limits {
*/ */
long long convertMemory(QString _value, bool *_status = nullptr); long long convertMemory(QString _value, bool *_status = nullptr);
/** /**
* @ingroup QueuedLimits
* @brief compare two limits * @brief compare two limits
* @param _first * @param _first
* first limit * first limit
@ -142,7 +138,6 @@ long long convertMemory(QString _value, bool *_status = nullptr);
*/ */
bool limitCompare(const long long _first, const long long _second); bool limitCompare(const long long _first, const long long _second);
/** /**
* @ingroup QueuedLimits
* @brief get minimal limits from given * @brief get minimal limits from given
* @param _task * @param _task
* task defined limits * task defined limits

View File

@ -57,25 +57,25 @@ public:
/** /**
* @struct QueuedProcessDefinition * @struct QueuedProcessDefinition
* @brief structure to define process * @brief structure to define process
* @var command * @var QueuedProcessDefinitions::command
* command line * command line
* @var arguments * @var QueuedProcessDefinitions::arguments
* command line arguments * command line arguments
* @var workingDirectory * @var QueuedProcessDefinitions::workingDirectory
* path to working directory * path to working directory
* @var uid * @var QueuedProcessDefinitions::uid
* UID of process * UID of process
* @var gid * @var QueuedProcessDefinitions::gid
* GID of process * GID of process
* @var nice * @var QueuedProcessDefinitions::nice
* nice level of process * nice level of process
* @var startTime * @var QueuedProcessDefinitions::startTime
* process start time * process start time
* @var endTime * @var QueuedProcessDefinitions::endTime
* process end time * process end time
* @var user * @var QueuedProcessDefinitions::user
* task owner ID * task owner ID
* @var limits * @var QueuedProcessDefinitions::limits
* task limits * task limits
*/ */
typedef struct { typedef struct {

View File

@ -28,6 +28,7 @@
#include <QHash> #include <QHash>
#include <QObject> #include <QObject>
#include "QueuedEnums.h"
#include "QueuedProcess.h" #include "QueuedProcess.h"
@ -37,7 +38,7 @@
class QueuedProcessManager : public QObject class QueuedProcessManager : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(OnExitAction onExit READ onExit WRITE setOnExitAction) Q_PROPERTY(QueuedEnums::ExitAction onExit READ onExit WRITE setExitAction)
Q_PROPERTY(QString processLine READ processLine WRITE setProcessLine) Q_PROPERTY(QString processLine READ processLine WRITE setProcessLine)
public: public:
@ -52,15 +53,6 @@ public:
*/ */
typedef QHash<long long, QMetaObject::Connection> typedef QHash<long long, QMetaObject::Connection>
QueuedProcessConnectionMap; QueuedProcessConnectionMap;
/**
* @enum OnExitAction
* @brief action with child process on destruction
* @var OnExitAction::Terminate
* send SIGTERM on exit
* @var OnExitAction::Kill
* send SIGKILL on exit
*/
enum class OnExitAction { Terminate = 1 << 1, Kill = 1 << 2 };
/** /**
* @brief QueuedProcessManager class constructor * @brief QueuedProcessManager class constructor
@ -72,7 +64,7 @@ public:
* default action on exit * default action on exit
*/ */
explicit QueuedProcessManager(QObject *parent, const QString &processLine, explicit QueuedProcessManager(QObject *parent, const QString &processLine,
const OnExitAction onExit); const QueuedEnums::ExitAction onExit);
/** /**
* @brief QueuedProcessManager class destructor * @brief QueuedProcessManager class destructor
*/ */
@ -142,7 +134,7 @@ public:
* @brief default action on exit * @brief default action on exit
* @return default action from possible ones * @return default action from possible ones
*/ */
OnExitAction onExit() const; QueuedEnums::ExitAction onExit() const;
/** /**
* @brief process command line * @brief process command line
* @return current command line * @return current command line
@ -153,10 +145,10 @@ public:
* @param _action * @param _action
* new on exit action * new on exit action
*/ */
void setOnExitAction(const OnExitAction _action); void setExitAction(const QueuedEnums::ExitAction _action);
/** /**
* @brief set command line * @brief set command line
* @param _commandLine * @param _processLine
* new command line * new command line
*/ */
void setProcessLine(const QString _processLine); void setProcessLine(const QString _processLine);
@ -206,7 +198,7 @@ private:
/** /**
* @brief action on exit * @brief action on exit
*/ */
OnExitAction m_onExit = OnExitAction::Terminate; QueuedEnums::ExitAction m_onExit = QueuedEnums::ExitAction::Terminate;
/** /**
* @brief processes list * @brief processes list
*/ */

View File

@ -26,19 +26,17 @@
/** /**
* @defgroup QueuedSystemInfo * @addtogroup QueuedSystemInfo
* @brief system information methods * @brief system information methods
*/ */
namespace QueuedSystemInfo namespace QueuedSystemInfo
{ {
/** /**
* @ingroup QueuedSystemInfo
* @brief system CPU count * @brief system CPU count
* @return system CPU count * @return system CPU count
*/ */
long long cpuCount(); long long cpuCount();
/** /**
* @ingroup QueuedSystemInfo
* @brief weight of specified CPU count * @brief weight of specified CPU count
* @param _cpu * @param _cpu
* CPU count to get weight * CPU count to get weight
@ -46,13 +44,11 @@ long long cpuCount();
*/ */
double cpuWeight(const long long _cpu); double cpuWeight(const long long _cpu);
/** /**
* @ingroup QueuedSystemInfo
* @brief system memory count * @brief system memory count
* @return system memory count in bytes * @return system memory count in bytes
*/ */
long long memoryCount(); long long memoryCount();
/** /**
* @ingroup QueuedSystemInfo
* @brief weight of specified memory count * @brief weight of specified memory count
* @param _memory * @param _memory
* memory in bytes to get weight * memory in bytes to get weight

View File

@ -39,11 +39,11 @@ public:
/** /**
* @struct QueuedTokenDefinitions * @struct QueuedTokenDefinitions
* @brief structure to define token * @brief structure to define token
* @var token * @var QueuedTokenDefinitions::token
* token ID * token ID
* @var user * @var QueuedTokenDefinitions::user
* token owner user * token owner user
* @var validUntil * @var QueuedTokenDefinitions::validUntil
* valid until * valid until
*/ */
typedef struct { typedef struct {
@ -78,7 +78,7 @@ public:
loadToken(const QueuedTokenManager::QueuedTokenDefinitions &_definitions); loadToken(const QueuedTokenManager::QueuedTokenDefinitions &_definitions);
/** /**
* @brief upload tokens from database * @brief upload tokens from database
* @param _value * @param _values
* tokens from database * tokens from database
*/ */
void loadTokens(const QList<QVariantHash> &_values); void loadTokens(const QList<QVariantHash> &_values);

View File

@ -194,7 +194,7 @@ public:
// permissions // permissions
/** /**
* @brief set limits * @brief set limits
* @param _limit * @param _limits
* new user limits * new user limits
*/ */
void setLimits(const QString &_limits); void setLimits(const QString &_limits);

View File

@ -543,8 +543,8 @@ void QueuedCore::updateSettings(const QueuedCfg::QueuedSettings _id,
m_databaseManager->setKeepUsers(_value.toLongLong()); m_databaseManager->setKeepUsers(_value.toLongLong());
break; break;
case QueuedCfg::QueuedSettings::OnExitAction: case QueuedCfg::QueuedSettings::OnExitAction:
m_processes->setOnExitAction( m_processes->setExitAction(
static_cast<QueuedProcessManager::OnExitAction>(_value.toInt())); static_cast<QueuedEnums::ExitAction>(_value.toInt()));
break; break;
case QueuedCfg::QueuedSettings::Plugins: case QueuedCfg::QueuedSettings::Plugins:
// do nothing here // do nothing here
@ -672,7 +672,7 @@ void QueuedCore::initPlugins()
void QueuedCore::initProcesses() void QueuedCore::initProcesses()
{ {
// init processes // init processes
auto onExitAction = static_cast<QueuedProcessManager::OnExitAction>( auto onExitAction = static_cast<QueuedEnums::ExitAction>(
m_advancedSettings->get(QueuedCfg::QueuedSettings::OnExitAction) m_advancedSettings->get(QueuedCfg::QueuedSettings::OnExitAction)
.toInt()); .toInt());
auto processLine auto processLine
@ -787,15 +787,14 @@ bool QueuedCore::addTaskPrivate(const QString &_command,
QueuedLimits::Limits( QueuedLimits::Limits(
m_advancedSettings->get(QueuedCfg::QueuedSettings::DefaultLimits) m_advancedSettings->get(QueuedCfg::QueuedSettings::DefaultLimits)
.toString())); .toString()));
QVariantHash properties QVariantHash properties = {{"user", _userId},
= {{"user", _userId}, {"command", _command},
{"command", _command}, {"commandArguments", _arguments},
{"commandArguments", _arguments}, {"workDirectory", _workingDirectory},
{"workDirectory", _workingDirectory}, {"nice", _nice},
{"nice", _nice}, {"uid", ids.first},
{"uid", ids.first}, {"gid", ids.second},
{"gid", ids.second}, {"limits", taskLimits.toString()}};
{"limits", taskLimits.toString()}};
auto id = m_database->add(QueuedDB::TASKS_TABLE, properties); auto id = m_database->add(QueuedDB::TASKS_TABLE, properties);
if (id == -1) { if (id == -1) {
qCWarning(LOG_LIB) << "Could not add task" << _command; qCWarning(LOG_LIB) << "Could not add task" << _command;

View File

@ -30,15 +30,15 @@
*/ */
QueuedProcessManager::QueuedProcessManager(QObject *parent, QueuedProcessManager::QueuedProcessManager(QObject *parent,
const QString &processLine, const QString &processLine,
const OnExitAction onExit) const QueuedEnums::ExitAction onExit)
: QObject(parent) : QObject(parent)
{ {
qCDebug(LOG_LIB) << __PRETTY_FUNCTION__; qCDebug(LOG_LIB) << __PRETTY_FUNCTION__;
qRegisterMetaType<QueuedProcessManager::OnExitAction>( qRegisterMetaType<QueuedEnums::ExitAction>(
"QueuedProcessManager::OnExitAction"); "QueuedEnums::ExitAction");
setOnExitAction(onExit); setExitAction(onExit);
setProcessLine(processLine); setProcessLine(processLine);
} }
@ -164,10 +164,10 @@ void QueuedProcessManager::remove(const long long _index)
disconnect(connection); disconnect(connection);
switch (onExit()) { switch (onExit()) {
case OnExitAction::Kill: case QueuedEnums::ExitAction::Kill:
pr->kill(); pr->kill();
break; break;
case OnExitAction::Terminate: case QueuedEnums::ExitAction::Terminate:
pr->terminate(); pr->terminate();
break; break;
} }
@ -252,10 +252,10 @@ void QueuedProcessManager::stop(const long long _index)
} }
switch (onExit()) { switch (onExit()) {
case OnExitAction::Kill: case QueuedEnums::ExitAction::Kill:
pr->kill(); pr->kill();
break; break;
case OnExitAction::Terminate: case QueuedEnums::ExitAction::Terminate:
pr->terminate(); pr->terminate();
break; break;
} }
@ -265,7 +265,7 @@ void QueuedProcessManager::stop(const long long _index)
/** /**
* @fn onExit * @fn onExit
*/ */
QueuedProcessManager::OnExitAction QueuedProcessManager::onExit() const QueuedEnums::ExitAction QueuedProcessManager::onExit() const
{ {
return m_onExit; return m_onExit;
} }
@ -281,9 +281,9 @@ QString QueuedProcessManager::processLine() const
/** /**
* @fn setOnExitAction * @fn setExitAction
*/ */
void QueuedProcessManager::setOnExitAction(const OnExitAction _action) void QueuedProcessManager::setExitAction(const QueuedEnums::ExitAction _action)
{ {
qCDebug(LOG_LIB) << "New action on exit" << static_cast<int>(_action); qCDebug(LOG_LIB) << "New action on exit" << static_cast<int>(_action);