mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
Merge remote-tracking branch 'remotes/origin/dev' into feature/new-gui
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user