mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
migrate std::string to qstring + add sysinfo via json (#412)
* std::string -> qstring part 1 * more string migration * more string migration ... * ... * more qstring mogrations add sysinfo via json * remove unneccessary includes * integrate sysinfo into webui
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QStringList>
|
||||
#include <string>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
@@ -41,7 +40,7 @@ void restartHyperion(bool asNewProcess)
|
||||
QByteArray command_exec(QString cmd, QByteArray data)
|
||||
{
|
||||
char buffer[128];
|
||||
std::string result = "";
|
||||
QString result = "";
|
||||
|
||||
std::shared_ptr<FILE> pipe(popen(cmd.toLocal8Bit().constData(), "r"), pclose);
|
||||
if (pipe)
|
||||
@@ -52,7 +51,7 @@ QByteArray command_exec(QString cmd, QByteArray data)
|
||||
result += buffer;
|
||||
}
|
||||
}
|
||||
return result.c_str();
|
||||
return QSTRING_CSTR(result);
|
||||
}
|
||||
|
||||
};
|
Reference in New Issue
Block a user