window: Disable inspector on release builds

This commit is contained in:
Bilal Elmoussaoui 2022-06-10 21:23:30 +02:00
parent da507399ca
commit 7e5dd0029c

View file

@ -109,7 +109,16 @@ mod imp {
impl ObjectImpl for Window {}
impl WidgetImpl for Window {}
impl WindowImpl for Window {}
impl WindowImpl for Window {
fn enable_debugging(&self, window: &Self::Type, toggle: bool) -> bool {
if config::PROFILE != "Devel" {
tracing::warn!("Inspector is disabled for non development builds");
false
} else {
self.parent_enable_debugging(window, toggle)
}
}
}
impl ApplicationWindowImpl for Window {}
impl AdwApplicationWindowImpl for Window {}
}