Skip to content

Commit

Permalink
Fix compatibility with old Qt versions; Do not look for units (for co…
Browse files Browse the repository at this point in the history
…nversion list) in angle function arguments; Update metainfo; Update snap package
  • Loading branch information
hanna-kn committed Mar 11, 2024
1 parent b512c3c commit 8e0a801
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 11 deletions.
38 changes: 38 additions & 0 deletions data/io.github.Qalculate.qalculate-qt.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,44 @@
</provides>
<translation type="qt">qalculate-qt</translation>
<releases>
<release version="5.0.0" date="2024-03-11">
<description>
<p>Changes:</p>
<ul>
<li>Detection of potential spelling mistakes (a warning will be shown)</li>
<li>Add support for n...m, j:k, and j:i:k syntax, for sequence of numbers, e.g. 1...3 = (1:3) = (1:1:3) = [1 2 3] (note that brackets may be required for colon syntax to avoid conflict with time format)</li>
<li>Improved "where" operator, including improved output of parsed expression, support for previously undefined variable names, and assignments before expression (e.g. "a=2, b=2, a^b")</li>
<li>Click on binary digit in bases dock to flip bit</li>
<li>Improvements/fixes to conversion completion and menus</li>
<li>Add retry and cancel buttons to error dialog after failure to save preferences, definitions, or workspace</li>
<li>Add last result to stack when pressing Enter with empty expression (was unintentionally disabled)</li>
<li>More rounding methods</li>
<li>New units: LightSecond, LightMinute, and LightHour</li>
<li>New functions: bitget(), bitset(), setbits(), integerDigits(), digitGet(), digitSet(), flip(), colon(), and foreach()</li>
<li>Support for hexadecimal floating-point literals using 0x...p... notation (0x1.4p3 = 0x1.4 * 2^3 = 10)</li>
<li>Add support for "decimals" "to"-conversion (display as decimal fraction)</li>
<li>Allow plot grid values higher than 1 (true) to specify line width</li>
<li>Improve handling of zero solution and initial guess in newtonsolve() and secantsolve(), and check validity of solution</li>
<li>Change handling a vectors in multiple function arguments (of non-vector type) - return vector instead of matrix, require equal number of elements, and use the same vector index for all arguments for each function instance (e.g. atan2([1 2], [3 4]) = [atan2(1, 3) atan(2 4)]</li>
<li>Set handle vector property by default, for text, date, and boolean arguments, and for arguments, in global non-builtin functions, without specified type, and enable parsing of vectors for text arguments</li>
<li>Do not apply "read precision" setting to exponents for values with units</li>
<li>Change from line to point (or dot) plot style for data with many discontinuous points</li>
<li>lambertw(x*e^x, 0)=x if x>=-1</li>
<li>Use parentheses for number with scientific notation in more cases</li>
<li>Fix x and y reversed for paired matrix when using plot dialog</li>
<li>Fix saving of handle vector function argument property</li>
<li>Fix saving of multiple names after editing of existing unit</li>
<li>Fix saving of preferences when a workspace, other than the default, is currently open and the general preferences file does not exist</li>
<li>Fix dsolve(diff(y, x) = y), and similar</li>
<li>Fix log(1, 1) (undefined)</li>
<li>Fix "to"-conversion to prefix and add "prefix" conversion option (for optimal prefix)</li>
<li>Fix segfault in newtonsolve() and secantsolve() when equation does not contain variable</li>
<li>Fix conversion to angle unit for complex angle, cis and polar forms</li>
<li>Exchange rates fixes</li>
<li>Minor bug fixes and feature enhancements</li>
</ul>
</description>
</release>
<release version="4.9.0" date="2023-11-27">
<description>
<p>Changes:</p>
Expand Down
8 changes: 4 additions & 4 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: qalculate-qt
title: Qalculate! (Qt)
version: '4.9.0'
version: '5.0.0'
license: GPL-2.0+
summary: The ultimate desktop calculator
description: |
Expand Down Expand Up @@ -42,7 +42,7 @@ apps:
parts:
libqalculate:
source: https://github.com/Qalculate/libqalculate.git
source-tag: v4.9.0
source-tag: v5.0.0
source-depth: 1
plugin: autotools
build-environment:
Expand Down Expand Up @@ -77,8 +77,8 @@ parts:
- -usr/share/lintian

qalculate-qt:
source: https://github.com/Qalculate/qalculate-qt/releases/download/v4.9.0/qalculate-qt-4.9.0.tar.gz
source-checksum: sha512/5945d1c57db14b029bc59e084a02f4c81162a475bd353147dea2a294de239d3dcc3bf646ed695a0ca3f0893d3f52b97a0048b83940c000a1a4778bb8d9513054
source: https://github.com/Qalculate/qalculate-qt/releases/download/v5.0.0/qalculate-qt-5.0.0.tar.gz
source-checksum: sha512/8ad34952004ab46582642db685242a9922fd63db13256feaf70fdf2ea413f77b49fd4a65a860a19e2db6eea9215d237873da4f59b2e0dc00827fcaca90ac6de7
plugin: qmake
build-snaps:
- kde-frameworks-5-core18-sdk
Expand Down
4 changes: 3 additions & 1 deletion src/expressionedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,9 @@ void find_matching_units(const MathStructure &m, const MathStructure *mparse, st
find_matching_units(m2, mparse, v, false);
} else {
for(size_t i = 0; i < m.size(); i++) {
find_matching_units(m[i], mparse, v, false);
if(!m.isFunction() || !m.function()->getArgumentDefinition(i + 1) || m.function()->getArgumentDefinition(i + 1)->type() != ARGUMENT_TYPE_ANGLE) {
find_matching_units(m[i], mparse, v, false);
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/qalculatewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5909,22 +5909,22 @@ void QalculateWindow::updateResultBases() {
QString link_color = binEdit->palette().text().color().name();
bool inhtml = false;
for(; i2 >= 0; i2--) {
if(sbin2[i2] == ">") {
if(sbin2[i2] == '>') {
inhtml = true;
} else if(sbin2[i2] == "<") {
} else if(sbin2[i2] == '<') {
inhtml = false;
} else if(!inhtml && (sbin2[i2] == "0" || sbin2[i2] == "1")) {
} else if(!inhtml && (sbin2[i2] == '0' || sbin2[i2] == '1')) {
sbin2.replace(i2, 1, QString("<a href=\"%1\" style=\"text-decoration: none; color: %3\">%2</a>").arg(n).arg(sbin2[i2]).arg(link_color));
n++;
}
}
inhtml = false;
for(; i1 >= 0; i1--) {
if(sbin1[i1] == ">") {
if(sbin1[i1] == '>') {
inhtml = true;
} else if(sbin1[i1] == "<") {
} else if(sbin1[i1] == '<') {
inhtml = false;
} else if(!inhtml && (sbin1[i1] == "0" || sbin1[i1] == "1")) {
} else if(!inhtml && (sbin1[i1] == '0' || sbin1[i1] == '1')) {
sbin1.replace(i1, 1, QString("<a href=\"%1\" style=\"text-decoration: none; color: %3\">%2</a>").arg(n).arg(sbin1[i1]).arg(link_color));
n++;
}
Expand Down

0 comments on commit 8e0a801

Please sign in to comment.