mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Cleanup mainwindow startup code
This commit is contained in:
parent
8fd7b86f45
commit
9b6b357c9e
@ -302,8 +302,6 @@ int main(int argc, char *argv[]){
|
|||||||
|
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
MainWindow window(0, torrentCmdLine);
|
MainWindow window(0, torrentCmdLine);
|
||||||
if(!no_splash)
|
|
||||||
window.raise();
|
|
||||||
QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
|
QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
|
||||||
&window, SLOT(processParams(const QString&)));
|
&window, SLOT(processParams(const QString&)));
|
||||||
app.setActivationWindow(&window);
|
app.setActivationWindow(&window);
|
||||||
|
@ -233,8 +233,6 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
|
|||||||
if(!autoShutdownGroup->checkedAction())
|
if(!autoShutdownGroup->checkedAction())
|
||||||
actionAutoShutdown_Disabled->setChecked(true);
|
actionAutoShutdown_Disabled->setChecked(true);
|
||||||
|
|
||||||
show();
|
|
||||||
|
|
||||||
// Load Window state and sizes
|
// Load Window state and sizes
|
||||||
readSettings();
|
readSettings();
|
||||||
properties->readSettings();
|
properties->readSettings();
|
||||||
@ -242,13 +240,14 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
|
|||||||
// Limit status filters list height
|
// Limit status filters list height
|
||||||
transferListFilters->getStatusFilters()->updateHeight();
|
transferListFilters->getStatusFilters()->updateHeight();
|
||||||
|
|
||||||
if(ui_locked) {
|
if(!ui_locked) {
|
||||||
hide();
|
|
||||||
} else {
|
|
||||||
if(pref.startMinimized())
|
if(pref.startMinimized())
|
||||||
showMinimized();
|
showMinimized();
|
||||||
else
|
else {
|
||||||
setFocus();
|
show();
|
||||||
|
activateWindow();
|
||||||
|
raise();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start watching the executable for updates
|
// Start watching the executable for updates
|
||||||
|
Loading…
x
Reference in New Issue
Block a user