mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
Fix race condition allowing to run several instances of qBittorrent at the same time
This commit is contained in:
parent
7ab206ebac
commit
b9394f2ba2
24 changed files with 1713 additions and 156 deletions
|
@ -33,8 +33,8 @@
|
|||
#include <QFileOpenEvent>
|
||||
#include "qmacapplication.h"
|
||||
|
||||
QMacApplication::QMacApplication(int &argc, char** argv) :
|
||||
QApplication(argc, argv)
|
||||
QMacApplication::QMacApplication(QString appid, int &argc, char** argv) :
|
||||
QtSingleApplication(appid, argc, argv)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -43,9 +43,8 @@ bool QMacApplication::event(QEvent * event) {
|
|||
switch (event->type()) {
|
||||
case QEvent::FileOpen:
|
||||
{
|
||||
QStringList paths;
|
||||
paths << static_cast<QFileOpenEvent *>(event)->file();
|
||||
emit newFileOpenMacEvent(paths);
|
||||
QString path = static_cast<QFileOpenEvent *>(event)->file();
|
||||
emit newFileOpenMacEvent(path);
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue