Fixed ki18n. Was broken previously.
No longer returning KLocalizedContex when initializing from QQmlEngine. Unique Pointer was causing errors.
This commit is contained in:
parent
a63078b951
commit
16c65fc226
4 changed files with 21 additions and 12 deletions
|
|
@ -12,7 +12,7 @@ fn cpp_ptr() {
|
|||
let _lock = common::lock_for_test();
|
||||
|
||||
let engine = QmlEngine::new();
|
||||
let context = KLocalizedContext::init_from_engine(&engine);
|
||||
let context = KLocalizedContext::default();
|
||||
|
||||
let context_ptr = context.cpp_ptr();
|
||||
assert_ne!(std::ptr::null(), context_ptr);
|
||||
|
|
@ -24,7 +24,7 @@ fn translation_domain() {
|
|||
let _lock = common::lock_for_test();
|
||||
|
||||
let engine = QmlEngine::new();
|
||||
let mut context = KLocalizedContext::init_from_engine(&engine);
|
||||
let mut context = KLocalizedContext::default();
|
||||
|
||||
const TRANSLATION_DOMAIN: &str = "Test Domain";
|
||||
context.set_translation_domain(TRANSLATION_DOMAIN.into());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue