aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-02-16 03:31:04 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-03-20 14:56:33 -0700
commite0ef86340f72ce508034815f1c5f8c695d31140d (patch)
treefe1343c65694f15576738f3a45109118f966bc17 /launcher/ui/dialogs
parent1ca2c59f2ed7739b4b7d50c7212e292a4432da93 (diff)
downloadPrismLauncher-e0ef86340f72ce508034815f1c5f8c695d31140d.tar.gz
PrismLauncher-e0ef86340f72ce508034815f1c5f8c695d31140d.tar.bz2
PrismLauncher-e0ef86340f72ce508034815f1c5f8c695d31140d.zip
feat: connect new help button help-pages/instance-copy
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r--launcher/ui/dialogs/CopyInstanceDialog.cpp11
-rw-r--r--launcher/ui/dialogs/CopyInstanceDialog.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/launcher/ui/dialogs/CopyInstanceDialog.cpp b/launcher/ui/dialogs/CopyInstanceDialog.cpp
index 495e98e9..62c0bb39 100644
--- a/launcher/ui/dialogs/CopyInstanceDialog.cpp
+++ b/launcher/ui/dialogs/CopyInstanceDialog.cpp
@@ -37,6 +37,7 @@
#include <QPushButton>
#include "Application.h"
+#include "BuildConfig.h"
#include "CopyInstanceDialog.h"
#include "ui_CopyInstanceDialog.h"
@@ -47,6 +48,7 @@
#include "BaseInstance.h"
#include "InstanceList.h"
#include "FileSystem.h"
+#include "DesktopServices.h"
CopyInstanceDialog::CopyInstanceDialog(InstancePtr original, QWidget *parent)
:QDialog(parent), ui(new Ui::CopyInstanceDialog), m_original(original)
@@ -114,6 +116,9 @@ CopyInstanceDialog::CopyInstanceDialog(InstancePtr original, QWidget *parent)
updateLinkOptions();
updateUseCloneCheckbox();
+
+ auto HelpButton = ui->buttonBox->button(QDialogButtonBox::Help);
+ connect(HelpButton, &QPushButton::clicked, this, &CopyInstanceDialog::help);
}
@@ -157,6 +162,12 @@ const InstanceCopyPrefs& CopyInstanceDialog::getChosenOptions() const
return m_selectedOptions;
}
+
+void CopyInstanceDialog::help()
+{
+ DesktopServices::openUrl(QUrl(BuildConfig.HELP_URL.arg("instance-copy")));
+}
+
void CopyInstanceDialog::checkAllCheckboxes(const bool& b)
{
ui->keepPlaytimeCheckbox->setChecked(b);
diff --git a/launcher/ui/dialogs/CopyInstanceDialog.h b/launcher/ui/dialogs/CopyInstanceDialog.h
index 2dea3795..c447bee9 100644
--- a/launcher/ui/dialogs/CopyInstanceDialog.h
+++ b/launcher/ui/dialogs/CopyInstanceDialog.h
@@ -42,6 +42,9 @@ public:
QString iconKey() const;
const InstanceCopyPrefs& getChosenOptions() const;
+public slots:
+ void help();
+
private
slots:
void on_iconButton_clicked();