mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Code clean up
This commit is contained in:
parent
1537c70988
commit
f9f3642116
@ -84,7 +84,6 @@ void qt_mac_set_dock_menu(QMenu *menu);
|
|||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
#define TIME_TRAY_BALLOON 5000
|
#define TIME_TRAY_BALLOON 5000
|
||||||
#define TOOLBAR_SPACING 0
|
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
* *
|
* *
|
||||||
@ -137,8 +136,6 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
|
|||||||
QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("Set the password..."));
|
QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("Set the password..."));
|
||||||
connect(defineUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(defineUILockPassword()));
|
connect(defineUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(defineUILockPassword()));
|
||||||
actionLock_qBittorrent->setMenu(lockMenu);
|
actionLock_qBittorrent->setMenu(lockMenu);
|
||||||
// Fix Tool bar layout
|
|
||||||
toolBar->layout()->setSpacing(TOOLBAR_SPACING);
|
|
||||||
// Creating Bittorrent session
|
// Creating Bittorrent session
|
||||||
connect(QBtSession::instance(), SIGNAL(fullDiskError(QTorrentHandle, QString)), this, SLOT(fullDiskError(QTorrentHandle, QString)));
|
connect(QBtSession::instance(), SIGNAL(fullDiskError(QTorrentHandle, QString)), this, SLOT(fullDiskError(QTorrentHandle, QString)));
|
||||||
connect(QBtSession::instance(), SIGNAL(finishedTorrent(QTorrentHandle)), this, SLOT(finishedTorrent(QTorrentHandle)));
|
connect(QBtSession::instance(), SIGNAL(finishedTorrent(QTorrentHandle)), this, SLOT(finishedTorrent(QTorrentHandle)));
|
||||||
@ -971,7 +968,6 @@ void MainWindow::loadPreferences(bool configure_session) {
|
|||||||
// General
|
// General
|
||||||
if(pref.isToolbarDisplayed()) {
|
if(pref.isToolbarDisplayed()) {
|
||||||
toolBar->setVisible(true);
|
toolBar->setVisible(true);
|
||||||
toolBar->layout()->setSpacing(TOOLBAR_SPACING);
|
|
||||||
} else {
|
} else {
|
||||||
// Clear search filter before hiding the top toolbar
|
// Clear search filter before hiding the top toolbar
|
||||||
search_filter->clear();
|
search_filter->clear();
|
||||||
@ -991,7 +987,6 @@ void MainWindow::loadPreferences(bool configure_session) {
|
|||||||
actionIncreasePriority->setVisible(true);
|
actionIncreasePriority->setVisible(true);
|
||||||
prioSeparator->setVisible(true);
|
prioSeparator->setVisible(true);
|
||||||
prioSeparatorMenu->setVisible(true);
|
prioSeparatorMenu->setVisible(true);
|
||||||
toolBar->layout()->setSpacing(TOOLBAR_SPACING);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(actionDecreasePriority->isVisible()) {
|
if(actionDecreasePriority->isVisible()) {
|
||||||
@ -1000,7 +995,6 @@ void MainWindow::loadPreferences(bool configure_session) {
|
|||||||
actionIncreasePriority->setVisible(false);
|
actionIncreasePriority->setVisible(false);
|
||||||
prioSeparator->setVisible(false);
|
prioSeparator->setVisible(false);
|
||||||
prioSeparatorMenu->setVisible(false);
|
prioSeparatorMenu->setVisible(false);
|
||||||
toolBar->layout()->setSpacing(TOOLBAR_SPACING);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,12 +103,6 @@
|
|||||||
<addaction name="menu_Help"/>
|
<addaction name="menu_Help"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QToolBar" name="toolBar">
|
<widget class="QToolBar" name="toolBar">
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::NoContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="movable">
|
<property name="movable">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user