mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-14 22:55:32 +08:00
A small patch
Support specifying client working directory Clean all compile warnings
This commit is contained in:
+12
-2
@@ -55,7 +55,11 @@ void PM3Process::connectPM3(const QString& path, const QString& port, const QStr
|
||||
result = result.left(result.indexOf("\r\n"));
|
||||
result = result.mid(3, result.lastIndexOf(" ") - 3);
|
||||
emit PM3StatedChanged(true, result);
|
||||
setSerialListener(port, true);
|
||||
|
||||
// if the arguments don't contain <port>, then disable the port listener
|
||||
// useful when using offline sniff
|
||||
if(args.indexOf(port) != -1)
|
||||
setSerialListener(port, true);
|
||||
}
|
||||
else
|
||||
kill();
|
||||
@@ -132,5 +136,11 @@ void PM3Process::setProcEnv(const QStringList* env)
|
||||
{
|
||||
// qDebug() << "passed Env List" << *env;
|
||||
this->setEnvironment(*env);
|
||||
// qDebug() << "final Env List" << processEnvironment().toStringList();
|
||||
// qDebug() << "final Env List" << processEnvironment().toStringList();
|
||||
}
|
||||
|
||||
void PM3Process::setWorkingDir(const QString& dir)
|
||||
{
|
||||
// the working directory cannot be the default, or the client will failed to load the dll
|
||||
this->setWorkingDirectory(dir);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <QtSerialPort/QSerialPortInfo>
|
||||
#include <QtSerialPort/QSerialPort>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QDir>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
@@ -27,6 +28,7 @@ public slots:
|
||||
qint64 write(QString data);
|
||||
void reconnectPM3();
|
||||
void setProcEnv(const QStringList* env);
|
||||
void setWorkingDir(const QString& dir);
|
||||
private slots:
|
||||
void onTimeout();
|
||||
void onReadyRead();
|
||||
|
||||
Reference in New Issue
Block a user