mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
FEATURE: Added program option to disable splash screen
This commit is contained in:
parent
e423285d88
commit
b00eeef04d
32 changed files with 2913 additions and 2633 deletions
|
@ -116,6 +116,7 @@ void useStyle(QApplication *app, int style){
|
|||
int main(int argc, char *argv[]){
|
||||
QFile file;
|
||||
QString locale;
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
bool no_splash = false;
|
||||
if(argc > 1){
|
||||
if(QString::fromUtf8(argv[1]) == QString::fromUtf8("--version")){
|
||||
|
@ -134,11 +135,13 @@ int main(int argc, char *argv[]){
|
|||
no_splash = true;
|
||||
}
|
||||
}
|
||||
if(settings.value(QString::fromUtf8("Preferences/General/NoSplashScreen"), false).toBool()) {
|
||||
no_splash = true;
|
||||
}
|
||||
// Set environment variable
|
||||
if(putenv((char*)"QBITTORRENT="VERSION)) {
|
||||
std::cerr << "Couldn't set environment variable...\n";
|
||||
}
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
//Check if there is another instance running
|
||||
#ifdef QT_4_4
|
||||
QLocalSocket localSocket;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue