mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-12 07:48:04 +00:00
- Fixed a crash when stopping a search (introduced when splitting search engine from GUI recently)
This commit is contained in:
parent
30aa59f582
commit
a25cc14af4
18
src/GUI.cpp
18
src/GUI.cpp
@ -56,6 +56,15 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
|||||||
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(VERSION));
|
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(VERSION));
|
||||||
QSettings settings("qBittorrent", "qBittorrent");
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
systrayIntegration = settings.value("Options/Misc/Behaviour/SystrayIntegration", true).toBool();
|
systrayIntegration = settings.value("Options/Misc/Behaviour/SystrayIntegration", true).toBool();
|
||||||
|
// Create tray icon
|
||||||
|
if (QSystemTrayIcon::isSystemTrayAvailable()){
|
||||||
|
if(systrayIntegration){
|
||||||
|
createTrayIcon();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
systrayIntegration = false;
|
||||||
|
qDebug("Info: System tray unavailable\n");
|
||||||
|
}
|
||||||
// Finished torrents tab
|
// Finished torrents tab
|
||||||
finishedTorrentTab = new FinishedTorrents(this, &BTSession);
|
finishedTorrentTab = new FinishedTorrents(this, &BTSession);
|
||||||
tabs->addTab(finishedTorrentTab, tr("Finished"));
|
tabs->addTab(finishedTorrentTab, tr("Finished"));
|
||||||
@ -158,15 +167,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
|||||||
connect(downloadList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayDLListMenu(const QPoint&)));
|
connect(downloadList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayDLListMenu(const QPoint&)));
|
||||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayGUIMenu(const QPoint&)));
|
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayGUIMenu(const QPoint&)));
|
||||||
connect(infoBar, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayInfoBarMenu(const QPoint&)));
|
connect(infoBar, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayInfoBarMenu(const QPoint&)));
|
||||||
// Create tray icon
|
|
||||||
if (QSystemTrayIcon::isSystemTrayAvailable()){
|
|
||||||
if(systrayIntegration){
|
|
||||||
createTrayIcon();
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
systrayIntegration = false;
|
|
||||||
qDebug("Info: System tray unavailable\n");
|
|
||||||
}
|
|
||||||
// Start download list refresher
|
// Start download list refresher
|
||||||
refresher = new QTimer(this);
|
refresher = new QTimer(this);
|
||||||
connect(refresher, SIGNAL(timeout()), this, SLOT(updateDlList()));
|
connect(refresher, SIGNAL(timeout()), this, SLOT(updateDlList()));
|
||||||
|
Loading…
Reference in New Issue
Block a user