mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-06 02:25:46 +00:00
fix dataengine
update plasmoid translations
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
# set files
|
||||
file (GLOB SOURCES *.cpp)
|
||||
file (GLOB HEADERS ${SUBPROJECT_INCLUDE_DIR}/${SUBPROJECT}/*.h)
|
||||
set (HEADERS ${HEADERS} ${CMAKE_SOURCE_DIR}/task.h)
|
||||
|
||||
# include_path
|
||||
include_directories (${SUBPROJECT_INCLUDE_DIR}
|
||||
|
@ -23,10 +23,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <netctlgui/netctlinteract.h>
|
||||
#include <netctlgui/netctlprofile.h>
|
||||
#include <netctlgui/sleepthread.h>
|
||||
#include <netctlgui/wpasupinteract.h>
|
||||
#include <netctlgui/netctlgui.h>
|
||||
|
||||
|
||||
/**
|
||||
|
@ -28,6 +28,30 @@
|
||||
#include <QProcess>
|
||||
|
||||
#include <netctlgui/netctlgui.h>
|
||||
#include "task.h"
|
||||
|
||||
|
||||
struct TaskResult
|
||||
{
|
||||
int exitCode;
|
||||
QByteArray output;
|
||||
};
|
||||
|
||||
|
||||
TaskResult runTask(const QString cmd)
|
||||
{
|
||||
return Task::await<TaskResult>( [ & ]() {
|
||||
QProcess command;
|
||||
command.start(cmd);
|
||||
command.waitForFinished(-1);
|
||||
|
||||
TaskResult r;
|
||||
r.exitCode = command.exitCode();
|
||||
r.output = command.readAllStandardOutput();
|
||||
|
||||
return r;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user