diff --git a/src/headlessloader.h b/src/headlessloader.h index 5a96665f8..6ed1b2acb 100644 --- a/src/headlessloader.h +++ b/src/headlessloader.h @@ -41,7 +41,7 @@ class HeadlessLoader: public QObject { public: HeadlessLoader(const QStringList &torrentCmdLine) { - connect(static_cast(qApp), SIGNAL(aboutToQuit()), this, SLOT(deleteBTSession()), Qt::DirectConnection); + connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(deleteBTSession()), Qt::DirectConnection); Preferences pref; // Enable Web UI pref.setWebUiEnabled(true); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c9b6dfdf0..39cde1d50 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -110,7 +110,7 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa setWindowTitle(QString("qBittorrent %1").arg(QString::fromUtf8(VERSION))); displaySpeedInTitle = pref.speedInTitleBar(); // Clean exit on log out - connect(static_cast(qApp), SIGNAL(aboutToQuit()), this, SLOT(deleteBTSession()), Qt::DirectConnection); + connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(deleteBTSession()), Qt::DirectConnection); // Setting icons #if defined(Q_WS_X11) if (Preferences().useSystemIconTheme())