Skip to content

Commit

Permalink
cxx-qt-gen: include MaybeLockGuard for extern C++Qt objects
Browse files Browse the repository at this point in the history
As it is used in the signal generation as well.
  • Loading branch information
ahayzen-kdab committed Jan 19, 2024
1 parent e38181b commit d877061
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- `VCPKG` is now set to off by default and packages are only built in release mode in the cache

### Fixed

- Missing include for `MaybeLockGuard` when using only `extern "C++Qt"` signals

## [0.6.0](https://github.com/KDAB/cxx-qt/compare/v0.5.3...v0.6.0) - 2023-11-17

### Added
Expand Down
4 changes: 4 additions & 0 deletions crates/cxx-qt-gen/src/generator/cpp/externcxxqt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ pub fn generate(
let mut block = GeneratedCppExternCxxQtBlocks::default();
let data = generate_cpp_signal(signal, &signal.qobject_ident, cxx_mappings)?;
block.includes = data.includes;
// Ensure that we include MaybeLockGuard<T> that is used in multiple places
block
.includes
.insert("#include <cxx-qt-common/cxxqt_maybelockguard.h>".to_owned());
block.forward_declares = data.forward_declares;
block.fragments = data.fragments;
debug_assert!(data.methods.is_empty());
Expand Down

0 comments on commit d877061

Please sign in to comment.