diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-08-01 18:33:24 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-08-01 18:33:24 +0800 |
| commit | c13ad48dd3efa67250b7285026f2ad989bf631f3 (patch) | |
| tree | e2d95f9dda33fa805eda094390554be905ccd5bc /qml_plugin/src | |
| parent | ba3e36e562f5028f54840258312caed99577acb0 (diff) | |
fixup! launcher(duckduckgo.rs): qml usable interface
Diffstat (limited to 'qml_plugin/src')
| -rw-r--r-- | qml_plugin/src/launcher/duckduckgo.rs | 7 | ||||
| -rw-r--r-- | qml_plugin/src/launcher/smartcalc.rs | 2 | ||||
| -rw-r--r-- | qml_plugin/src/web/duckduckgo.rs | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/qml_plugin/src/launcher/duckduckgo.rs b/qml_plugin/src/launcher/duckduckgo.rs index 1106212..aa1ce2d 100644 --- a/qml_plugin/src/launcher/duckduckgo.rs +++ b/qml_plugin/src/launcher/duckduckgo.rs @@ -1,11 +1,8 @@ use cxx_qt::Threading; use cxx_qt_lib::QString; -use std::{pin::Pin, ptr}; +use std::pin::Pin; -use crate::{ - RUNTIME, - web::duckduckgo::{self, DuckDuckGoContent}, -}; +use crate::{RUNTIME, web::duckduckgo}; #[cxx_qt::bridge] mod qobject { diff --git a/qml_plugin/src/launcher/smartcalc.rs b/qml_plugin/src/launcher/smartcalc.rs index 7b1b066..eee975d 100644 --- a/qml_plugin/src/launcher/smartcalc.rs +++ b/qml_plugin/src/launcher/smartcalc.rs @@ -104,6 +104,8 @@ impl qobject::SmartCalc { ); qo.as_mut() .set_result( + // TODO: do the calc outside of ts main qt ui render thread.(all + // *.rs) match result { Ok(value) => { if value.formatted == value.input { diff --git a/qml_plugin/src/web/duckduckgo.rs b/qml_plugin/src/web/duckduckgo.rs index 3793485..3b73501 100644 --- a/qml_plugin/src/web/duckduckgo.rs +++ b/qml_plugin/src/web/duckduckgo.rs @@ -117,7 +117,7 @@ pub async fn query(input: &str) -> anyhow::Result<DuckDuckGoContent> { .clone() } else { match i.value { - InfoboxValue::Entity(ref entity_value) => unreachable!(), + InfoboxValue::Entity(_) => unreachable!(), InfoboxValue::String(ref s) => s.to_string(), } } |
