Merge pull request #2378 from csoler/v0.6-BugFixing_10

Last fixes (removed debug log) before release
This commit is contained in:
csoler 2021-03-13 22:54:52 +01:00 committed by GitHub
commit 751fffc30f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 8 deletions

View File

@ -272,8 +272,7 @@ private:
{ {
if(mPreferredGroupId < potentialGrId) if(mPreferredGroupId < potentialGrId)
{ {
std::cerr << "supersedePreferredGroup(...) " << potentialGrId // std::cerr << "supersedePreferredGroup(...) " << potentialGrId << " supersed " << mPreferredGroupId << std::endl;
<< " supersed " << mPreferredGroupId << std::endl;
mPreferredGroupId = potentialGrId; mPreferredGroupId = potentialGrId;
return true; return true;
} }

View File

@ -1781,7 +1781,7 @@ rstime_t p3GxsCircles::service_getLastGroupSeenTs(const RsGxsGroupId& gid)
} }
bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
{ {
#ifdef GXSFORUMS_CHANNELS #ifdef GXSFORUMS_CIRCLES
std::cerr << "p3gxsChannels: Checking unused circles: called by GxsCleaning." << std::endl; std::cerr << "p3gxsChannels: Checking unused circles: called by GxsCleaning." << std::endl;
#endif #endif
@ -1794,7 +1794,7 @@ bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
auto it = mKnownCircles.find(meta.mGroupId); auto it = mKnownCircles.find(meta.mGroupId);
bool unknown_posted = (it == mKnownCircles.end()); bool unknown_posted = (it == mKnownCircles.end());
#ifdef GXSFORUMS_CHANNELS #ifdef GXSFORUMS_CIRCLES
std::cerr << " Circle " << meta.mGroupId ; std::cerr << " Circle " << meta.mGroupId ;
#endif #endif
@ -1803,7 +1803,7 @@ bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
// This case should normally not happen. It does because this board was never registered since it may // This case should normally not happen. It does because this board was never registered since it may
// arrived before this code was here // arrived before this code was here
#ifdef GXSFORUMS_CHANNELS #ifdef GXSFORUMS_CIRCLES
std::cerr << ". Not known yet. Adding current time as new TS." << std::endl; std::cerr << ". Not known yet. Adding current time as new TS." << std::endl;
#endif #endif
mKnownCircles[meta.mGroupId] = now; mKnownCircles[meta.mGroupId] = now;
@ -1816,18 +1816,20 @@ bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta)
bool used_by_friends = (now < it->second + CIRCLES_UNUSED_BY_FRIENDS_DELAY); bool used_by_friends = (now < it->second + CIRCLES_UNUSED_BY_FRIENDS_DELAY);
bool subscribed = static_cast<bool>(meta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED); bool subscribed = static_cast<bool>(meta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED);
#ifdef GXSFORUMS_CIRCLES
std::cerr << ". subscribed: " << subscribed << ", used_by_friends: " << used_by_friends << " last TS: " << now - it->second << " secs ago (" << (now-it->second)/86400 << " days)"; std::cerr << ". subscribed: " << subscribed << ", used_by_friends: " << used_by_friends << " last TS: " << now - it->second << " secs ago (" << (now-it->second)/86400 << " days)";
#endif
if(!subscribed && !used_by_friends) if(!subscribed && !used_by_friends)
{ {
#ifdef GXSFORUMS_CHANNELS #ifdef GXSFORUMS_CIRCLES
std::cerr << ". Scheduling for deletion" << std::endl; std::cerr << ". Scheduling for deletion" << std::endl;
#endif #endif
return false; return false;
} }
else else
{ {
#ifdef GXSFORUMS_CHANNELS #ifdef GXSFORUMS_CIRCLES
std::cerr << ". Keeping!" << std::endl; std::cerr << ". Keeping!" << std::endl;
#endif #endif
return true; return true;

View File

@ -161,7 +161,11 @@ QVariant RSTextBrowser::loadResource(int type, const QUrl &name)
// case 4: otherwise, do not display // case 4: otherwise, do not display
std::cerr << "TEXTBROWSER: refusing load ressource request: type=" << type << " scheme=" << name.scheme().toStdString() << ", url=" << name.toString().toStdString() << std::endl; std::cerr << "TEXTBROWSER: refusing load ressource request: type=" << type << " scheme="
<< name.scheme().toStdString() << ", url="
<< name.toString().left(50).toStdString()
<< ((name.toString().length()>50)?"...":"")
<< std::endl;
if (mImageBlockWidget) if (mImageBlockWidget)
mImageBlockWidget->show(); mImageBlockWidget->show();

View File

@ -96,14 +96,18 @@ void RSPermissionMatrixWidget::updateDisplay()
void RSPermissionMatrixWidget::mousePressEvent(QMouseEvent *e) void RSPermissionMatrixWidget::mousePressEvent(QMouseEvent *e)
{ {
#ifdef DEBUG_PERMISSION_MATRIX
std::cerr << "mouse pressed at x=" << e->x() << ", y=" << e->y() << std::endl; std::cerr << "mouse pressed at x=" << e->x() << ", y=" << e->y() << std::endl;
#endif
uint32_t service_id ; uint32_t service_id ;
RsPeerId peer_id ; RsPeerId peer_id ;
if(computeServiceAndPeer(e->x(),e->y(),service_id,peer_id)) if(computeServiceAndPeer(e->x(),e->y(),service_id,peer_id))
{ {
#ifdef DEBUG_PERMISSION_MATRIX
std::cerr << "Peer id: " << peer_id << ", service: " << service_id << std::endl; std::cerr << "Peer id: " << peer_id << ", service: " << service_id << std::endl;
#endif
// Make sure the service is not globally disabled // Make sure the service is not globally disabled