mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 18:29:02 -04:00
removed debug output
This commit is contained in:
parent
137cb5271d
commit
8f80db07c5
2 changed files with 1 additions and 19 deletions
|
@ -440,19 +440,12 @@ void RSFeedWidget::feedItemDestroyed(FeedItem *feedItem)
|
||||||
|
|
||||||
QTreeWidgetItem *RSFeedWidget::findTreeWidgetItem(uint64_t identifier)
|
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);
|
QList<QTreeWidgetItem*> list = ui->treeWidget->findItems(QString("%1").arg(identifier,8,16,QChar('0')),Qt::MatchExactly,COLUMN_IDENTIFIER);
|
||||||
|
|
||||||
if(list.empty())
|
if(list.empty())
|
||||||
{
|
|
||||||
std::cerr << "not found!"<< std::endl;
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
|
||||||
else if(list.size() == 1)
|
else if(list.size() == 1)
|
||||||
{
|
|
||||||
std::cerr << "found!"<< std::endl;
|
|
||||||
return list.front();
|
return list.front();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "(EE) More than a single item with identifier \"" << identifier << "\" in the feed tree widget. This shouldn't happen!" << std::endl;
|
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;
|
++it;
|
||||||
|
|
||||||
FeedItem *feedItem = feedItemFromTreeItem(treeItem);
|
FeedItem *feedItem = feedItemFromTreeItem(treeItem);
|
||||||
if (!feedItem) {
|
if (!feedItem)
|
||||||
continue;
|
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();
|
uint64_t id = feedItem->uniqueIdentifier();
|
||||||
|
|
||||||
std::cerr << "Comparing \"" << id << "\"";
|
|
||||||
std::cerr << " to " << identifier << "\"" << " pthread_t = " << pthread_self() << std::endl;
|
|
||||||
|
|
||||||
if (id == identifier)
|
if (id == identifier)
|
||||||
return feedItem;
|
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)
|
for(uint32_t i=0;i<s.size();++i)
|
||||||
mHash = ~(((mHash << 31) ^ (mHash >> 3)) + s[i]*0x217898fbba7 + 0x0294379);
|
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;
|
return mHash;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue