Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify mod installation to plugins after directory structure is ready. #1837

Conversation

Holt59
Copy link
Member

@Holt59 Holt59 commented Jul 3, 2023

This is actually a pretty small change that add the following before calling refresh() (and remove the call to notifyModInstalled afterward):

connect(this, &OrganizerCore::directoryStructureReady, this, [=] {
  const int modIndex = ModInfo::getIndex(modName);
  if (modIndex != UINT_MAX) {
    const auto modInfo = ModInfo::getByIndex(modIndex);
    m_ModList.notifyModInstalled(modInfo.get());
  }
  }, Qt::SingleShotConnection);

Most of the changes are trying to have a single function called by both installDownload() and installArchive() instead of having two almost identical functions.

@Holt59 Holt59 force-pushed the fix/install-notify-plugins-after-structure-ready branch from 493c859 to 0505979 Compare July 3, 2023 18:33
@Holt59 Holt59 merged commit 7d6cb85 into ModOrganizer2:qt6 Jul 5, 2023
@Holt59 Holt59 deleted the fix/install-notify-plugins-after-structure-ready branch July 13, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant