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<ToxFile::FileDirection>("ToxFile::FileDirection");
|
||||||
qRegisterMetaType<Core::PasswordType>("Core::PasswordType");
|
qRegisterMetaType<Core::PasswordType>("Core::PasswordType");
|
||||||
|
|
||||||
|
// Create GUI
|
||||||
|
#ifndef Q_OS_ANDROID
|
||||||
|
widget = Widget::getInstance();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Create Core
|
// Create Core
|
||||||
QString profilePath = Settings::getInstance().detectProfile();
|
QString profilePath = Settings::getInstance().detectProfile();
|
||||||
coreThread = new QThread(this);
|
coreThread = new QThread(this);
|
||||||
|
@ -68,7 +73,7 @@ void Nexus::start()
|
||||||
androidgui = new AndroidGUI;
|
androidgui = new AndroidGUI;
|
||||||
androidgui->show();
|
androidgui->show();
|
||||||
#else
|
#else
|
||||||
widget = Widget::getInstance();
|
widget->init();
|
||||||
#endif
|
#endif
|
||||||
GUI::getInstance();
|
GUI::getInstance();
|
||||||
|
|
||||||
|
|
|
@ -300,10 +300,7 @@ Widget* Widget::getInstance()
|
||||||
assert(IS_ON_DESKTOP_GUI); // Widget must only be used on Desktop platforms
|
assert(IS_ON_DESKTOP_GUI); // Widget must only be used on Desktop platforms
|
||||||
|
|
||||||
if (!instance)
|
if (!instance)
|
||||||
{
|
|
||||||
instance = new Widget();
|
instance = new Widget();
|
||||||
instance->init();
|
|
||||||
}
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ class Widget : public QMainWindow
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Widget(QWidget *parent = 0);
|
explicit Widget(QWidget *parent = 0);
|
||||||
|
void init();
|
||||||
void setCentralWidget(QWidget *widget, const QString &widgetName);
|
void setCentralWidget(QWidget *widget, const QString &widgetName);
|
||||||
QString getUsername();
|
QString getUsername();
|
||||||
Camera* getCamera();
|
Camera* getCamera();
|
||||||
|
@ -135,7 +136,6 @@ private slots:
|
||||||
void processOfflineMsgs();
|
void processOfflineMsgs();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init();
|
|
||||||
void hideMainForms();
|
void hideMainForms();
|
||||||
virtual bool event(QEvent * e);
|
virtual bool event(QEvent * e);
|
||||||
Group* createGroup(int groupId);
|
Group* createGroup(int groupId);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user