Skip to content

[gui] let use some classes in batch mode#21907

Open
linev wants to merge 3 commits intoroot-project:masterfrom
linev:gui_batch_fixes
Open

[gui] let use some classes in batch mode#21907
linev wants to merge 3 commits intoroot-project:masterfrom
linev:gui_batch_fixes

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented Apr 14, 2026

  1. Let work with "dummy" TGPicture objects in batch. Even if pixmap is empty - return pointer on existing object to suppress warnings in the TG... constructors
  2. Correctly set ref counter in TGGC constructor. Otherwise instance can be created with wrong refcount value.
  3. In TGLabel set fHasOwnFont flag only when really new TGGC object is allocated. Otherwise in destructor TGLabel tries to delete instance which is not owned. Appears in batch mode

This PR will help to run GUI tests in batch mode like prepared in #21882

linev added 3 commits April 14, 2026 10:12
In batch mode fNormGC is 0 and therefore not equal to the GetDefaultGC(). But in destructor fHasOwnFont used to delete gc object which not allocated by TGLabel
In any situation such created TGGC instance should have proper ref count value
In batch real pixmap manipulation is not possible.
But all instances of TGPicture are created.
In normal mode they are "hidden", but in batch one can return pointer on the picture to suppress many
errors printout in the TG.. classes

By the way - by the first call of `TGPicturePool::GetPicture()` also dummy ` TGPicture` is returned
@github-actions
Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 8h 20m 38s ⏱️
 3 833 tests  3 831 ✅  1 💤 1 ❌
76 555 runs  76 536 ✅ 18 💤 1 ❌

For more details on these failures, see this check.

Results for commit fb1d269.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant