• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IJHack / QtPass / 25832154348
55%

Build:
DEFAULT BRANCH: main
Ran 13 May 2026 11:28PM UTC
Jobs 1
Files 72
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 May 2026 11:22PM UTC coverage: 32.144% (+0.3%) from 31.891%
25832154348

push

github

web-flow
test(trayicon): widget tests for TrayIcon's parent-window plumbing (#1477)

* test(trayicon): widget tests for TrayIcon's parent-window plumbing

TrayIcon wraps QSystemTrayIcon and routes activation events back to its
parent QMainWindow. Most of the QSystemTrayIcon side only initialises
when the platform reports `isSystemTrayAvailable()` — on a headless CI
(offscreen platform) that's typically false, so the menu / icon setup
path is largely unreachable in unit tests.

What IS reachable regardless of tray availability:
- parent pointer is always stored (set in the constructor body before
  the isSystemTrayAvailable() check);
- showHideParent() operates on the parent directly;
- iconActivated() dispatches on the enum and only calls showHideParent
  for Trigger / DoubleClick — other branches must be no-ops.

Seven tests covering those paths:

- constructionStoresParent: smoke (doesn't crash, returns a bool from
  getIsAllocated).
- showHideParentTogglesVisibility: shown -> hidden -> shown round-trip.
- iconActivatedTriggerTogglesVisibility: Trigger toggles parent
  visibility (single-click / keyboard activation on most platforms).
- iconActivatedDoubleClickTogglesVisibility: DoubleClick toggles
  (Windows users typically reach the tray this way).
- iconActivatedMiddleClickIsNoOp: explicit middle-click branch is a
  no-op.
- iconActivatedUnknownReasonIsNoOp: default branch is also a no-op
  (Unknown + Context).
- getIsAllocatedMatchesPlatformTrayAvailability: getIsAllocated()
  mirrors QSystemTrayIcon::isSystemTrayAvailable().

Build clean, 7/7 tests pass on Linux with system tray available.

Wired into tests/auto/auto.pro SUBDIRS and .gitignore.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(trayicon): QTRY_VERIFY2 with descriptive messages for visibility checks

CodeRabbit nit on #1477: the four QTRY_VERIFY(parent.isVisible()) calls
inside the iconActivated* tests don't say what they're checking. Switch
to QTRY_VERIFY2 wit... (continued)

2162 of 6726 relevant lines covered (32.14%)

27.84 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25832154348.1 13 May 2026 11:28PM UTC 72
32.14
GitHub Action Run
Source Files on build 25832154348
  • Tree
  • List 72
  • Changed 3
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25832154348
  • bbc94a5f on github
  • Prev Build on main (#25831288023)
  • Next Build on main (#25832658123)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc