From 06b13ab5ad5f2f62254c00615562198f07328345 Mon Sep 17 00:00:00 2001 From: Ayush Singh Date: Wed, 1 Dec 2021 06:54:07 +0530 Subject: [PATCH] Removing macros from qmethobject. Didn't really help much. --- src/lib.rs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a5d3e92..283d530 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,30 +39,10 @@ //! engine.exec(); //! } //! ``` +use cpp::{cpp, cpp_class}; use qmetaobject::prelude::*; use std::ffi::c_void; -#[cfg(not(no_qt))] -use cpp::{cpp, cpp_class}; - -#[cfg(no_qt)] -mod no_qt { - pub fn panic() -> T { - panic!("This example is not supported on Qt 6 and above") - } -} - -#[cfg(no_qt)] -macro_rules! cpp { - {{ $($t:tt)* }} => {}; - {$(unsafe)? [$($a:tt)*] -> $ret:ty as $b:tt { $($t:tt)* } } => { - crate::no_qt::panic::<$ret>() - }; - { $($t:tt)* } => { - crate::no_qt::panic::<()>() - }; -} - cpp! {{ #include #include