From df74bc4c98036f6b0bddf1c9baf772274e33606a Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 26 Jul 2026 20:11:59 +0800 Subject: perf(SmartCalc): cahce query in event of multiple component calling query at once with the same query cleanup: no longer needed qml and unused import --- services/_SmartCalc.qml | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 services/_SmartCalc.qml (limited to 'services') diff --git a/services/_SmartCalc.qml b/services/_SmartCalc.qml deleted file mode 100644 index fd9f134..0000000 --- a/services/_SmartCalc.qml +++ /dev/null @@ -1,37 +0,0 @@ -pragma Singleton -// pragma ComponentBehavior: Bound - -import QtQuick -import Quickshell -import Quickshell.Io - -import qs.config - -import core - -Singleton { - id: root - - property var result: Calc.result - property int result_type: Calc.result_type - readonly property var resultType: ({ - "Math": Calc.Math, - "Unit": Calc.Unit, - "Currency": Calc.Currency, - "Crypto": Calc.Crypto, - "Time": Calc.Time, - "Date": Calc.Date, - "Unset": Calc.Unset - }) - - function query(input: string) { - console.log(input) - Calc.query(input); - } - - - // FIXME: we'll prolly need to reset() everytime here after it finish just so the next time another component using it won't be affected by the previous query - function reset() { - Calc.reset(); - } -} -- cgit v1.2.3