diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:36:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-09 17:36:03 +0200 |
| commit | ef94aee28464039672b277243a0181ae93550d6c (patch) | |
| tree | 0575a68af5f154e9d6d0738edbaefb16a11d6f5c /src/forcedloaddialogwidget.cpp | |
| parent | 7d6cb8528d20e36a4cee822263865ee2f7f32481 (diff) | |
| parent | 3de050e9c03e553f7ae3f780f6bd080a30ae123e (diff) | |
Merge pull request #1839 from Holt59/ci/initial-gh-action-for-build
Clang-Format + Github Workflow
Diffstat (limited to 'src/forcedloaddialogwidget.cpp')
| -rw-r--r-- | src/forcedloaddialogwidget.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/forcedloaddialogwidget.cpp b/src/forcedloaddialogwidget.cpp index b84f785f..c2e44437 100644 --- a/src/forcedloaddialogwidget.cpp +++ b/src/forcedloaddialogwidget.cpp @@ -1,22 +1,20 @@ #include "forcedloaddialogwidget.h" -#include "ui_forcedloaddialogwidget.h" #include "executableinfo.h" -#include <log.h> +#include "ui_forcedloaddialogwidget.h" #include <QFileDialog> +#include <log.h> using namespace MOBase; -ForcedLoadDialogWidget::ForcedLoadDialogWidget(const IPluginGame *game, QWidget *parent) : - QWidget(parent), - ui(new Ui::ForcedLoadDialogWidget), - m_GamePlugin(game) +ForcedLoadDialogWidget::ForcedLoadDialogWidget(const IPluginGame* game, QWidget* parent) + : QWidget(parent), ui(new Ui::ForcedLoadDialogWidget), m_GamePlugin(game) { - ui->setupUi(this); + ui->setupUi(this); } ForcedLoadDialogWidget::~ForcedLoadDialogWidget() { - delete ui; + delete ui; } bool ForcedLoadDialogWidget::getEnabled() @@ -53,12 +51,12 @@ void ForcedLoadDialogWidget::setForced(bool forced) ui->processEdit->setEnabled(!forced); } -void ForcedLoadDialogWidget::setLibraryPath(const QString &path) +void ForcedLoadDialogWidget::setLibraryPath(const QString& path) { ui->libraryPathEdit->setText(path); } -void ForcedLoadDialogWidget::setProcess(const QString &name) +void ForcedLoadDialogWidget::setProcess(const QString& name) { ui->processEdit->setText(name); } @@ -72,11 +70,13 @@ void ForcedLoadDialogWidget::on_libraryPathBrowseButton_clicked() { QDir gameDir(m_GamePlugin->gameDirectory()); QString startPath = gameDir.absolutePath(); - QString result = QFileDialog::getOpenFileName(nullptr, "Select a library...", startPath, "Dynamic link library (*.dll)", nullptr, QFileDialog::ReadOnly); + QString result = QFileDialog::getOpenFileName( + nullptr, "Select a library...", startPath, "Dynamic link library (*.dll)", + nullptr, QFileDialog::ReadOnly); if (!result.isEmpty()) { QFileInfo fileInfo(result); QString relativePath = gameDir.relativeFilePath(fileInfo.filePath()); - QString filePath = fileInfo.filePath(); + QString filePath = fileInfo.filePath(); if (!relativePath.startsWith("..")) { filePath = relativePath; } @@ -93,7 +93,9 @@ void ForcedLoadDialogWidget::on_processBrowseButton_clicked() { QDir gameDir(m_GamePlugin->gameDirectory()); QString startPath = gameDir.absolutePath(); - QString result = QFileDialog::getOpenFileName(nullptr, "Select a process...", startPath, "Executable (*.exe)", nullptr, QFileDialog::ReadOnly); + QString result = QFileDialog::getOpenFileName(nullptr, "Select a process...", + startPath, "Executable (*.exe)", + nullptr, QFileDialog::ReadOnly); if (!result.isEmpty()) { QFileInfo fileInfo(result); QString fileName = fileInfo.fileName(); |
