Changeset View
Changeset View
Standalone View
Standalone View
src/kstatusnotifieritem.cpp
Show First 20 Lines • Show All 610 Lines • ▼ Show 20 Line(s) | 608 | { | |||
---|---|---|---|---|---|
611 | if (d->status == NeedsAttention) { | 611 | if (d->status == NeedsAttention) { | ||
612 | d->status = Active; | 612 | d->status = Active; | ||
613 | #ifdef Q_OS_MACOS | 613 | #ifdef Q_OS_MACOS | ||
614 | QtMac::setBadgeLabelText(QString()); | 614 | QtMac::setBadgeLabelText(QString()); | ||
615 | #endif | 615 | #endif | ||
616 | emit d->statusNotifierItemDBus->NewStatus(QString::fromLatin1(metaObject()->enumerator(metaObject()->indexOfEnumerator("ItemStatus")).valueToKey(d->status))); | 616 | emit d->statusNotifierItemDBus->NewStatus(QString::fromLatin1(metaObject()->enumerator(metaObject()->indexOfEnumerator("ItemStatus")).valueToKey(d->status))); | ||
617 | } | 617 | } | ||
618 | 618 | | |||
619 | if (d->associatedWidget == d->menu) { | 619 | if (d->associatedWidget && d->associatedWidget == d->menu) { | ||
kmaterka: This should fix a situation when both are NULL | |||||
620 | d->statusNotifierItemDBus->ContextMenu(pos.x(), pos.y()); | 620 | d->statusNotifierItemDBus->ContextMenu(pos.x(), pos.y()); | ||
621 | return; | 621 | return; | ||
622 | } | 622 | } | ||
623 | 623 | | |||
624 | if (d->menu->isVisible()) { | 624 | if (d->menu && d->menu->isVisible()) { | ||
625 | d->menu->hide(); | 625 | d->menu->hide(); | ||
626 | } | 626 | } | ||
627 | 627 | | |||
628 | if (!d->associatedWidget) { | 628 | if (!d->associatedWidget) { | ||
629 | emit activateRequested(true, pos); | 629 | emit activateRequested(true, pos); | ||
630 | return; | 630 | return; | ||
631 | } | 631 | } | ||
632 | 632 | | |||
▲ Show 20 Lines • Show All 526 Lines • Show Last 20 Lines |
This should fix a situation when both are NULL