diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-07 17:55:25 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-07 20:16:27 -0500 |
| commit | 1b7384f7cb3dc32063e588c174265b8c46cfa629 (patch) | |
| tree | 0cf6e177f409f0496b8e73a42819e01a1f829734 /src/moapplication.h | |
| parent | 079fd33cf18cc901d1a6a4463d8a8ccd1d730786 (diff) | |
moved most of the stuff from main.cpp into MOApplication
Diffstat (limited to 'src/moapplication.h')
| -rw-r--r-- | src/moapplication.h | 20 |
1 files changed, 17 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>. #include <QFileSystemWatcher>
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();
};
|
