refactor: don't route startNode through AppUtil
This commit is contained in:
parent
5845b3edb5
commit
8cdf735925
9 changed files with 2 additions and 23 deletions
|
|
@ -35,7 +35,6 @@ public:
|
||||||
|
|
||||||
// Virtual Methods subclasses can impliment
|
// Virtual Methods subclasses can impliment
|
||||||
virtual int run() = 0;
|
virtual int run() = 0;
|
||||||
virtual void startNode() = 0;
|
|
||||||
virtual std::vector<std::string> getKeyboardLayoutList() = 0;
|
virtual std::vector<std::string> getKeyboardLayoutList() = 0;
|
||||||
virtual std::string getCurrentLanguageCode() = 0;
|
virtual std::string getCurrentLanguageCode() = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ int ClientApp::mainLoop()
|
||||||
setSocketMultiplexer(std::make_unique<SocketMultiplexer>());
|
setSocketMultiplexer(std::make_unique<SocketMultiplexer>());
|
||||||
|
|
||||||
// start client, etc
|
// start client, etc
|
||||||
appUtil().startNode();
|
startNode();
|
||||||
|
|
||||||
// run event loop. if startClient() failed we're supposed to retry
|
// run event loop. if startClient() failed we're supposed to retry
|
||||||
// later. the timer installed by startClient() will take care of
|
// later. the timer installed by startClient() will take care of
|
||||||
|
|
|
||||||
|
|
@ -517,7 +517,7 @@ int ServerApp::mainLoop()
|
||||||
|
|
||||||
// start server, etc
|
// start server, etc
|
||||||
try {
|
try {
|
||||||
appUtil().startNode();
|
startNode();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
// a fatal startup failure exits by throwing, skipping the cleanup below;
|
// a fatal startup failure exits by throwing, skipping the cleanup below;
|
||||||
// tear down here so the screen's worker threads don't outlive the app.
|
// tear down here so the screen's worker threads don't outlive the app.
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,6 @@ int AppUtilUnix::run()
|
||||||
return app().runInner(&startStatic);
|
return app().runInner(&startStatic);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppUtilUnix::startNode()
|
|
||||||
{
|
|
||||||
app().startNode();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> AppUtilUnix::getKeyboardLayoutList()
|
std::vector<std::string> AppUtilUnix::getKeyboardLayoutList()
|
||||||
{
|
{
|
||||||
std::vector<std::string> layoutLangCodes;
|
std::vector<std::string> layoutLangCodes;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ public:
|
||||||
~AppUtilUnix() override = default;
|
~AppUtilUnix() override = default;
|
||||||
|
|
||||||
int run() override;
|
int run() override;
|
||||||
void startNode() override;
|
|
||||||
std::vector<std::string> getKeyboardLayoutList() override;
|
std::vector<std::string> getKeyboardLayoutList() override;
|
||||||
std::string getCurrentLanguageCode() override;
|
std::string getCurrentLanguageCode() override;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -126,11 +126,6 @@ AppUtilWindows &AppUtilWindows::instance()
|
||||||
return (AppUtilWindows &)AppUtil::instance();
|
return (AppUtilWindows &)AppUtil::instance();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppUtilWindows::startNode()
|
|
||||||
{
|
|
||||||
app().startNode();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> AppUtilWindows::getKeyboardLayoutList()
|
std::vector<std::string> AppUtilWindows::getKeyboardLayoutList()
|
||||||
{
|
{
|
||||||
std::vector<std::string> layoutLangCodes;
|
std::vector<std::string> layoutLangCodes;
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ public:
|
||||||
int daemonNTMainLoop();
|
int daemonNTMainLoop();
|
||||||
int run() override;
|
int run() override;
|
||||||
void exitApp(int code) override;
|
void exitApp(int code) override;
|
||||||
void startNode() override;
|
|
||||||
std::vector<std::string> getKeyboardLayoutList() override;
|
std::vector<std::string> getKeyboardLayoutList() override;
|
||||||
std::string getCurrentLanguageCode() override;
|
std::string getCurrentLanguageCode() override;
|
||||||
HKL getCurrentKeyboardLayout() const;
|
HKL getCurrentKeyboardLayout() const;
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,6 @@ public:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void startNode() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> getKeyboardLayoutList() override
|
std::vector<std::string> getKeyboardLayoutList() override
|
||||||
{
|
{
|
||||||
return {"en"};
|
return {"en"};
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,6 @@ public:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void startNode() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> getKeyboardLayoutList() override
|
std::vector<std::string> getKeyboardLayoutList() override
|
||||||
{
|
{
|
||||||
return {"en"};
|
return {"en"};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue