mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
- Fixed exit from trayicon when "close to systray" is enabled
This commit is contained in:
parent
8df90e2567
commit
a95b1d7589
@ -146,7 +146,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
|||||||
downloadList->header()->setClickable(true);
|
downloadList->header()->setClickable(true);
|
||||||
downloadList->header()->setSortIndicatorShown(true);
|
downloadList->header()->setSortIndicatorShown(true);
|
||||||
// Connecting Actions to slots
|
// Connecting Actions to slots
|
||||||
connect(actionExit, SIGNAL(triggered()), this, SLOT(close()));
|
connect(actionExit, SIGNAL(triggered()), this, SLOT(forceExit()));
|
||||||
connect(actionOpen, SIGNAL(triggered()), this, SLOT(askForTorrents()));
|
connect(actionOpen, SIGNAL(triggered()), this, SLOT(askForTorrents()));
|
||||||
connect(actionDelete_Permanently, SIGNAL(triggered()), this, SLOT(deletePermanently()));
|
connect(actionDelete_Permanently, SIGNAL(triggered()), this, SLOT(deletePermanently()));
|
||||||
connect(actionDelete, SIGNAL(triggered()), this, SLOT(deleteSelection()));
|
connect(actionDelete, SIGNAL(triggered()), this, SLOT(deleteSelection()));
|
||||||
@ -408,6 +408,13 @@ void GUI::displayDLListMenu(const QPoint& pos){
|
|||||||
myDLLlistMenu.exec(mapToGlobal(pos)+QPoint(22,180));
|
myDLLlistMenu.exec(mapToGlobal(pos)+QPoint(22,180));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Necessary if we want to close the window
|
||||||
|
// in one time if "close to systray" is enabled
|
||||||
|
void GUI::forceExit(){
|
||||||
|
hide();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
void GUI::displayGUIMenu(const QPoint& pos){
|
void GUI::displayGUIMenu(const QPoint& pos){
|
||||||
QMenu myGUIMenu(this);
|
QMenu myGUIMenu(this);
|
||||||
myGUIMenu.addAction(actionOpen);
|
myGUIMenu.addAction(actionOpen);
|
||||||
|
@ -142,6 +142,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
|||||||
void balloonClicked();
|
void balloonClicked();
|
||||||
void writeSettings();
|
void writeSettings();
|
||||||
void readSettings();
|
void readSettings();
|
||||||
|
void forceExit();
|
||||||
// Torrent actions
|
// Torrent actions
|
||||||
void showProperties(const QModelIndex &index);
|
void showProperties(const QModelIndex &index);
|
||||||
void propertiesSelection();
|
void propertiesSelection();
|
||||||
|
Loading…
Reference in New Issue
Block a user