From b3f817c6e7b50978d65a7b2ad20d0ff464260534 Mon Sep 17 00:00:00 2001 From: IndrekV Date: Fri, 27 Jul 2018 11:31:03 +0300 Subject: [PATCH] Added logging for project add (lib) --- src/user.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/user.cc b/src/user.cc index cef4068843..41ddd73415 100644 --- a/src/user.cc +++ b/src/user.cc @@ -82,22 +82,32 @@ void User::AddProjectToList(Project *p) { if (p->WID() == pr->WID()) { WIDMatch = true; if (Poco::UTF8::icompare(p->ClientName(), pr->ClientName()) == 0) { + std::cout << "\nADDPROJECT: " << " [WIDMATCH] " + << p->ClientName() << " == " << pr->ClientName() << "\n"; CIDMatch = true; if (Poco::UTF8::icompare(p->FullName(), pr->FullName()) < 0) { + std::cout << "\nADDPROJECT: " << " [WID CIDMATCH] " + << p->FullName() << " == " << pr->FullName() << "\n"; related.Projects.insert(it,p); return; } } else if (CIDMatch) { + std::cout << "\nADDPROJECT: " << " [CIDMATCH] " + << p->FullName() << " == " << pr->FullName() << "\n"; // in case new project is last in client list related.Projects.insert(it,p); return; } else if (p->CID() != 0 && pr->CID() != 0) { if (Poco::UTF8::icompare(p->FullName(), pr->FullName()) < 0) { + std::cout << "\nADDPROJECT: " << " [CID!=0] " + << p->ClientName() << " == " << pr->ClientName() << "\n"; related.Projects.insert(it,p); return; } } } else if (WIDMatch) { + std::cout << "\nADDPROJECT: " << " [WIDMATCH AFTER] " + << p->FullName() << " == " << pr->FullName() << "\n"; //In case new project is last in workspace list related.Projects.insert(it,p); return;