Skip to content

Commit 2de62f9

Browse files
committed
Move mod + use to the top
IDE is dumb, and still not able to resolve references after any top-level cpp! {{ }} invocation. So at least now it can resolve modules.
1 parent cc20cb4 commit 2de62f9

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

qmetaobject/src/lib.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,29 @@ macro_rules! qmetaobject_lazy_static { ($($t:tt)*) => { lazy_static!($($t)*) } }
177177
use std::cell::RefCell;
178178
use std::os::raw::{c_char, c_void};
179179

180-
pub mod qttypes;
180+
pub use itemmodel::*;
181+
pub use listmodel::*;
182+
pub use crate::log::*;
183+
pub use qtdeclarative::*;
184+
pub use qmetatype::*;
185+
pub use connections::RustSignal;
186+
pub use connections::{connect, CppSignal, SignalCppRepresentation};
187+
pub use qtquickcontrols2::*;
188+
pub use future::*;
181189
pub use qttypes::*;
182190

191+
pub mod itemmodel;
192+
pub mod listmodel;
193+
pub mod log;
194+
pub mod qtdeclarative;
195+
pub mod qmetatype;
196+
pub mod qrc;
197+
pub mod connections;
198+
pub mod qtquickcontrols2;
199+
pub mod scenegraph;
200+
pub mod future;
201+
pub mod qttypes;
202+
183203
cpp! {{
184204
#include <qmetaobject_rust.hpp>
185205
}}
@@ -1004,23 +1024,3 @@ pub const USER_ROLE: i32 = 0x0100;
10041024
/// [`$CARGO_MANIFEST_DIR`]: https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
10051025
pub use qmetaobject_impl::qrc_internal as qrc;
10061026
// XXX: The line above re-exports the macro with proper documentation and doctests.
1007-
1008-
pub mod itemmodel;
1009-
pub use itemmodel::*;
1010-
pub mod listmodel;
1011-
pub use listmodel::*;
1012-
pub mod log;
1013-
pub use crate::log::*;
1014-
pub mod qtdeclarative;
1015-
pub use qtdeclarative::*;
1016-
pub mod qmetatype;
1017-
pub use qmetatype::*;
1018-
pub mod qrc;
1019-
pub mod connections;
1020-
pub use connections::RustSignal;
1021-
pub use connections::{connect, CppSignal, SignalCppRepresentation};
1022-
pub mod qtquickcontrols2;
1023-
pub mod scenegraph;
1024-
pub use qtquickcontrols2::*;
1025-
pub mod future;
1026-
pub use future::*;

0 commit comments

Comments
 (0)