Fix compilation due to RsPeers::GetRetroshareInvite

This commit is contained in:
Gioacchino Mazzurco 2018-10-06 02:46:09 +02:00
parent 2b3570903f
commit c6ca3c5669
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051
5 changed files with 19 additions and 13 deletions

View File

@ -422,7 +422,9 @@ void PeersHandler::handleWildcard(Request &req, Response &resp)
{ {
if(str == "self" && !req.mPath.empty() && req.mPath.top() == "certificate") if(str == "self" && !req.mPath.empty() && req.mPath.top() == "certificate")
{ {
resp.mDataStream << makeKeyValue("cert_string", mRsPeers->GetRetroshareInvite(false)); resp.mDataStream << makeKeyValue(
"cert_string",
mRsPeers->GetRetroshareInvite());
resp.setOk(); resp.setOk();
return; return;
} }

View File

@ -33,9 +33,9 @@
#include <iostream> #include <iostream>
#define URL_FAQ "http://retroshare.sourceforge.net/wiki/index.php/Frequently_Asked_Questions" #define URL_FAQ "http://retroshare.sourceforge.net/wiki/index.php/Frequently_Asked_Questions"
#define URL_FORUM "http://retroshare.sourceforge.net/forum/" #define URL_FORUM "https://github.com/RetroShare/RetroShare/issues"
#define URL_WEBSITE "http://retroshare.org" #define URL_WEBSITE "http://retroshare.net"
#define URL_DOWNLOAD "http://retroshare.sourceforge.net/downloads.html" #define URL_DOWNLOAD "http://retroshare.net/downloads.html"
#define EMAIL_SUBSCRIBE "lists@retroshare.org" #define EMAIL_SUBSCRIBE "lists@retroshare.org"
@ -236,7 +236,7 @@ void GetStartedDialog::inviteFriends()
{ {
RsAutoUpdatePage::lockAllEvents(); RsAutoUpdatePage::lockAllEvents();
cert = rsPeers->GetRetroshareInvite(false); cert = rsPeers->GetRetroshareInvite();
RsAutoUpdatePage::unlockAllEvents() ; RsAutoUpdatePage::unlockAllEvents() ;
} }

View File

@ -127,7 +127,7 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
body = GetStartedDialog::GetInviteText(); body = GetStartedDialog::GetInviteText();
body += "\n" + GetStartedDialog::GetCutBelowText(); body += "\n" + GetStartedDialog::GetCutBelowText();
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str()); body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite().c_str());
std::string advsetting; std::string advsetting;
if(rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES")) if(rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES"))
@ -436,7 +436,7 @@ void ConnectFriendWizard::initializePage(int id)
QString body = ui->inviteTextEdit->toPlainText(); QString body = ui->inviteTextEdit->toPlainText();
body += "\n" + GetStartedDialog::GetCutBelowText(); body += "\n" + GetStartedDialog::GetCutBelowText();
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str()); body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite().c_str());
ui->inviteTextEdit->setPlainText(body); ui->inviteTextEdit->setPlainText(body);
} }
@ -797,7 +797,7 @@ bool ConnectFriendWizard::validateCurrentPage()
QString body = ui->inviteTextEdit->toPlainText(); QString body = ui->inviteTextEdit->toPlainText();
body += "\n" + GetStartedDialog::GetCutBelowText(); body += "\n" + GetStartedDialog::GetCutBelowText();
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str()); body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite().c_str());
sendMail (mailaddresses, ui->subjectEdit->text(), body); sendMail (mailaddresses, ui->subjectEdit->text(), body);
} }
@ -998,7 +998,8 @@ void ConnectFriendWizard::accept()
void ConnectFriendWizard::updateOwnCert() void ConnectFriendWizard::updateOwnCert()
{ {
std::string invite = rsPeers->GetRetroshareInvite(ui->userCertIncludeSignaturesButton->isChecked()); std::string invite = rsPeers->GetRetroshareInvite( rsPeers->getOwnId(),
ui->userCertIncludeSignaturesButton->isChecked() );
std::cerr << "TextPage() getting Invite: " << invite << std::endl; std::cerr << "TextPage() getting Invite: " << invite << std::endl;
@ -1174,7 +1175,7 @@ void ConnectFriendWizard::generateCertificateCalled()
std::cerr << " generateCertificateCalled" << std::endl; std::cerr << " generateCertificateCalled" << std::endl;
#endif #endif
std::string cert = rsPeers->GetRetroshareInvite(false); std::string cert = rsPeers->GetRetroshareInvite();
if (cert.empty()) { if (cert.empty()) {
QMessageBox::information(this, "RetroShare", tr("Sorry, create certificate failed"), QMessageBox::Ok, QMessageBox::Ok); QMessageBox::information(this, "RetroShare", tr("Sorry, create certificate failed"), QMessageBox::Ok, QMessageBox::Ok);
return; return;

View File

@ -92,7 +92,7 @@ void ProfileWidget::statusmessagedlg()
void ProfileWidget::copyCert() void ProfileWidget::copyCert()
{ {
std::string cert = rsPeers->GetRetroshareInvite(false); std::string cert = rsPeers->GetRetroshareInvite();
if (cert.empty()) { if (cert.empty()) {
QMessageBox::information(this, tr("RetroShare"), QMessageBox::information(this, tr("RetroShare"),
tr("Sorry, create certificate failed"), tr("Sorry, create certificate failed"),

View File

@ -96,8 +96,11 @@ CryptoPage::~CryptoPage()
void void
CryptoPage::load() CryptoPage::load()
{ {
/* Loads ouer default Puplickey */ ui.certplainTextEdit->setPlainText(
ui.certplainTextEdit->setPlainText(QString::fromUtf8(rsPeers->GetRetroshareInvite(ui._includeSignatures_CB->isChecked()).c_str())); QString::fromUtf8(
rsPeers->GetRetroshareInvite(
rsPeers->getOwnId(),
ui._includeSignatures_CB->isChecked() ).c_str() ) );
} }
void void
CryptoPage::copyRSLink() CryptoPage::copyRSLink()