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

Move slot connections to avoid issue when starting MO2 to download a NXM link. #2082

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,16 +407,9 @@ MainWindow::MainWindow(Settings& settings, OrganizerCore& organizerCore,
SLOT(nexusApi()));

connect(NexusInterface::instance().getAccessManager(),
SIGNAL(credentialsReceived(const APIUserAccount&)), this,
SLOT(updateWindowTitle(const APIUserAccount&)));

connect(NexusInterface::instance().getAccessManager(),
SIGNAL(credentialsReceived(const APIUserAccount&)),
&NexusInterface::instance(), SLOT(setUserAccount(const APIUserAccount&)));

connect(&NexusInterface::instance(),
SIGNAL(requestsChanged(const APIStats&, const APIUserAccount&)), this,
SLOT(onRequestsChanged(const APIStats&, const APIUserAccount&)));
&NXMAccessManager::credentialsReceived, this, &MainWindow::updateWindowTitle);
connect(&NexusInterface::instance(), &NexusInterface::requestsChanged, ui->statusBar,
&StatusBar::setAPI);

connect(&TutorialManager::instance(), SIGNAL(windowTutorialFinished(QString)), this,
SLOT(windowTutorialFinished(QString)));
Expand Down Expand Up @@ -658,11 +651,6 @@ void MainWindow::updateWindowTitle(const APIUserAccount& user)
this->setWindowTitle(title);
}

void MainWindow::onRequestsChanged(const APIStats& stats, const APIUserAccount& user)
{
ui->statusBar->setAPI(stats, user);
}

void MainWindow::resizeLists(bool pluginListCustom)
{
// ensure the columns aren't so small you can't see them any more
Expand Down
2 changes: 0 additions & 2 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@ private slots:
void nxmRequestFailed(QString gameName, int modID, int fileID, QVariant userData,
int requestID, int errorCode, const QString& errorString);

void onRequestsChanged(const APIStats& stats, const APIUserAccount& user);

void modRenamed(const QString& oldName, const QString& newName);
void modRemoved(const QString& fileName);

Expand Down
7 changes: 5 additions & 2 deletions src/nexusinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,11 @@ NexusInterface::NexusInterface(Settings* s) : m_PluginContainer(nullptr)

m_DiskCache = new QNetworkDiskCache(this);

connect(m_AccessManager, SIGNAL(requestNXMDownload(QString)), this,
SLOT(downloadRequestedNXM(QString)));
connect(m_AccessManager, &NXMAccessManager::requestNXMDownload, this,
&NexusInterface::downloadRequestedNXM);

connect(m_AccessManager, &NXMAccessManager::credentialsReceived, this,
&NexusInterface::setUserAccount);
}

NexusInterface::~NexusInterface()
Expand Down
Loading
Loading