mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Attempt at fixing #1187
This commit is contained in:
parent
2aabba2d38
commit
41d8e2dd53
|
@ -55,6 +55,11 @@ void Nexus::start()
|
|||
qRegisterMetaType<ToxFile::FileDirection>("ToxFile::FileDirection");
|
||||
qRegisterMetaType<Core::PasswordType>("Core::PasswordType");
|
||||
|
||||
// Create GUI
|
||||
#ifndef Q_OS_ANDROID
|
||||
widget = Widget::getInstance();
|
||||
#endif
|
||||
|
||||
// Create Core
|
||||
QString profilePath = Settings::getInstance().detectProfile();
|
||||
coreThread = new QThread(this);
|
||||
|
@ -68,7 +73,7 @@ void Nexus::start()
|
|||
androidgui = new AndroidGUI;
|
||||
androidgui->show();
|
||||
#else
|
||||
widget = Widget::getInstance();
|
||||
widget->init();
|
||||
#endif
|
||||
GUI::getInstance();
|
||||
|
||||
|
|
|
@ -300,10 +300,7 @@ Widget* Widget::getInstance()
|
|||
assert(IS_ON_DESKTOP_GUI); // Widget must only be used on Desktop platforms
|
||||
|
||||
if (!instance)
|
||||
{
|
||||
instance = new Widget();
|
||||
instance->init();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ class Widget : public QMainWindow
|
|||
|
||||
public:
|
||||
explicit Widget(QWidget *parent = 0);
|
||||
void init();
|
||||
void setCentralWidget(QWidget *widget, const QString &widgetName);
|
||||
QString getUsername();
|
||||
Camera* getCamera();
|
||||
|
@ -135,7 +136,6 @@ private slots:
|
|||
void processOfflineMsgs();
|
||||
|
||||
private:
|
||||
void init();
|
||||
void hideMainForms();
|
||||
virtual bool event(QEvent * e);
|
||||
Group* createGroup(int groupId);
|
||||
|
|
Loading…
Reference in New Issue
Block a user