Skip to content

0.6.0

Compare
Choose a tag to compare
@ahayzen-kdab ahayzen-kdab released this 17 Nov 17:16
· 384 commits to main since this release

Added

  • Allow associated constants, types and macro invocations within impl qobject::T blocks
  • Ensure that generated Rust code works when #![deny(missing_docs)] is enabled
  • Ability to connect and disconnect from signals in Rust triggering a function pointer or closure
  • unsafe impl !cxx_qt::Locking for qobject::T to disable internal locking
  • Deref is now implemented for qobject::T to reach the T Rust struct
  • Support for C++ only methods by not having a #[qinvokable] attribute
  • Ability to define a custom C++ Constructor using cxx_qt::Constructor
  • cxx_qt::Initialize trait for easier default-constructor implementation
  • extern "C++Qt" block support for declaring existing types with methods and signals
  • #[qenum] attribute for Q_ENUM and Q_ENUM_NS support
  • qnamespace! macro to support exposing namespaced enums to QML

Changed

  • Pretty-print errors messages when build script fails
  • QDateTime API to use current_date_time rather than current_date
  • Always call qt_build_utils::setup_linker() in CxxQtBuilder and remove the proxy method
  • Moved to syn 2.0 internally and for any exported syn types
  • impl cxx_qt::Threading for qobject::T now needs to be specified for qt_thread() to be available
  • #[cxx_qt::qsignals] and #[cxx_qt::inherit] are now used in an extern "RustQt" block as #[qsignal] and #[inherit]
  • #[qinvokable] is now defined as a signature in extern "RustQt"
  • rust_mut is now safe to call
  • #[qproperty] is now defined as an attribute on the qobject rather than the field
  • QObject struct is now split between the bridge and implementation outside via a type alias
  • qobject module is no longer generated
  • impl cxx_qt::trait for qobject::T inside the bridge is now impl cxx_qt::trait for T
  • qobject::T as the self parameter in the bridge is now T
  • #[cxx_override], #[cxx_final], #[cxx_virtual] are now independant attributes rather than embedded in #[qinvokable]
  • Use set_organization_name instead of q{core,gui}application_set_organization_name in cxx-qt-lib

Fixed

  • Do not use -bundle otherwise CMake builds are missing qt-static-initalizers (note this is broken in rustc 1.69)
  • Do not import Pin in hidden module as invokables are outside now, resolving IDE integration
  • Rust always links against a non-debug Windows runtime with *-msvc targets, so we need to link to MultiThreadedDLL

Removed

  • Removed support for cxx_type and cxx_return_type and related conversion methods.
  • Removed newCppObject function that allowed creation of default-constructed QObject from Rust.
  • Generation of getter and setter for private Rust fields
  • Generation of mutable getter for properties, instead use rust_mut