mirror of
https://github.com/arcan1s/queued.git
synced 2025-07-17 23:59:56 +00:00
implement priority supprt for users
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#include "QueuedTcpServerResponseHelperUser.h"
|
||||
|
||||
#include <queued/Queued.h>
|
||||
#include <queued/QueuedUser.h>
|
||||
|
||||
|
||||
QVariantHash QueuedTcpServerResponseHelperUser::addOrEditUser(
|
||||
@ -72,6 +73,7 @@ QueuedTcpServerResponseHelperUser::getDefinitions(const QVariantHash &_data)
|
||||
res.match([&defs](const QString &val) { defs.password = val; },
|
||||
[](const QueuedError &) {});
|
||||
defs.permissions = _data["permissions"].toUInt();
|
||||
defs.priority = _data["priority"].toUInt();
|
||||
// limits
|
||||
QueuedLimits::Limits limits;
|
||||
limits.cpu = _data["limitCpu"].toLongLong();
|
||||
|
@ -55,20 +55,15 @@ int main(int argc, char *argv[])
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
// info
|
||||
QCommandLineOption infoOption(QStringList() << "i"
|
||||
<< "info",
|
||||
"Show additional info.");
|
||||
QCommandLineOption infoOption({"i", "info"}, "Show additional info.");
|
||||
parser.addOption(infoOption);
|
||||
|
||||
// debug mode
|
||||
QCommandLineOption debugOption(QStringList() << "d"
|
||||
<< "debug",
|
||||
"Print debug information.");
|
||||
QCommandLineOption debugOption({"d", "debug"}, "Print debug information.");
|
||||
parser.addOption(debugOption);
|
||||
|
||||
// daemon mode
|
||||
QCommandLineOption daemonOption(QStringList() << "daemon",
|
||||
"Start detached.");
|
||||
QCommandLineOption daemonOption("daemon", "Start detached.");
|
||||
parser.addOption(daemonOption);
|
||||
|
||||
parser.process(app);
|
||||
|
Reference in New Issue
Block a user