Adds initial intermediate qt6 porting state
This commit is contained in:
11247 files changed
+1891537
No files matched your search
@@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
|
||||
#include "cbi_help.h"
|
||||
#include "workerbase.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
CBI_Help::CBI_Help(unsigned short port)
|
||||
: CommandInterface(port, "HELP")
|
||||
{}
|
||||
|
||||
void CBI_Help::handleCommandInternal(const QVector<QByteArray> &)
|
||||
{
|
||||
const auto commands = workerBase()->getCommands();
|
||||
QStringList list;
|
||||
list.reserve(commands.size());
|
||||
for (const CommandInterface *i : commands)
|
||||
list += i->help();
|
||||
|
||||
std::sort(list.begin(), list.end());
|
||||
writeData(list.join(QLatin1Char('\n')));
|
||||
}
|
||||
|
||||
QString CBI_Help::help() const
|
||||
{
|
||||
return QLatin1String("HELP - prints out help informations");
|
||||
}
|
||||
Reference in new issue
Block a user