Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate public fields of ExportInfo #362

Merged
1 commit merged into from May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gdnative-core/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ impl<C: NativeClass> ClassBuilder<C> {
}

pub fn add_signal(&self, signal: Signal) {
// FIXME(#357): Temporary allow for ExportInfo fields.
#[allow(deprecated)]
unsafe {
let name = GodotString::from_str(signal.name);
let owned = signal
Expand Down
17 changes: 17 additions & 0 deletions gdnative-core/src/init/property.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//! Property registration.

// FIXME(#357): Temporary allow for ExportInfo fields.
#![allow(deprecated)]

use std::mem;

use crate::get_api;
Expand Down Expand Up @@ -30,8 +33,22 @@ pub trait Export: ToVariant {
/// Metadata about the exported property.
#[derive(Debug)]
pub struct ExportInfo {
#[deprecated(
since = "0.8.1",
note = "Fields of ExportInfo will become private in 0.9. Use one of the constructors or Export::export_info instead."
)]
pub variant_type: VariantType,

#[deprecated(
since = "0.8.1",
note = "Fields of ExportInfo will become private in 0.9. Use one of the constructors or Export::export_info instead."
)]
pub hint_kind: sys::godot_property_hint,

#[deprecated(
since = "0.8.1",
note = "Fields of ExportInfo will become private in 0.9. Use one of the constructors or Export::export_info instead."
)]
pub hint_string: GodotString,
}

Expand Down