Fix race condition allowing to run multiple instances at the same time (closes #286968)

This commit is contained in:
Christophe Dumez
2010-06-09 10:12:15 +00:00
parent 779b2baa74
commit a1aa507bdb
25 changed files with 1717 additions and 157 deletions

View File

@@ -28,13 +28,13 @@
* Contact : chris@qbittorrent.org
*/
#ifdef Q_WS_MAC
#include <QFileOpenEvent>
#include "qmacapplication.h"
#ifdef Q_WS_MAC
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: