mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Initialize logger at the beginning of program to avoid threading issues.
This commit is contained in:
parent
087417c8a6
commit
061e71337b
1 changed files with 3 additions and 0 deletions
|
@ -74,6 +74,7 @@ Q_IMPORT_PLUGIN(qico)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
|
#include "logger.h"
|
||||||
|
|
||||||
class MessagesCollector : public QObject
|
class MessagesCollector : public QObject
|
||||||
{
|
{
|
||||||
|
@ -143,6 +144,8 @@ QBtCommandLineParameters parseCommandLine();
|
||||||
// Main
|
// Main
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
//Initialize logger singleton here to avoid threading issues
|
||||||
|
Logger::instance()->addMessage(QObject::tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(VERSION));
|
||||||
// We must save it here because QApplication constructor may change it
|
// We must save it here because QApplication constructor may change it
|
||||||
bool isOneArg = (argc == 2);
|
bool isOneArg = (argc == 2);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue