Use singleton to pass edit/reply content to chatbox
This significantly reduce the complexity of everything.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "userdirectorylistmodel.h"
|
||||
#include "userlistmodel.h"
|
||||
#include "actionshandler.h"
|
||||
#include "chatboxhelper.h"
|
||||
|
||||
using namespace Quotient;
|
||||
|
||||
@@ -108,12 +109,14 @@ int main(int argc, char *argv[])
|
||||
FileTypeSingleton fileTypeSingleton;
|
||||
|
||||
Login *login = new Login();
|
||||
ChatBoxHelper chatBoxHelper;
|
||||
|
||||
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Controller", &Controller::instance());
|
||||
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Clipboard", &clipboard);
|
||||
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Config", config);
|
||||
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "FileType", &fileTypeSingleton);
|
||||
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "LoginHelper", login);
|
||||
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "ChatBoxHelper", &chatBoxHelper);
|
||||
qmlRegisterType<AccountListModel>("org.kde.neochat", 1, 0, "AccountListModel");
|
||||
qmlRegisterType<ActionsHandler>("org.kde.neochat", 1, 0, "ActionsHandler");
|
||||
qmlRegisterType<ChatDocumentHandler>("org.kde.neochat", 1, 0, "ChatDocumentHandler");
|
||||
|
||||
Reference in New Issue
Block a user