Changeset View
Changeset View
Standalone View
Standalone View
host/main.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 38 | { | |||
---|---|---|---|---|---|
51 | } | 51 | } | ||
52 | data[QStringLiteral("payload")] = QJsonObject({{QStringLiteral("message"), msg}}); | 52 | data[QStringLiteral("payload")] = QJsonObject({{QStringLiteral("message"), msg}}); | ||
53 | 53 | | |||
54 | Connection::self()->sendData(data); | 54 | Connection::self()->sendData(data); | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | int main(int argc, char *argv[]) | 57 | int main(int argc, char *argv[]) | ||
58 | { | 58 | { | ||
59 | qInstallMessageHandler(msgHandler); | | |||
60 | | ||||
61 | // otherwise when logging out, session manager will ask the host to quit | 59 | // otherwise when logging out, session manager will ask the host to quit | ||
62 | // (it's a "regular X app" after all) and then the browser will complain | 60 | // (it's a "regular X app" after all) and then the browser will complain | ||
63 | qunsetenv("SESSION_MANAGER"); | 61 | qunsetenv("SESSION_MANAGER"); | ||
64 | 62 | | |||
65 | QApplication a(argc, argv); | 63 | QApplication a(argc, argv); | ||
66 | // otherwise will close when download job finishes | 64 | // otherwise will close when download job finishes | ||
67 | a.setQuitOnLastWindowClosed(false); | 65 | a.setQuitOnLastWindowClosed(false); | ||
68 | // applicationName etc will be set in Settings once the browser identifies to us | 66 | // applicationName etc will be set in Settings once the browser identifies to us | ||
69 | 67 | | |||
68 | qInstallMessageHandler(msgHandler); | ||||
69 | | ||||
70 | // NOTE if you add a new plugin here, make sure to adjust the | 70 | // NOTE if you add a new plugin here, make sure to adjust the | ||
71 | // "DEFAULT_EXTENSION_SETTINGS" in constants.js or else it won't | 71 | // "DEFAULT_EXTENSION_SETTINGS" in constants.js or else it won't | ||
72 | // even bother loading your shiny new plugin! | 72 | // even bother loading your shiny new plugin! | ||
73 | QList<AbstractBrowserPlugin*> m_plugins; | 73 | QList<AbstractBrowserPlugin*> m_plugins; | ||
74 | m_plugins << &Settings::self(); | 74 | m_plugins << &Settings::self(); | ||
75 | m_plugins << new KDEConnectPlugin(&a); | 75 | m_plugins << new KDEConnectPlugin(&a); | ||
76 | m_plugins << new DownloadPlugin(&a); | 76 | m_plugins << new DownloadPlugin(&a); | ||
77 | m_plugins << new TabsRunnerPlugin(&a); | 77 | m_plugins << new TabsRunnerPlugin(&a); | ||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |