merged upstream/master

This commit is contained in:
csoler 2018-10-16 20:51:10 +02:00
commit 21a92d69b4
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
362 changed files with 6792 additions and 4034 deletions

View file

@ -37,6 +37,7 @@
#include <limits.h>
#ifdef Q_OS_WIN
#include <wtypes.h>
#include <wincrypt.h>
#endif

View file

@ -77,10 +77,10 @@ void BannedFilesDialog::fillFilesList()
for(auto it(banned_files.begin());it!=banned_files.end();++it)
{
ui.bannedFiles_TW->setItem(row, COLUMN_FILE_NAME, new QTableWidgetItem(QIcon(),QString::fromUtf8(it->second.filename.c_str()),0));
ui.bannedFiles_TW->setItem(row, COLUMN_FILE_NAME, new QTableWidgetItem(QIcon(),QString::fromUtf8(it->second.mFilename.c_str()),0));
ui.bannedFiles_TW->setItem(row, COLUMN_FILE_HASH, new QTableWidgetItem(QIcon(),QString::fromStdString(it->first.toStdString()),0));
ui.bannedFiles_TW->setItem(row, COLUMN_FILE_SIZE, new QTableWidgetItem(QIcon(),QString::number(it->second.size),0));
ui.bannedFiles_TW->setItem(row, COLUMN_FILE_TIME, new QTableWidgetItem(QIcon(),QDateTime::fromTime_t(it->second.ban_time_stamp).toString(),0));
ui.bannedFiles_TW->setItem(row, COLUMN_FILE_SIZE, new QTableWidgetItem(QIcon(),QString::number(it->second.mSize),0));
ui.bannedFiles_TW->setItem(row, COLUMN_FILE_TIME, new QTableWidgetItem(QIcon(),QDateTime::fromTime_t(it->second.mBanTimeStamp).toString(),0));
ui.bannedFiles_TW->item(row, COLUMN_FILE_HASH)->setData(Qt::UserRole, QString::fromStdString(it->first.toStdString()));

View file

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

View file

@ -44,6 +44,7 @@
#include "retroshare-gui/RsAutoUpdatePage.h"
#include "util/misc.h"
#include "util/QtVersion.h"
#include "util/rstime.h"
#include "retroshare/rsgxsflags.h"
#include "retroshare/rsmsgs.h"
@ -1944,11 +1945,11 @@ void IdDialog::insertIdDetails(uint32_t token)
rsIdentity->getIdDetails(RsGxsId(data.mMeta.mGroupId),det) ;
QString usage_txt ;
std::map<time_t,RsIdentityUsage> rmap ;
for(std::map<RsIdentityUsage,time_t>::const_iterator it(det.mUseCases.begin());it!=det.mUseCases.end();++it)
rmap.insert(std::make_pair(it->second,it->first)) ;
std::map<rstime_t,RsIdentityUsage> rmap;
for(auto it(det.mUseCases.begin()); it!=det.mUseCases.end(); ++it)
rmap.insert(std::make_pair(it->second,it->first));
for(std::map<time_t,RsIdentityUsage>::const_iterator it(rmap.begin());it!=rmap.end();++it)
for(auto it(rmap.begin()); it!=rmap.end(); ++it)
usage_txt += QString("<b>")+ getHumanReadableDuration(now - data.mLastUsageTS) + "</b> \t: " + createUsageString(it->second) + "<br/>" ;
if(usage_txt.isNull())

View file

@ -574,7 +574,7 @@ void ChatLobbyDialog::updateParticipantsList()
delete ui.participantsList->takeTopLevelItem(index);
}
for (std::map<RsGxsId,time_t>::const_iterator it2(linfo.gxs_ids.begin()); it2 != linfo.gxs_ids.end(); ++it2)
for (auto it2(linfo.gxs_ids.begin()); it2 != linfo.gxs_ids.end(); ++it2)
{
QString participant = QString::fromUtf8( (it2->first).toStdString().c_str() );

View file

@ -792,7 +792,7 @@ void ChatWidget::completeNickname(bool reverse)
std::list<QString> participants;
RsIdentityDetails details ;
for ( std::map<RsGxsId,time_t>::const_iterator it = lobby.gxs_ids.begin(); it != lobby.gxs_ids.end(); ++it)
for (auto it = lobby.gxs_ids.begin(); it != lobby.gxs_ids.end(); ++it)
{
if(rsIdentity->getIdDetails(it->first,details))
participants.push_front(QString::fromUtf8(details.mNickname.c_str()));
@ -859,7 +859,7 @@ QAbstractItemModel *ChatWidget::modelFromPeers()
// Get participants list
QStringList participants;
for (std::map<RsGxsId,time_t>::const_iterator it = lobby.gxs_ids.begin(); it != lobby.gxs_ids.end(); ++it)
for (auto it = lobby.gxs_ids.begin(); it != lobby.gxs_ids.end(); ++it)
{
RsIdentityDetails details ;
rsIdentity->getIdDetails(it->first,details) ;

View file

@ -127,7 +127,7 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
body = GetStartedDialog::GetInviteText();
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;
if(rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES"))
@ -436,7 +436,7 @@ void ConnectFriendWizard::initializePage(int id)
QString body = ui->inviteTextEdit->toPlainText();
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);
}
@ -797,7 +797,7 @@ bool ConnectFriendWizard::validateCurrentPage()
QString body = ui->inviteTextEdit->toPlainText();
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);
}
@ -998,7 +998,8 @@ void ConnectFriendWizard::accept()
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;
@ -1174,7 +1175,7 @@ void ConnectFriendWizard::generateCertificateCalled()
std::cerr << " generateCertificateCalled" << std::endl;
#endif
std::string cert = rsPeers->GetRetroshareInvite(false);
std::string cert = rsPeers->GetRetroshareInvite();
if (cert.empty()) {
QMessageBox::information(this, "RetroShare", tr("Sorry, create certificate failed"), QMessageBox::Ok, QMessageBox::Ok);
return;

View file

@ -51,8 +51,9 @@ QIcon MessageUserNotify::getMainIcon(bool hasNew)
unsigned int MessageUserNotify::getNewCount()
{
unsigned int newInboxCount = 0;
rsMail->getMessageCount(NULL, &newInboxCount, NULL, NULL, NULL, NULL);
uint32_t newInboxCount = 0;
uint32_t a, b, c, d, e; // dummies
rsMail->getMessageCount(a, newInboxCount, b, c, d, e);
return newInboxCount;
}

View file

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

View file

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

View file

@ -266,7 +266,7 @@ void GxsTransportStatistics::updateContent()
groupTreeWidget->addTopLevelItem(item);
groupTreeWidget->setItemExpanded(item,openned_groups.find(it->first) != openned_groups.end());
QString msg_time_string = (stat.last_publish_TS>0)?QString(" (Last msg: %1)").arg(QDateTime::fromTime_t(stat.last_publish_TS).toString()):"" ;
QString msg_time_string = (stat.last_publish_TS>0)?QString(" (Last msg: %1)").arg(QDateTime::fromTime_t((uint)stat.last_publish_TS).toString()):"" ;
item->setData(COL_GROUP_NUM_MSGS, Qt::DisplayRole, QString::number(stat.mNumMsgs) + msg_time_string) ;
item->setData(COL_GROUP_GRP_ID, Qt::DisplayRole, QString::fromStdString(it->first.toStdString())) ;

View file

@ -31,6 +31,7 @@
#include "RsAutoUpdatePage.h"
#include "ui_GxsTransportStatistics.h"
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
#include "util/rstime.h"
class GxsTransportStatisticsWidget ;
class UIStateHelper;
@ -55,7 +56,7 @@ public:
bool subscribed ;
int popularity ;
time_t last_publish_TS;
rstime_t last_publish_TS;
std::map<RsGxsMessageId,RsMsgMetaData> messages_metas ;
};