Signed month comparison. Returns 0 for an invalid date.
| 559 | namespace { |
| 560 | // Signed month comparison. Returns 0 for an invalid date. |
| 561 | int monthCmp(const QDate& d, int year, int month) { |
| 562 | if (!d.isValid()) { |
| 563 | return 0; |
| 564 | } |
| 565 | if (d.year() != year) { |
| 566 | return (d.year() < year) ? -1 : +1; |
| 567 | } |
| 568 | if (d.month() != month) { |
| 569 | return (d.month() < month) ? -1 : +1; |
| 570 | } |
| 571 | return 0; |
| 572 | } |
| 573 | } // namespace |
| 574 | |
| 575 | void DualCalendarWidget::advanceMonth(int& year, int& month, int delta) { |
no test coverage detected