Bringing the AddNewTorrentDialog to the front.

This commit is contained in:
Vladimir Golovnev (Glassez)
2013-09-17 16:18:01 +04:00
parent 89b82778e6
commit b78ea79d30
4 changed files with 27 additions and 12 deletions

View File

@@ -206,6 +206,13 @@ int main(int argc, char *argv[]) {
if (app.isRunning()) {
qDebug("qBittorrent is already running for this user.");
// Read torrents given on command line
#ifdef Q_OS_WIN
DWORD pid = app.getRunningPid();
if (pid > 0) {
BOOL b = AllowSetForegroundWindow(pid);
qDebug("AllowSetForegroundWindow() returns %s", b ? "TRUE" : "FALSE");
}
#endif
QStringList torrentCmdLine = app.arguments();
//Pass program parameters if any
QString message;