diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-01-13 13:11:20 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-01-13 13:15:13 -0700 |
commit | f7b0ba88da5895a48e9d5f1adda223a8fb0f4c32 (patch) | |
tree | f0334cc1325e346a5dcbb27de554979092d02461 | |
parent | 574af2c795a19246c18e5f07a49d6d41f5670a6e (diff) | |
download | PrismLauncher-f7b0ba88da5895a48e9d5f1adda223a8fb0f4c32.tar.gz PrismLauncher-f7b0ba88da5895a48e9d5f1adda223a8fb0f4c32.tar.bz2 PrismLauncher-f7b0ba88da5895a48e9d5f1adda223a8fb0f4c32.zip |
Apply suggestions from code review
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
-rw-r--r-- | launcher/Application.cpp | 3 | ||||
-rw-r--r-- | launcher/ui/MainWindow.cpp | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 19d6d3c2..8d7ff044 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -266,7 +266,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) m_zipsToImport.append(QUrl::fromLocalFile(QFileInfo(zip_path).absoluteFilePath())); } - for (auto zip_path : parser.positionalArguments()){ // treat unspesified positional arguments as import urls + // treat unspecified positional arguments as import urls + for (auto zip_path : parser.positionalArguments()) { m_zipsToImport.append(QUrl::fromLocalFile(QFileInfo(zip_path).absoluteFilePath())); } diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index d5aa4c1a..1a2b1497 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -1816,7 +1816,7 @@ void MainWindow::processURLs(QList<QUrl> urls) { // NOTE: This loop only processes one dropped file! for (auto& url : urls) { - qDebug() << "Processing :" << url; + qDebug() << "Processing" << url; // The isLocalFile() check below doesn't work as intended without an explicit scheme. if (url.scheme().isEmpty()) @@ -1832,9 +1832,7 @@ void MainWindow::processURLs(QList<QUrl> urls) auto type = ResourceUtils::identify(localFileInfo); - // bool is_resource = type; - - if (!(ResourceUtils::ValidResourceTypes.count(type) > 0)) { // probably instance/modpack + if (ResourceUtils::ValidResourceTypes.count(type) == 0) { // probably instance/modpack addInstance(localFileName); continue; } |