mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
removed debug output
This commit is contained in:
parent
137cb5271d
commit
8f80db07c5
@ -440,19 +440,12 @@ void RSFeedWidget::feedItemDestroyed(FeedItem *feedItem)
|
||||
|
||||
QTreeWidgetItem *RSFeedWidget::findTreeWidgetItem(uint64_t identifier)
|
||||
{
|
||||
std::cerr << "FindTreeWidgetItem: looking for \"" << identifier << "\"" << std::endl;
|
||||
QList<QTreeWidgetItem*> list = ui->treeWidget->findItems(QString("%1").arg(identifier,8,16,QChar('0')),Qt::MatchExactly,COLUMN_IDENTIFIER);
|
||||
|
||||
if(list.empty())
|
||||
{
|
||||
std::cerr << "not found!"<< std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
else if(list.size() == 1)
|
||||
{
|
||||
std::cerr << "found!"<< std::endl;
|
||||
return list.front();
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "(EE) More than a single item with identifier \"" << identifier << "\" in the feed tree widget. This shouldn't happen!" << std::endl;
|
||||
@ -506,20 +499,11 @@ FeedItem *RSFeedWidget::findFeedItem(uint64_t identifier)
|
||||
++it;
|
||||
|
||||
FeedItem *feedItem = feedItemFromTreeItem(treeItem);
|
||||
if (!feedItem) {
|
||||
if (!feedItem)
|
||||
continue;
|
||||
}
|
||||
|
||||
// (cyril) It seems that a local variable must be used to store this identifier.
|
||||
// Directly comparing identifier such as in:
|
||||
// if(feedItem->uniqueIdentifier() == identifier)
|
||||
// causes a crash. I dont know why! If someone ever finds why, please tell me.
|
||||
|
||||
uint64_t id = feedItem->uniqueIdentifier();
|
||||
|
||||
std::cerr << "Comparing \"" << id << "\"";
|
||||
std::cerr << " to " << identifier << "\"" << " pthread_t = " << pthread_self() << std::endl;
|
||||
|
||||
if (id == identifier)
|
||||
return feedItem;
|
||||
}
|
||||
|
@ -53,8 +53,6 @@ uint64_t FeedItem::hash_64bits(const std::string& s) const
|
||||
|
||||
for(uint32_t i=0;i<s.size();++i)
|
||||
mHash = ~(((mHash << 31) ^ (mHash >> 3)) + s[i]*0x217898fbba7 + 0x0294379);
|
||||
|
||||
std::cerr << "Producing hash " << std::hex << mHash << std::dec << " from string \"" << s << "\"" << std::endl;
|
||||
}
|
||||
|
||||
return mHash;
|
||||
|
Loading…
Reference in New Issue
Block a user