Merge pull request #2613 from csoler/v0.6-TorControl3

fixed bug causing hidden nodes to crash at start
This commit is contained in:
csoler 2022-04-16 18:57:48 +02:00 committed by GitHub
commit 56b6196fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 13 deletions

View File

@ -209,6 +209,8 @@ RetroshareInviteFlags HomePage::currentInviteFlags() const
{ {
RetroshareInviteFlags invite_flags = RetroshareInviteFlags::NOTHING; RetroshareInviteFlags invite_flags = RetroshareInviteFlags::NOTHING;
if(!RsAccounts::isHiddenNode())
{
if(mIncludeLocIPact->isChecked()) if(mIncludeLocIPact->isChecked())
invite_flags |= RetroshareInviteFlags::CURRENT_LOCAL_IP; invite_flags |= RetroshareInviteFlags::CURRENT_LOCAL_IP;
@ -220,6 +222,7 @@ RetroshareInviteFlags HomePage::currentInviteFlags() const
if(mIncludeIPHistoryact->isChecked()) if(mIncludeIPHistoryact->isChecked())
invite_flags |= RetroshareInviteFlags::FULL_IP_HISTORY; invite_flags |= RetroshareInviteFlags::FULL_IP_HISTORY;
}
return invite_flags; return invite_flags;
} }

View File

@ -485,11 +485,11 @@ void MainWindow::initStackedPage()
addPage(newsFeed = new NewsFeed(ui->stackPages), grp, &notify); addPage(newsFeed = new NewsFeed(ui->stackPages), grp, &notify);
//List All notify before Setting was created //List All notify before Setting was created
QList<QPair<MainPage*, QPair<QAction*, QListWidgetItem*> > >::iterator notifyIt; for (auto notifyIt:notify)
for (notifyIt = notify.begin(); notifyIt != notify.end(); ++notifyIt) { {
UserNotify *userNotify = notifyIt->first->getUserNotify(); UserNotify *userNotify = notifyIt.first->getUserNotify();
if (userNotify) { if (userNotify) {
userNotify->initialize(ui->toolBarPage, notifyIt->second.first, notifyIt->second.second); userNotify->initialize(ui->toolBarPage, notifyIt.second.first, notifyIt.second.second);
connect(userNotify, SIGNAL(countChanged()), this, SLOT(updateTrayCombine())); connect(userNotify, SIGNAL(countChanged()), this, SLOT(updateTrayCombine()));
userNotifyList.push_back(userNotify); userNotifyList.push_back(userNotify);
} }