1
0
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:
tux3 2015-02-18 21:22:03 +01:00
parent 2aabba2d38
commit 41d8e2dd53
3 changed files with 7 additions and 5 deletions

View File

@ -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();

View File

@ -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;
}

View File

@ -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);