Commit 8e92d4df authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Calculator Runner] Move action check outside of ifdef

Otherwise would always trigger copy to clipboard action if qalculate wasn't available
parent d6e2e408
......@@ -327,13 +327,13 @@ QString CalculatorRunner::calculate(const QString& term, bool *isApproximate)
void CalculatorRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
{
Q_UNUSED(context);
#ifdef ENABLE_QALCULATE
if (match.selectedAction() == action(s_copyToClipboardId)) {
#ifdef ENABLE_QALCULATE
m_engine->copyToClipboard();
}
#else
QGuiApplication::clipboard()->setText(match.text());
QGuiApplication::clipboard()->setText(match.text());
#endif
}
}
QList<QAction *> CalculatorRunner::actionsForMatch(const Plasma::QueryMatch &match)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment