Merge pull request #1470 from csoler/v0.6-ImprovedGUI

V0.6 improved gui
This commit is contained in:
csoler 2019-01-30 00:01:16 +01:00 committed by GitHub
commit d63655c9b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 63091 additions and 68356 deletions

View File

@ -753,8 +753,9 @@ bool p3GxsTrans::handleEncryptedMail(const RsGxsTransMailItem* mail)
// Hint match none of our own ids
if(decryptIds.empty())
{
std::cout << "p3GxsTrans::handleEcryptedMail(...) hint doesn't match"
<< std::endl;
#ifdef DEBUG_GXSTRANS
std::cout << "p3GxsTrans::handleEcryptedMail(...) hint doesn't match" << std::endl;
#endif
return true;
}

View File

@ -1387,7 +1387,9 @@ bool p3turtle::getTunnelServiceInfo(TurtleTunnelId tunnel_id,RsPeerId& vpid,RsFi
if(it == _incoming_file_hashes.end())
{
#ifdef P3TURTLE_DEBUG
std::cerr << "p3turtle::handleRecvGenericTunnelItem(): hash " << hash << " for client side tunnel endpoint " << std::hex << tunnel_id << std::dec << " has been removed (probably a late response)! Dropping the item. " << std::endl;
#endif
return false;
}
@ -1399,7 +1401,9 @@ bool p3turtle::getTunnelServiceInfo(TurtleTunnelId tunnel_id,RsPeerId& vpid,RsFi
if(it == _outgoing_tunnel_client_services.end())
{
#ifdef P3TURTLE_DEBUG
std::cerr << "p3turtle::handleRecvGenericTunnelItem(): hash " << tunnel.hash << " for server side tunnel endpoint " << std::hex << tunnel_id << std::dec << " has been removed (probably a late response)! Dropping the item. " << std::endl;
#endif
return false;
}
@ -1899,8 +1903,10 @@ void p3turtle::handleTunnelResult(RsTurtleTunnelOkItem *item)
new_vpid = _local_tunnels[item->tunnel_id].vpid ; // save it for off-mutex usage.
}
}
#ifdef P3TURTLE_DEBUG
if(!found)
std::cerr << "p3turtle: error. Could not find hash that emmitted tunnel request " << reinterpret_cast<void*>(item->tunnel_id) << std::endl ;
#endif
}
else
{ // Nope, forward it back.

View File

@ -472,6 +472,15 @@ QString TorManagerPrivate::torExecutablePath() const
return path + filename;
#endif
#ifdef __APPLE__
// on MacOS, try traditional brew installation path
path = QStringLiteral("/usr/local/opt/tor/bin") ;
if (QFile::exists(path + filename))
return path + filename;
#endif
// Try $PATH
return filename.mid(1);
}

View File

@ -56,7 +56,7 @@
#include <iostream>
#include <algorithm>
#define DEBUG_FORUMS
//#define DEBUG_FORUMS
/* Images for context menu icons */
#define IMAGE_MESSAGE ":/images/mail_new.png"
@ -1008,14 +1008,6 @@ void GxsForumThreadWidget::clickedThread(QModelIndex index)
std::cerr << "Clicked on message ID " << mThreadId << ", index=" << index << std::endl;
#endif
// if(mUpdating)
// {
//#ifdef DEBUG_FORUMS
// std::cerr << " early return because mUpdating=true" << std::endl;
//#endif
// return;
// }
if(!index.isValid())
{
#ifdef DEBUG_FORUMS
@ -1500,7 +1492,7 @@ bool GxsForumThreadWidget::navigate(const RsGxsMessageId &msgId)
if(!source_index.isValid())
{
std::cerr << "Cannot navigate to msg " << msgId << " in forum " << mForumGroup.mMeta.mGroupId << ": index unknown. Setting mNavigatePendingMsgId." << std::endl;
std::cerr << "(EE) Cannot navigate to msg " << msgId << " in forum " << mForumGroup.mMeta.mGroupId << ": index unknown. Setting mNavigatePendingMsgId." << std::endl;
mNavigatePendingMsgId = msgId; // not found. That means the forum may not be loaded yet. So we keep that post in mind, for after loading.
return true; // we have to return true here, otherwise the caller will intepret the async loading as an error.
@ -1694,7 +1686,7 @@ void GxsForumThreadWidget::replyMessageData(const RsGxsForumMsg &msg)
{
if ((msg.mMeta.mGroupId != groupId()) || (msg.mMeta.mMsgId != mThreadId))
{
std::cerr << "GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
std::cerr << "(EE) GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
std::cerr << std::endl;
return;
}
@ -1722,7 +1714,7 @@ void GxsForumThreadWidget::editForumMessageData(const RsGxsForumMsg& msg)
{
if ((msg.mMeta.mGroupId != groupId()) || (msg.mMeta.mMsgId != mThreadId))
{
std::cerr << "GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
std::cerr << "(EE) GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
std::cerr << std::endl;
return;
}
@ -1766,7 +1758,7 @@ void GxsForumThreadWidget::replyForumMessageData(const RsGxsForumMsg &msg)
{
if ((msg.mMeta.mGroupId != groupId()) || (msg.mMeta.mMsgId != mThreadId))
{
std::cerr << "GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
std::cerr << "(EE) GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
std::cerr << std::endl;
return;
}
@ -1857,7 +1849,9 @@ void GxsForumThreadWidget::postForumLoading()
#endif
if(!mNavigatePendingMsgId.isNull() && mThreadModel->getIndexOfMessage(mNavigatePendingMsgId).isValid())
{
#ifdef DEBUG_FORUMS
std::cerr << "Pending msg navigation: " << mNavigatePendingMsgId << ". Using it as new thread Id" << std::endl;
#endif
QModelIndex source_index = mThreadModel->getIndexOfMessage(mNavigatePendingMsgId);
QModelIndex index = mThreadProxyModel->mapFromSource(source_index);
@ -1963,7 +1957,9 @@ void GxsForumThreadWidget::updateMessageData(const RsGxsMessageId& msgId)
{
// 1 - get message data from p3GxsForums
#ifdef DEBUG_FORUMS
std::cerr << "Retrieving post data for post " << msgId << std::endl;
#endif
std::set<RsGxsMessageId> msgs_to_request ;
std::vector<RsGxsForumMsg> msgs;
@ -2014,7 +2010,7 @@ void GxsForumThreadWidget::showAuthorInPeople(const RsGxsForumMsg& msg)
{
if(msg.mMeta.mAuthorId.isNull())
{
std::cerr << "GxsForumThreadWidget::loadMsgData_showAuthorInPeople() ERROR Missing Message Data...";
std::cerr << "(EE) GxsForumThreadWidget::loadMsgData_showAuthorInPeople() ERROR Missing Message Data...";
std::cerr << std::endl;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff