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

@ -207,19 +207,22 @@ HomePage::~HomePage()
RetroshareInviteFlags HomePage::currentInviteFlags() const RetroshareInviteFlags HomePage::currentInviteFlags() const
{ {
RetroshareInviteFlags invite_flags = RetroshareInviteFlags::NOTHING; RetroshareInviteFlags invite_flags = RetroshareInviteFlags::NOTHING;
if(mIncludeLocIPact->isChecked()) if(!RsAccounts::isHiddenNode())
invite_flags |= RetroshareInviteFlags::CURRENT_LOCAL_IP; {
if(mIncludeLocIPact->isChecked())
invite_flags |= RetroshareInviteFlags::CURRENT_LOCAL_IP;
if(mIncludeExtIPact->isChecked()) if(mIncludeExtIPact->isChecked())
invite_flags |= RetroshareInviteFlags::CURRENT_EXTERNAL_IP; invite_flags |= RetroshareInviteFlags::CURRENT_EXTERNAL_IP;
if(mIncludeDNSact->isChecked()) if(mIncludeDNSact->isChecked())
invite_flags |= RetroshareInviteFlags::DNS; invite_flags |= RetroshareInviteFlags::DNS;
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);
} }