From b88fb43acc6298cf464d2ac242b6310067759571 Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 3 Jan 2020 19:40:16 +0100 Subject: [PATCH] Minor cleanup in InstallPkg and InstallPup --- rpcs3/rpcs3qt/main_window.cpp | 10 +++------- rpcs3/rpcs3qt/main_window.h | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index d87013dae..b8b0207aa 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -370,10 +370,8 @@ void main_window::BootRsxCapture(std::string path) } } -bool main_window::InstallPkg(const QString& dropPath, bool show_confirm, bool show_success) +bool main_window::InstallPkg(QString filePath, bool show_confirm, bool show_success) { - QString filePath = dropPath; - if (filePath.isEmpty()) { QString path_last_PKG = guiSettings->GetValue(gui::fd_install_pkg).toString(); @@ -463,10 +461,8 @@ bool main_window::InstallPkg(const QString& dropPath, bool show_confirm, bool sh return false; } -void main_window::InstallPup(const QString& dropPath) +void main_window::InstallPup(QString filePath) { - QString filePath = dropPath; - if (filePath.isEmpty()) { QString path_last_PUP = guiSettings->GetValue(gui::fd_install_pup).toString(); @@ -482,7 +478,7 @@ void main_window::InstallPup(const QString& dropPath) } } - if (filePath == NULL) + if (filePath.isEmpty()) { return; } diff --git a/rpcs3/rpcs3qt/main_window.h b/rpcs3/rpcs3qt/main_window.h index 952db038e..c66a52537 100644 --- a/rpcs3/rpcs3qt/main_window.h +++ b/rpcs3/rpcs3qt/main_window.h @@ -116,8 +116,8 @@ private: void CreateDockWindows(); void EnableMenus(bool enabled); void ShowTitleBars(bool show); - bool InstallPkg(const QString& dropPath = "", bool show_confirm = true, bool show_success = true); - void InstallPup(const QString& dropPath = ""); + bool InstallPkg(QString filePath = "", bool show_confirm = true, bool show_success = true); + void InstallPup(QString filePath = ""); int IsValidFile(const QMimeData& md, QStringList* dropPaths = nullptr); void AddGamesFromDir(const QString& path);