Minor cleanup in InstallPkg and InstallPup

This commit is contained in:
Silent
2020-01-03 19:40:16 +01:00
committed by Megamouse
parent e7ddc5187a
commit b88fb43acc
2 changed files with 5 additions and 9 deletions
+3 -7
View File
@@ -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()) if (filePath.isEmpty())
{ {
QString path_last_PKG = guiSettings->GetValue(gui::fd_install_pkg).toString(); 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; return false;
} }
void main_window::InstallPup(const QString& dropPath) void main_window::InstallPup(QString filePath)
{ {
QString filePath = dropPath;
if (filePath.isEmpty()) if (filePath.isEmpty())
{ {
QString path_last_PUP = guiSettings->GetValue(gui::fd_install_pup).toString(); 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; return;
} }
+2 -2
View File
@@ -116,8 +116,8 @@ private:
void CreateDockWindows(); void CreateDockWindows();
void EnableMenus(bool enabled); void EnableMenus(bool enabled);
void ShowTitleBars(bool show); void ShowTitleBars(bool show);
bool InstallPkg(const QString& dropPath = "", bool show_confirm = true, bool show_success = true); bool InstallPkg(QString filePath = "", bool show_confirm = true, bool show_success = true);
void InstallPup(const QString& dropPath = ""); void InstallPup(QString filePath = "");
int IsValidFile(const QMimeData& md, QStringList* dropPaths = nullptr); int IsValidFile(const QMimeData& md, QStringList* dropPaths = nullptr);
void AddGamesFromDir(const QString& path); void AddGamesFromDir(const QString& path);