working
diff --git a/chatdialog.cpp b/chatdialog.cpp
index 4d7c358..c31a0bb 100644
--- a/chatdialog.cpp
+++ b/chatdialog.cpp
@@ -186,7 +186,12 @@
appendMessage(msg);
// update the tree view
- std::string prefix = name.toStdString().substr(0, name.toStdString().find_last_of('/'));
+ std::string stdStrName = name.toStdString();
+ std::string stdStrNameWithoutSeq = stdStrName.substr(0, stdStrName.find_last_of('/'));
+ std::string prefix = stdStrNameWithoutSeq.substr(0, stdStrNameWithoutSeq.find_last_of('/'));
+#ifdef __DEBUG
+ std::cout <<"<<< updating scene for" << prefix << ": " << msg.from() << std::endl;
+#endif
m_scene->msgReceived(prefix.c_str(), msg.from().c_str());
fitView();
}
diff --git a/digesttreescene.cpp b/digesttreescene.cpp
index 4bf699e..30c087e 100644
--- a/digesttreescene.cpp
+++ b/digesttreescene.cpp
@@ -66,6 +66,9 @@
void
DigestTreeScene::msgReceived(QString prefix, QString nick)
{
+#ifdef __DEBUG
+ std::cout << "Finding " << prefix.toStdString() << std::endl;
+#endif
Roster_iterator it = m_roster.find(prefix);
if (it != m_roster.end())
{
@@ -89,6 +92,18 @@
previouslyUpdatedUser = p;
}
+#ifdef __DEBUG
+ else
+ {
+ std::cout << "Couldn't find prefix, let's check"<< std::endl;
+ Roster_iterator ii = m_roster.begin();
+ while (ii != m_roster.end())
+ {
+ std::cout <<"Prefix: " << ii.key().toStdString() << std::endl;
+ ++ii;
+ }
+ }
+#endif
}
void