If libqalculate is not present on the system, calculator runner falls
back to using QJSEngine, which results in significantly reduced
precision. Make calculator runner unconditionally dependent on
Qalculate and remove conditional fallback code to QJSEngine.
BUG: 433730
And comment out the qDebug() calls (the ones without a logging category),
useful for debugging but they spam the terminal output if you e.g. start
systemsettings from terminal.
Also don't print time with debug statements, useful for benchmarking, but
too much output in terminal otherwise.
GIT_SILENT
The current KRunner utility methods have some issues:
- The runner id is kindof useless, especially when we only have one
action
- We basically create a bunch of temporaries whenever we use the utility
methods
- If one really has more actions and more complex logic one is better of
using QHash with the actions and an enum as the key
- In case our query starts with 0x123abc we do not call
the `userFriendlyMultiplication` method which replaces the
x sign with the multiplication operator.
We can be sure that the user wants to parse a hex
value. Also the `=` is not mandatory anymore.
- The hex=mydecimalnumber functionality was broken.
The conversion of the hex value is only done inside of the
if statement and before the values will be the same, unless we do some math operation.
Test Plan:
`=0xf` returns 15
`0xf` return 15
`7x7` returns 49
`hex=15` returns 0xF
`hex=14+1` returns 0xF
BUG: 431362
FIXED-IN: 5.21
BUG: 406388
FIXED-IN: 5.20
This allows us to use a comma as a decimal separator, even if we have a
dot configured.
Especially when there is a difference between the official and
implemented decimal separator (see bug report) or if the user switches
between settings with a different separator.
By making sure that no [ or ] character(used for vectors) is contained
before replacing the string we make sure that we still provide all the
features Qalculate does.
FEATURE: 350066
FIXED-IN: 5.20
This will allow us to run queries like:
4x4
4x4,2
4x,2
But if we explicitly want the x to be interpreted as a
variable by qalculate we can run:
=4x*4
The runner calculator isn't entitled for being a scientifically correct calculator.
This keeps seemingly innocent calculations such as "2^0.333333333" from eating all RAM until it crashes.
A hint is added to the result if it is only an approximation.
BUG: 277011
FIXED-IN: 5.8.7
CCMAIL: kde-i18n-doc@kde.org
Differential Revision: https://phabricator.kde.org/D4290
(cherry picked from commit df7f1ed1eb)
The runner calculator isn't entitled for being a scientifically correct calculator.
This keeps seemingly innocent calculations such as "2^0.333333333" from eating all RAM until it crashes.
A hint is added to the result if it is only an approximation.
BUG: 277011
FIXED-IN: 5.10.0
Differential Revision: https://phabricator.kde.org/D4290
QtScript is deprecated and at least in this place it's a straight-forward port.
The Qalculate code path also doesn't need it, so remove it from CMake there.
Differential Revision: https://phabricator.kde.org/D4472
Previously, they were created on-demand, which was the wrong approach, I think.
Kicker checks for actions() being available before it even bothers getting actions for a match.
CHANGELOG: KRunner actions like "Open containing folder" and "Run in Terminal" will now show up in the application launchers as well
Differential Revision: https://phabricator.kde.org/D3688
This allows to copy the result of a calculation to the clipboard by clicking the "copy" icon next to it
Differential Revision: https://phabricator.kde.org/D1939
In commit 983bacb8 (plasma-framework - 2011-05-20) the mimeDataForMatch
signature was changed. It now accepts a reference instead of a pointer,
but the runners don't seem to have been updated.
This is why we need proper automated tests.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0