Fix addition of unit to parsed expression without unit (when trying to convert to a unit) in exact mode; Use preferred input name for base units in unit edit dialog; Set tooltip for url in history view; Update translations; Update metainfo
This commit is contained in:
parent
9527474af5
commit
929fd4b9d9
2
README
2
README
@ -12,7 +12,7 @@ Qt, and CLI).
|
||||
1. Requirements
|
||||
|
||||
* Qt (>= 5.6)
|
||||
* libqalculate (>= 4.1.0)
|
||||
* libqalculate (>= 4.2.0)
|
||||
|
||||
2. Installation
|
||||
|
||||
|
@ -68,6 +68,36 @@
|
||||
</provides>
|
||||
<translation type="qt">qalculate-qt</translation>
|
||||
<releases>
|
||||
<release version="4.2.0" date="2022-05-25">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Variable spacing of x values in plot (unless step size is used)</li>
|
||||
<li>Option to plot real and imaginary parts separately (enabled by default)</li>
|
||||
<li>Updated plot() function with arguments for specification of plot options (in any order after the third argument)</li>
|
||||
<li>Polar plot style</li>
|
||||
<li>Ask the user for the desired sinc() variant (unnormalized or normalized)</li>
|
||||
<li>Support for binary-coded decimals (BCD)</li>
|
||||
<li>Show names with underscore capitalized and with underscore removed (with some exceptions)</li>
|
||||
<li>Additional information units</li>
|
||||
<li>Units for volumetric flow rate</li>
|
||||
<li>Tradtional numbers (e.g. dozen, score)</li>
|
||||
<li>Show warning when log() is used with a single argument, and always show second argument of log()</li>
|
||||
<li>Make names with a single character followed by digits case-sensitive with suffix by default</li>
|
||||
<li>Accept more than two arguments in gcd() and lcm()</li>
|
||||
<li>Interpret a single vector argument as a list of arguments if function requires more than one argument</li>
|
||||
<li>Insert minus instead of executing RPN operation, on key press, when last character is e</li>
|
||||
<li>Updated Tab key behaviour, e.g. cycle through completion items on subsequent tab key presses, and traverse items if tab key is unbound</li>
|
||||
<li>Fix segfault when result is a currency with quantity of one</li>
|
||||
<li>Fix copy keyboard shortcut in expression entry</li>
|
||||
<li>Fix limit of floor(), ceil(), and trunc()</li>
|
||||
<li>Fix plotting of derivatives and integrals</li>
|
||||
<li>Fix randpoisson()</li>
|
||||
<li>Fix reactivation of object, after object that caused deactivation is removed</li>
|
||||
<li>Minor bug fixes and feature enhancements</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="4.1.1" date="2022-04-04">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
|
@ -2462,7 +2462,10 @@ void ExpressionEdit::displayParseStatus(bool update, bool show_tooltip) {
|
||||
CALCULATOR->beginTemporaryStopMessages();
|
||||
MathStructure to_struct(mparse);
|
||||
to_struct.unformat();
|
||||
ApproximationMode abak = settings->evalops.approximation;
|
||||
if(settings->evalops.approximation == APPROXIMATION_EXACT) settings->evalops.approximation = APPROXIMATION_TRY_EXACT;
|
||||
to_struct = CALCULATOR->convertToOptimalUnit(to_struct, settings->evalops, true);
|
||||
settings->evalops.approximation = abak;
|
||||
fix_to_struct_qt(to_struct);
|
||||
if(!to_struct.isZero()) {
|
||||
mparse2 = new MathStructure();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <QMimeData>
|
||||
#include <QDate>
|
||||
#include <QDesktopServices>
|
||||
#include <QToolTip>
|
||||
#include <QDebug>
|
||||
|
||||
#include <libqalculate/qalculate.h>
|
||||
@ -300,7 +301,7 @@ void remove_top_border(QString &s_text) {
|
||||
}
|
||||
|
||||
QString get_uah(QWidget *w) {
|
||||
if((settings->first_time || settings->preferences_version[0] < 4 || (settings->preferences_version[0] == 4 && settings->preferences_version[1] == 0)) && settings->history_answer.empty() && QDate::currentDate().year() == 2022 && QDate::currentDate().month() < 9) {
|
||||
if((settings->first_time || settings->preferences_version[0] < 4 || (settings->preferences_version[0] == 4 && settings->preferences_version[1] == 0)) && settings->history_answer.empty() && QDate::currentDate().year() == 2022 && QDate::currentDate().month() < 8) {
|
||||
QFontMetrics fm(w->font());
|
||||
return QString("<tr><td colspan=\"2\" style=\"text-align:center; padding-top: 6px; padding-bottom: 12px\"><a href=\"https://en.wikipedia.org/wiki/War_crimes_in_the_2022_Russian_invasion_of_Ukraine\"><img src=\":/data/flags/UAH.png\" height=\"%1\"></a></td>").arg(fm.ascent() * 1.5);
|
||||
}
|
||||
@ -560,8 +561,14 @@ void HistoryView::addMessages() {
|
||||
}
|
||||
void HistoryView::mouseMoveEvent(QMouseEvent *e) {
|
||||
QString str = anchorAt(e->pos());
|
||||
if(str.isEmpty()) viewport()->setCursor(Qt::IBeamCursor);
|
||||
else viewport()->setCursor(Qt::PointingHandCursor);
|
||||
if(str.isEmpty()) {
|
||||
viewport()->setCursor(Qt::IBeamCursor);
|
||||
} else {
|
||||
viewport()->setCursor(Qt::PointingHandCursor);
|
||||
if(str == "https://en.wikipedia.org/wiki/War_crimes_in_the_2022_Russian_invasion_of_Ukraine") {
|
||||
QToolTip::showText(mapToGlobal(e->pos()), "Please inform yourself about the war crimes\ncommitted against the Ukrainian people.", this);
|
||||
}
|
||||
}
|
||||
QTextEdit::mouseMoveEvent(e);
|
||||
}
|
||||
void HistoryView::mouseDoubleClickEvent(QMouseEvent *e) {
|
||||
|
@ -349,7 +349,7 @@ void UnitEditDialog::setUnit(Unit *u) {
|
||||
case SUBTYPE_ALIAS_UNIT: {
|
||||
AliasUnit *au = (AliasUnit*) u;
|
||||
mixBox->setChecked(au->mixWithBase() > 0);
|
||||
baseEdit->setText(QString::fromStdString(au->firstBaseUnit()->preferredDisplayName(settings->printops.abbreviate_names, true, false, false, &can_display_unicode_string_function, (void*) baseEdit).formattedName(STRUCT_UNIT, true)));
|
||||
baseEdit->setText(QString::fromStdString(au->firstBaseUnit()->preferredInputName(settings->printops.abbreviate_names, true, false, false, &can_display_unicode_string_function, (void*) baseEdit).formattedName(STRUCT_UNIT, true)));
|
||||
exponentEdit->setValue(au->firstBaseExponent());
|
||||
mbunEdit->setValue(au->mixWithBaseMinimum() > 1 ? au->mixWithBaseMinimum() : 1);
|
||||
priorityEdit->setValue(au->mixWithBase());
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user