mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 14:04:23 +00:00
On Windows, add qBittorrent executable folder to PATH environment variable
This commit is contained in:
parent
35ec93ccb1
commit
12881dd4c4
@ -74,6 +74,11 @@ SearchEngine::SearchEngine(GUI *parent, Bittorrent *BTSession) : QWidget(parent)
|
|||||||
// Creating Search Process
|
// Creating Search Process
|
||||||
searchProcess = new QProcess(this);
|
searchProcess = new QProcess(this);
|
||||||
QStringList env = QProcess::systemEnvironment();
|
QStringList env = QProcess::systemEnvironment();
|
||||||
|
#ifdef Q_WS_WIN
|
||||||
|
// add qBittorrent executable folder to PATH environment variable
|
||||||
|
qDebug("qBittorrent executable path: %s", qPrintable(qApp->applicationDirPath()));
|
||||||
|
env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1;"+qApp->applicationDirPath());
|
||||||
|
#endif
|
||||||
searchProcess->setEnvironment(env);
|
searchProcess->setEnvironment(env);
|
||||||
connect(searchProcess, SIGNAL(started()), this, SLOT(searchStarted()));
|
connect(searchProcess, SIGNAL(started()), this, SLOT(searchStarted()));
|
||||||
connect(searchProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readSearchOutput()));
|
connect(searchProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readSearchOutput()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user