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 int run() = 0;
|
||||
virtual void startNode() = 0;
|
||||
virtual std::vector<std::string> getKeyboardLayoutList() = 0;
|
||||
virtual std::string getCurrentLanguageCode() = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ int ClientApp::mainLoop()
|
|||
setSocketMultiplexer(std::make_unique<SocketMultiplexer>());
|
||||
|
||||
// start client, etc
|
||||
appUtil().startNode();
|
||||
startNode();
|
||||
|
||||
// run event loop. if startClient() failed we're supposed to retry
|
||||
// later. the timer installed by startClient() will take care of
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ int ServerApp::mainLoop()
|
|||
|
||||
// start server, etc
|
||||
try {
|
||||
appUtil().startNode();
|
||||
startNode();
|
||||
} catch (...) {
|
||||
// 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.
|
||||
|
|
|
|||
|
|
@ -34,11 +34,6 @@ int AppUtilUnix::run()
|
|||
return app().runInner(&startStatic);
|
||||
}
|
||||
|
||||
void AppUtilUnix::startNode()
|
||||
{
|
||||
app().startNode();
|
||||
}
|
||||
|
||||
std::vector<std::string> AppUtilUnix::getKeyboardLayoutList()
|
||||
{
|
||||
std::vector<std::string> layoutLangCodes;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ public:
|
|||
~AppUtilUnix() override = default;
|
||||
|
||||
int run() override;
|
||||
void startNode() override;
|
||||
std::vector<std::string> getKeyboardLayoutList() override;
|
||||
std::string getCurrentLanguageCode() override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -126,11 +126,6 @@ AppUtilWindows &AppUtilWindows::instance()
|
|||
return (AppUtilWindows &)AppUtil::instance();
|
||||
}
|
||||
|
||||
void AppUtilWindows::startNode()
|
||||
{
|
||||
app().startNode();
|
||||
}
|
||||
|
||||
std::vector<std::string> AppUtilWindows::getKeyboardLayoutList()
|
||||
{
|
||||
std::vector<std::string> layoutLangCodes;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ public:
|
|||
int daemonNTMainLoop();
|
||||
int run() override;
|
||||
void exitApp(int code) override;
|
||||
void startNode() override;
|
||||
std::vector<std::string> getKeyboardLayoutList() override;
|
||||
std::string getCurrentLanguageCode() override;
|
||||
HKL getCurrentKeyboardLayout() const;
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@ public:
|
|||
return 0;
|
||||
}
|
||||
|
||||
void startNode() override
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::string> getKeyboardLayoutList() override
|
||||
{
|
||||
return {"en"};
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@ public:
|
|||
return 0;
|
||||
}
|
||||
|
||||
void startNode() override
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<std::string> getKeyboardLayoutList() override
|
||||
{
|
||||
return {"en"};
|
||||
|
|
|
|||
Loading…
Reference in a new issue