From 1b7384f7cb3dc32063e588c174265b8c46cfa629 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sat, 7 Nov 2020 17:55:25 -0500 Subject: moved most of the stuff from main.cpp into MOApplication --- src/moapplication.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/moapplication.h') diff --git a/src/moapplication.h b/src/moapplication.h index 0ee04492..c1512d9b 100644 --- a/src/moapplication.h +++ b/src/moapplication.h @@ -24,15 +24,21 @@ along with Mod Organizer. If not, see . #include class Settings; +class SingleInstance; +class Instance; + namespace MOBase { class IPluginGame; } +namespace cl { class CommandLine; } class MOApplication : public QApplication { Q_OBJECT public: - static MOApplication create(int& argc, char** argv); - virtual bool notify (QObject* receiver, QEvent* event); + MOApplication(cl::CommandLine& cl, int& argc, char** argv); + + int run(SingleInstance& si); + virtual bool notify(QObject* receiver, QEvent* event); public slots: bool setStyleFile(const QString& style); @@ -43,8 +49,16 @@ private slots: private: QFileSystemWatcher m_StyleWatcher; QString m_DefaultStyle; + cl::CommandLine& m_cl; + + int doOneRun(SingleInstance& singleInstance); + + int runApplication( + SingleInstance& singleInstance, + const QString &dataPath, Instance& currentInstance); - MOApplication(int& argc, char** argv); + void purgeOldFiles(); + void resetForRestart(); }; -- cgit v1.3.1