Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
  • Loading branch information
Ryex and Scrumplex committed Jan 13, 2023
1 parent 574af2c commit f7b0ba8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion launcher/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}

Expand Down
6 changes: 2 additions & 4 deletions launcher/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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;
}
Expand Down

0 comments on commit f7b0ba8

Please sign in to comment.