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 15, 2024
1 parent bbae2a9 commit 418ee8d
Showing 1 changed file with 4 additions and 0 deletions.
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 418ee8d

Please sign in to comment.