mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed compilation problem caused by a bug in qtcreator global replace. Warning: always check the result of qtcreator global replace
This commit is contained in:
parent
37f3e1a62a
commit
c61ccda431
@ -156,7 +156,8 @@ void IdentityHandler::handleWildcard(Request & /*req*/, Response &resp)
|
|||||||
RsGxsIdGroup& grp = *vit;
|
RsGxsIdGroup& grp = *vit;
|
||||||
//electron: not very happy about this, i think the flags should stay hidden in rsidentities
|
//electron: not very happy about this, i think the flags should stay hidden in rsidentities
|
||||||
bool own = (grp.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
bool own = (grp.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
||||||
bool pgp_linked = (grp.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_deprecateRSGXSID_GROUPFLAG_REALID_kept_for_compatibilityMember()
|
bool pgp_linked = (grp.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility ) ;
|
||||||
|
resp.mDataStream.getStreamToMember()
|
||||||
<< makeKeyValueReference("id", grp.mMeta.mGroupId) /// @deprecated using "id" as key can cause problems in some JS based languages like Qml @see gxs_id instead
|
<< makeKeyValueReference("id", grp.mMeta.mGroupId) /// @deprecated using "id" as key can cause problems in some JS based languages like Qml @see gxs_id instead
|
||||||
<< makeKeyValueReference("gxs_id", grp.mMeta.mGroupId)
|
<< makeKeyValueReference("gxs_id", grp.mMeta.mGroupId)
|
||||||
<< makeKeyValueReference("pgp_id",grp.mPgpId )
|
<< makeKeyValueReference("pgp_id",grp.mPgpId )
|
||||||
|
@ -47,8 +47,8 @@ extern RsIdentity *rsIdentity;
|
|||||||
// The deprecated flag overlaps the privacy flags for mGroupFlags. This is an error that should be fixed. For the sake of keeping some
|
// The deprecated flag overlaps the privacy flags for mGroupFlags. This is an error that should be fixed. For the sake of keeping some
|
||||||
// backward compatibility, we need to make the change step by step.
|
// backward compatibility, we need to make the change step by step.
|
||||||
|
|
||||||
#define RSGXSID_GROUPFLAG_REALID_deprecated 0x0001
|
#define RSGXSID_GROUPFLAG_REALID_kept_for_compatibility 0x0001
|
||||||
#define RSGXSID_GROUPFLAG_REALID 0x0100
|
#define RSGXSID_GROUPFLAG_REALID 0x0100
|
||||||
|
|
||||||
// THESE ARE FLAGS FOR INTERFACE.
|
// THESE ARE FLAGS FOR INTERFACE.
|
||||||
#define RSID_TYPE_MASK 0xff00
|
#define RSID_TYPE_MASK 0xff00
|
||||||
|
@ -1274,7 +1274,7 @@ bool p3IdService::opinion_handlerequest(uint32_t token)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update IdScore too.
|
// update IdScore too.
|
||||||
bool pgpId = (meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_deprecated);
|
bool pgpId = (meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility);
|
||||||
ssdata.score.rep.updateIdScore(pgpId, ssdata.pgp.validatedSignature);
|
ssdata.score.rep.updateIdScore(pgpId, ssdata.pgp.validatedSignature);
|
||||||
ssdata.score.rep.update();
|
ssdata.score.rep.update();
|
||||||
|
|
||||||
@ -1890,7 +1890,7 @@ void RsGxsIdCache::init(const RsGxsIdGroupItem *item, const RsTlvPublicRSAKey& i
|
|||||||
details.mFlags = 0 ;
|
details.mFlags = 0 ;
|
||||||
|
|
||||||
if(item->meta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) details.mFlags |= RS_IDENTITY_FLAGS_IS_OWN_ID;
|
if(item->meta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) details.mFlags |= RS_IDENTITY_FLAGS_IS_OWN_ID;
|
||||||
if(item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_deprecated) details.mFlags |= RS_IDENTITY_FLAGS_PGP_LINKED;
|
if(item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility) details.mFlags |= RS_IDENTITY_FLAGS_PGP_LINKED;
|
||||||
|
|
||||||
// do some tests
|
// do some tests
|
||||||
if(details.mFlags & RS_IDENTITY_FLAGS_IS_OWN_ID)
|
if(details.mFlags & RS_IDENTITY_FLAGS_IS_OWN_ID)
|
||||||
@ -2844,7 +2844,7 @@ RsGenExchange::ServiceCreate_Return p3IdService::service_CreateGroup(RsGxsGrpIte
|
|||||||
|
|
||||||
ServiceCreate_Return createStatus;
|
ServiceCreate_Return createStatus;
|
||||||
|
|
||||||
if (item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_deprecated)
|
if (item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility)
|
||||||
{
|
{
|
||||||
/* create the hash */
|
/* create the hash */
|
||||||
Sha1CheckSum hash;
|
Sha1CheckSum hash;
|
||||||
@ -3047,7 +3047,7 @@ bool p3IdService::pgphash_handlerequest(uint32_t token)
|
|||||||
#endif // DEBUG_IDS
|
#endif // DEBUG_IDS
|
||||||
|
|
||||||
/* Filter based on IdType */
|
/* Filter based on IdType */
|
||||||
if (!(vit->mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_deprecated))
|
if (!(vit->mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility))
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_IDS
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::pgphash_request() discarding AnonID";
|
std::cerr << "p3IdService::pgphash_request() discarding AnonID";
|
||||||
@ -3623,7 +3623,7 @@ bool p3IdService::recogn_process()
|
|||||||
ssdata.recogntags.publishTs = item->meta.mPublishTs;
|
ssdata.recogntags.publishTs = item->meta.mPublishTs;
|
||||||
|
|
||||||
// update IdScore too.
|
// update IdScore too.
|
||||||
bool pgpId = (item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_deprecated);
|
bool pgpId = (item->meta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility);
|
||||||
ssdata.score.rep.updateIdScore(pgpId, ssdata.pgp.validatedSignature);
|
ssdata.score.rep.updateIdScore(pgpId, ssdata.pgp.validatedSignature);
|
||||||
ssdata.score.rep.update();
|
ssdata.score.rep.update();
|
||||||
|
|
||||||
@ -3844,7 +3844,7 @@ void p3IdService::generateDummy_FriendPGP()
|
|||||||
|
|
||||||
RsGxsIdGroup id;
|
RsGxsIdGroup id;
|
||||||
|
|
||||||
id.mMeta.mGroupFlags = RSGXSID_GROUPFLAG_REALID_deprecated;
|
id.mMeta.mGroupFlags = RSGXSID_GROUPFLAG_REALID_kept_for_compatibility;
|
||||||
|
|
||||||
int idx = RSRandom::random_f32() * (gpgids.size() - 1);
|
int idx = RSRandom::random_f32() * (gpgids.size() - 1);
|
||||||
it = gpgids.begin();
|
it = gpgids.begin();
|
||||||
@ -3881,7 +3881,7 @@ void p3IdService::generateDummy_UnknownPGP()
|
|||||||
RsGxsIdGroup id;
|
RsGxsIdGroup id;
|
||||||
|
|
||||||
// FAKE DATA.
|
// FAKE DATA.
|
||||||
id.mMeta.mGroupFlags = RSGXSID_GROUPFLAG_REALID_deprecated;
|
id.mMeta.mGroupFlags = RSGXSID_GROUPFLAG_REALID_kept_for_compatibility;
|
||||||
id.mPgpIdHash = Sha1CheckSum::random() ;
|
id.mPgpIdHash = Sha1CheckSum::random() ;
|
||||||
id.mPgpIdSign = RSRandom::random_alphaNumericString(20) ;
|
id.mPgpIdSign = RSRandom::random_alphaNumericString(20) ;
|
||||||
id.mMeta.mGroupName = RSRandom::random_alphaNumericString(10) ;
|
id.mMeta.mGroupName = RSRandom::random_alphaNumericString(10) ;
|
||||||
|
@ -204,7 +204,7 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RSGXSID_GROUPFLAG_REALID_kept_for_compatibilitySID_GROUPFLAG_REALID_deprecated)
|
if(data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility)
|
||||||
{
|
{
|
||||||
ui->lineEdit_GpgName->setText(tr("Unknown real name"));
|
ui->lineEdit_GpgName->setText(tr("Unknown real name"));
|
||||||
}
|
}
|
||||||
@ -232,11 +232,15 @@ RSGXSID_GROUPFLAG_REALID_kept_for_compatibilitySID_GROUPFLAG_REALID_deprecated)
|
|||||||
bool isOwnId = (data.mPgpKnown && (data.mPgpId == ownPgpId)) || (data.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
bool isOwnId = (data.mPgpKnown && (data.mPgpId == ownPgpId)) || (data.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
||||||
|
|
||||||
if (isOwnId)
|
if (isOwnId)
|
||||||
|
{
|
||||||
if (data.mPgpKnown)
|
if (data.mPgpKnown)
|
||||||
ui->lineEdit_Type->setText(tr("Identity owned by you, linked to your Retroshare node")) ;
|
ui->lineEdit_Type->setText(tr("Identity owned by you, linked to your Retroshare node")) ;
|
||||||
else
|
else
|
||||||
ui->lineEdit_Type->setText(tr("Anonymous identity, owned by you")) ;
|
ui->lineEdit_Type->setText(tr("Anonymous identity, owned by you")) ;
|
||||||
else if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLRSGXSID_GROUPFLAG_REALID_kept_for_compatibility.mPgpKnown)
|
}
|
||||||
|
else if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility)
|
||||||
|
{
|
||||||
|
if(data.mPgpKnown)
|
||||||
if (rsPeers->isGPGAccepted(data.mPgpId))
|
if (rsPeers->isGPGAccepted(data.mPgpId))
|
||||||
ui->lineEdit_Type->setText(tr("Owned by a friend Retroshare node")) ;
|
ui->lineEdit_Type->setText(tr("Owned by a friend Retroshare node")) ;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user