aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.h
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/Application.h')
-rw-r--r--launcher/Application.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/launcher/Application.h b/launcher/Application.h
index 172321c0..e3b4fced 100644
--- a/launcher/Application.h
+++ b/launcher/Application.h
@@ -94,6 +94,8 @@ public:
Application(int &argc, char **argv);
virtual ~Application();
+ bool event(QEvent* event) override;
+
std::shared_ptr<SettingsObject> settings() const {
return m_settings;
}
@@ -152,9 +154,16 @@ public:
shared_qobject_ptr<Meta::Index> metadataIndex();
- QString getJarsPath();
+ /*!
+ * Finds and returns the full path to a jar file.
+ * Returns a null-string if it could not be found.
+ */
+ QString getJarPath(QString jarFile);
QString getMSAClientID();
+ QString getCurseKey();
+ QString getUserAgent();
+ QString getUserAgentUncached();
/// this is the root of the 'installation'. Used for automatic updates
const QString &root() {
@@ -180,6 +189,10 @@ signals:
void globalSettingsAboutToOpen();
void globalSettingsClosed();
+#ifdef Q_OS_MACOS
+ void clickedOnDock();
+#endif
+
public slots:
bool launch(
InstancePtr instance,
@@ -229,7 +242,6 @@ private:
std::shared_ptr<GenericPageProvider> m_globalSettingsProvider;
std::map<QString, std::unique_ptr<ITheme>> m_themes;
std::unique_ptr<MCEditTool> m_mcedit;
- QString m_jarsPath;
QSet<QString> m_features;
QMap<QString, std::shared_ptr<BaseProfilerFactory>> m_profilers;
@@ -237,6 +249,10 @@ private:
QString m_rootPath;
Status m_status = Application::StartingUp;
+#ifdef Q_OS_MACOS
+ Qt::ApplicationState m_prevAppState = Qt::ApplicationInactive;
+#endif
+
#if defined Q_OS_WIN32
// used on Windows to attach the standard IO streams
bool consoleAttached = false;