Merge remote-tracking branch 'remotes/origin/dev' into feature/new-gui
This commit is contained in:
commit
d0c9c1043c
179 changed files with 3824 additions and 4107 deletions
|
@ -10,7 +10,7 @@
|
|||
#include <QStandardPaths>
|
||||
#include <QUrl>
|
||||
|
||||
#include "defines.h"
|
||||
#include "version.h"
|
||||
#include "utilities.h"
|
||||
|
||||
QString Utils::getRandomString(int len)
|
||||
|
@ -85,7 +85,7 @@ bool Utils::processIsRunning(const QString& fileName)
|
|||
QProcess process;
|
||||
process.setReadChannel(QProcess::StandardOutput);
|
||||
process.setProcessChannelMode(QProcess::MergedChannels);
|
||||
process.start(QString("wmic.exe /OUTPUT:STDOUT PROCESS get %1").arg("Caption"));
|
||||
process.start("wmic.exe", QStringList() << "/OUTPUT:STDOUT" << "PROCESS" << "get" << "Caption");
|
||||
process.waitForStarted();
|
||||
process.waitForFinished();
|
||||
QString processData(process.readAll());
|
||||
|
@ -167,9 +167,8 @@ bool Utils::checkIpSubnetFormat(const QString &ip)
|
|||
void Utils::killProcessByName(const QString &name)
|
||||
{
|
||||
qDebug().noquote() << "Kill process" << name;
|
||||
qDebug() << "Hello";
|
||||
#ifdef Q_OS_WIN
|
||||
QProcess::execute(QString("taskkill /im %1 /f").arg(name));
|
||||
QProcess::execute("taskkill", QStringList() << "/IM" << name << "/F");
|
||||
#elif defined Q_OS_IOS
|
||||
return;
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue