Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Added logging for project add (lib)
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrekV committed Jul 27, 2018
1 parent 3a5a2c0 commit b3f817c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/user.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b3f817c

Please sign in to comment.