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

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())
{
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;
}

View file

@ -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);