Skip to content

Commit

Permalink
QPrintEngineMac: code tidies
Browse files Browse the repository at this point in the history
In preparation for a change (operator&(enum, flags) producing a
QFlags, not an int), just go through operator&(flags, flags).
This removes the need for a cast to the _enum_ type (although it
requires a enum->flag conversion, which however makes perfect sense.)

Change-Id: I159ee14d894c10365f53ca378bcb18bcf3f89dff
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
  • Loading branch information
dangelog committed May 4, 2021
1 parent 4893116 commit 3a7d0e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/printsupport/platform/macos/qprintengine_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,10 @@
CGContextTranslateCTM(cgContext, page.x() - paper.x(), page.y() - paper.y());
cgEngine->d_func()->orig_xform = CGContextGetCTM(cgContext);
cgEngine->d_func()->setClip(nullptr);
cgEngine->state->dirtyFlags = QPaintEngine::DirtyFlag(QPaintEngine::AllDirty
& ~(QPaintEngine::DirtyClipEnabled
| QPaintEngine::DirtyClipRegion
| QPaintEngine::DirtyClipPath));
cgEngine->state->dirtyFlags = QPaintEngine::DirtyFlags(QPaintEngine::AllDirty)
& ~(QPaintEngine::DirtyClipEnabled
| QPaintEngine::DirtyClipRegion
| QPaintEngine::DirtyClipPath);
if (cgEngine->painter()->hasClipping())
cgEngine->state->dirtyFlags |= QPaintEngine::DirtyClipEnabled;
cgEngine->syncState();
Expand Down

0 comments on commit 3a7d0e5

Please sign in to comment.