Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Jan 30, 2024
1 parent f10f746 commit 72c3c2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,8 @@ void MainWindow::loadAddon(Settings &settings, const QString &filesDir, const QS
const QString addonFilePath = fromNativePath(ProjectFile::getAddonFilePath(filesDir, addon));

picojson::object obj;
if (addonFilePath.isEmpty()) // Ensure there will be "fileNotFound" errors
if (addonFilePath.isEmpty())
// Addon not found => add data to addons and addonInfos so that fileNotFound error(s) are reported during analysis
obj["script"] = picojson::value(addon.toStdString());
else {
obj["script"] = picojson::value(addonFilePath.toStdString());
Expand All @@ -936,6 +937,7 @@ void MainWindow::loadAddon(Settings &settings, const QString &filesDir, const QS

AddonInfo addonInfo;
if (addonFilePath.isEmpty()) {
// name will be shown in the fileNotFound error message
addonInfo.name = addon.toStdString();
} else {
addonInfo.getAddonInfo(json_str, settings.exename); // TODO: handle error
Expand Down

0 comments on commit 72c3c2a

Please sign in to comment.