| 525 | } |
| 526 | |
| 527 | bool equals (const LogEventBase &b) const |
| 528 | { |
| 529 | const LogTargetedEvent *be = dynamic_cast <const LogTargetedEvent *> (&b); |
| 530 | if (! be) { |
| 531 | return false; |
| 532 | } |
| 533 | |
| 534 | std::string name1, name2, cls1, cls2; |
| 535 | int nwidget1, nwidget2; |
| 536 | bool more1, more2; |
| 537 | |
| 538 | tl::Extractor ex1 (m_target.c_str ()); |
| 539 | tl::Extractor ex2 (be->m_target.c_str ()); |
| 540 | do { |
| 541 | |
| 542 | more1 = extract_widget_path (ex1, name1, cls1, nwidget1); |
| 543 | more2 = extract_widget_path (ex2, name2, cls2, nwidget2); |
| 544 | |
| 545 | if (name1 != name2) { |
| 546 | return false; |
| 547 | } |
| 548 | |
| 549 | // transition from non-class to class-based spec.: |
| 550 | if (cls1.empty () == cls2.empty ()) { |
| 551 | if (nwidget1 != nwidget2) { |
| 552 | return false; |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | } while (more1 && more2); |
| 557 | return !more1 && !more2; |
| 558 | } |
| 559 | |
| 560 | QWidget *target_widget () const |
| 561 | { |
nothing calls this directly
no test coverage detected