refactor: App::run remove unused args
This commit is contained in:
@ -89,10 +89,10 @@ int main(int argc, char **argv)
|
||||
|
||||
if (parser.serverMode()) {
|
||||
ServerApp app(&events, processName);
|
||||
return app.run(argc, argv);
|
||||
return app.run();
|
||||
} else if (parser.clientMode()) {
|
||||
ClientApp app(&events, processName);
|
||||
return app.run(argc, argv);
|
||||
return app.run();
|
||||
}
|
||||
|
||||
return s_exitSuccess;
|
||||
|
||||
@ -62,7 +62,7 @@ App::~App()
|
||||
s_instance = nullptr;
|
||||
}
|
||||
|
||||
int App::run(int argc, char **argv)
|
||||
int App::run()
|
||||
{
|
||||
#if MAC_OS_X_VERSION_10_7
|
||||
// dock hide only supported on lion :(
|
||||
@ -83,7 +83,7 @@ int App::run(int argc, char **argv)
|
||||
int result = s_exitFailed;
|
||||
|
||||
try {
|
||||
result = appUtil().run(argc, argv);
|
||||
result = appUtil().run();
|
||||
} catch (ExitAppException &e) {
|
||||
// instead of showing a nasty error, just exit with the error code.
|
||||
// not sure if i like this behaviour, but it's probably better than
|
||||
|
||||
@ -75,9 +75,8 @@ public:
|
||||
return m_appUtil;
|
||||
}
|
||||
|
||||
int run(int argc, char **argv);
|
||||
int run();
|
||||
int daemonMainLoop(int, const char **);
|
||||
|
||||
void setupFileLogging();
|
||||
void loggingFilterWarning() const;
|
||||
void initApp() override;
|
||||
|
||||
@ -34,7 +34,7 @@ public:
|
||||
}
|
||||
|
||||
// Virtual Methods subclasses can impliment
|
||||
virtual int run(int argc, char **argv) = 0;
|
||||
virtual int run() = 0;
|
||||
virtual void startNode() = 0;
|
||||
virtual std::vector<std::string> getKeyboardLayoutList() = 0;
|
||||
virtual std::string getCurrentLanguageCode() = 0;
|
||||
|
||||
@ -31,7 +31,7 @@ int startStatic()
|
||||
return AppUtil::instance().app().start();
|
||||
}
|
||||
|
||||
int AppUtilUnix::run(int argc, char **argv)
|
||||
int AppUtilUnix::run()
|
||||
{
|
||||
return app().runInner(&startStatic);
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ public:
|
||||
explicit AppUtilUnix(const IEventQueue *);
|
||||
~AppUtilUnix() override = default;
|
||||
|
||||
int run(int argc, char **argv) override;
|
||||
int run() override;
|
||||
void startNode() override;
|
||||
std::vector<std::string> getKeyboardLayoutList() override;
|
||||
std::string getCurrentLanguageCode() override;
|
||||
|
||||
@ -102,7 +102,7 @@ static int foregroundStartupStatic(int argc, char **argv)
|
||||
return AppUtil::instance().app().start();
|
||||
}
|
||||
|
||||
int AppUtilWindows::run(int argc, char **argv)
|
||||
int AppUtilWindows::run()
|
||||
{
|
||||
if (!IsWindowsXPSP3OrGreater()) {
|
||||
throw std::runtime_error("unsupported os version, xp sp3 or greater required");
|
||||
@ -121,7 +121,7 @@ int AppUtilWindows::run(int argc, char **argv)
|
||||
startup = &foregroundStartupStatic;
|
||||
}
|
||||
|
||||
return app().runInner(argc, argv, startup);
|
||||
return app().runInner(startup);
|
||||
}
|
||||
|
||||
AppUtilWindows &AppUtilWindows::instance()
|
||||
|
||||
@ -36,7 +36,7 @@ public:
|
||||
|
||||
int daemonNTStartup();
|
||||
int daemonNTMainLoop();
|
||||
int run(int argc, char **argv) override;
|
||||
int run() override;
|
||||
void exitApp(int code) override;
|
||||
void startNode() override;
|
||||
std::vector<std::string> getKeyboardLayoutList() override;
|
||||
|
||||
Reference in New Issue
Block a user