summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2017-02-13 12:04:44 +0100
committer Eric Hameleers <alien@slackware.com>2017-02-13 12:04:44 +0100
commite39a60732b70eb45d39743d1c4c71ca745da65d0 (patch)
treecd9842ea93e69c9f69790b4e6fa933f8499c0da8
parent52c50a287052b6b63c8f602e4269dee461a94e11 (diff)
downloadktown-e39a60732b70eb45d39743d1c4c71ca745da65d0.tar.gz
ktown-e39a60732b70eb45d39743d1c4c71ca745da65d0.tar.xz
Applications: patches for cantor and kalzium to compile against KF 5.31.
-rw-r--r--kde/patch/cantor.patch4
-rw-r--r--kde/patch/cantor/cantor_julia.patch193
-rw-r--r--kde/patch/cantor/cantor_python.patch31
-rw-r--r--kde/patch/kalzium.patch3
-rw-r--r--kde/patch/kalzium/kalzium_kf_5.31.patch156
5 files changed, 387 insertions, 0 deletions
diff --git a/kde/patch/cantor.patch b/kde/patch/cantor.patch
new file mode 100644
index 0000000..23fca38
--- /dev/null
+++ b/kde/patch/cantor.patch
@@ -0,0 +1,4 @@
+# Fix build against KF 5.31.0:
+cat $CWD/patch/cantor/cantor_python.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+cat $CWD/patch/cantor/cantor_julia.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/cantor/cantor_julia.patch b/kde/patch/cantor/cantor_julia.patch
new file mode 100644
index 0000000..5c381ca
--- /dev/null
+++ b/kde/patch/cantor/cantor_julia.patch
@@ -0,0 +1,193 @@
+Patch taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/kde-apps/cantor/files/cantor-16.12.2-julia-kf-5.31.patch
+
+From 45322d9f58f50df3d4d5755d4199e579f6fd8646 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sat, 11 Feb 2017 22:46:35 +0100
+Subject: [PATCH] [julia] Fix build with -fno-operator-names
+
+REVIEW: 129942
+---
+ src/backends/julia/juliaexpression.cpp | 6 +++---
+ src/backends/julia/juliaextensions.cpp | 4 ++--
+ src/backends/julia/juliahighlighter.cpp | 4 ++--
+ src/backends/julia/juliakeywords.cpp | 10 +++++-----
+ src/backends/julia/juliaserver/juliaserver.cpp | 4 ++--
+ src/backends/julia/juliaserver/main.cpp | 4 ++--
+ src/backends/julia/juliasession.cpp | 4 ++--
+ 7 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/src/backends/julia/juliaexpression.cpp b/src/backends/julia/juliaexpression.cpp
+index 27cdd85..618200d 100644
+--- a/src/backends/julia/juliaexpression.cpp
++++ b/src/backends/julia/juliaexpression.cpp
+@@ -40,7 +40,7 @@ void JuliaExpression::evaluate()
+
+ // Plots integration
+ m_plot_filename.clear();
+- if (juliaSession->integratePlots() and checkPlotShowingCommands()) {
++ if (juliaSession->integratePlots() && checkPlotShowingCommands()) {
+ // Simply add plot saving command to the end of execution
+ QStringList inlinePlotFormats;
+ inlinePlotFormats << QLatin1String("svg");
+@@ -73,8 +73,8 @@ void JuliaExpression::finalize()
+ setResult(new Cantor::TextResult(juliaSession->getOutput()));
+ setStatus(Cantor::Expression::Error);
+ } else {
+- if (not m_plot_filename.isEmpty()
+- and QFileInfo(m_plot_filename).exists()) {
++ if (!m_plot_filename.isEmpty()
++ && QFileInfo(m_plot_filename).exists()) {
+ // If we have plot in result, show it
+ setResult(
+ new Cantor::ImageResult(QUrl::fromLocalFile(m_plot_filename)));
+diff --git a/src/backends/julia/juliaextensions.cpp b/src/backends/julia/juliaextensions.cpp
+index 4585c6f..ad5e3a9 100644
+--- a/src/backends/julia/juliaextensions.cpp
++++ b/src/backends/julia/juliaextensions.cpp
+@@ -138,7 +138,7 @@ QString JuliaPlotExtension::plotFunction2d(
+ {
+ auto new_left = left;
+ auto new_right = right;
+- if (new_left.isEmpty() and new_right.isEmpty()) {
++ if (new_left.isEmpty() && new_right.isEmpty()) {
+ new_left = QLatin1String("-1");
+ new_right = QLatin1String("1");
+ } else if (new_left.isEmpty()) {
+@@ -165,7 +165,7 @@ QString JuliaPlotExtension::plotFunction3d(
+ {
+
+ auto update_interval = [](Interval &interval) {
+- if (interval.first.isEmpty() and interval.second.isEmpty()) {
++ if (interval.first.isEmpty() && interval.second.isEmpty()) {
+ interval.first = QLatin1String("-1");
+ interval.second = QLatin1String("1");
+ } else if (interval.first.isEmpty()) {
+diff --git a/src/backends/julia/juliahighlighter.cpp b/src/backends/julia/juliahighlighter.cpp
+index 4795361..f7d3622 100644
+--- a/src/backends/julia/juliahighlighter.cpp
++++ b/src/backends/julia/juliahighlighter.cpp
+@@ -98,7 +98,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
+ while (pos < text.length()) {
+ // Trying to close current environments
+ bool triggered = false;
+- for (int i = 0; i < flags.size() and not triggered; i++) {
++ for (int i = 0; i < flags.size() && !triggered; i++) {
+ int flag = flags[i];
+ QRegExp &regexp = regexps_ends[i];
+ QTextCharFormat &format = formats[i];
+@@ -144,7 +144,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
+ singleLineCommentStart.indexIn(text, pos);
+
+ if (singleLineCommentStartPos != -1
+- and singleLineCommentStartPos < minPos) {
++ && singleLineCommentStartPos < minPos) {
+ // single line comment starts earlier
+ setFormat(pos, text.length() - pos, commentFormat());
+ break;
+diff --git a/src/backends/julia/juliakeywords.cpp b/src/backends/julia/juliakeywords.cpp
+index f0a5846..8a0efec 100644
+--- a/src/backends/julia/juliakeywords.cpp
++++ b/src/backends/julia/juliakeywords.cpp
+@@ -62,11 +62,11 @@ void JuliaKeywords::loadFromFile()
+ const QStringRef name = xml.name();
+
+ if (name == QLatin1String("keywords")
+- or name == QLatin1String("variables")
+- or name == QLatin1String("plot_showing_commands")) {
++ || name == QLatin1String("variables")
++ || name == QLatin1String("plot_showing_commands")) {
+ while (xml.readNextStartElement()) {
+ Q_ASSERT(
+- xml.isStartElement() and xml.name() == QLatin1String("word")
++ xml.isStartElement() && xml.name() == QLatin1String("word")
+ );
+
+ const QString text = xml.readElementText();
+@@ -91,7 +91,7 @@ void JuliaKeywords::loadFromFile()
+
+ void JuliaKeywords::addVariable(const QString &variable)
+ {
+- if (not m_variables.contains(variable)) {
++ if (!m_variables.contains(variable)) {
+ m_variables << variable;
+ }
+ }
+@@ -104,7 +104,7 @@ void JuliaKeywords::clearVariables()
+
+ void JuliaKeywords::addFunction(const QString &function)
+ {
+- if (not m_functions.contains(function)) {
++ if (!m_functions.contains(function)) {
+ m_functions << function;
+ }
+ }
+diff --git a/src/backends/julia/juliaserver/juliaserver.cpp b/src/backends/julia/juliaserver/juliaserver.cpp
+index c9beb4c..91585cf 100644
+--- a/src/backends/julia/juliaserver/juliaserver.cpp
++++ b/src/backends/julia/juliaserver/juliaserver.cpp
+@@ -47,7 +47,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
+ {
+ // Redirect stdout, stderr to temprorary files
+ QTemporaryFile output, error;
+- if (not output.open() or not error.open()) {
++ if (!output.open() || !error.open()) {
+ qFatal("Unable to create temprorary files for stdout/stderr");
+ return;
+ }
+@@ -90,7 +90,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
+ bool is_nothing = jl_unbox_bool(
+ static_cast<jl_value_t *>(jl_call2(equality, nothing, val))
+ );
+- if (not is_nothing) {
++ if (!is_nothing) {
+ jl_static_show(JL_STDOUT, val);
+ }
+ m_was_exception = false;
+diff --git a/src/backends/julia/juliaserver/main.cpp b/src/backends/julia/juliaserver/main.cpp
+index ad7e4d9..11687ec 100644
+--- a/src/backends/julia/juliaserver/main.cpp
++++ b/src/backends/julia/juliaserver/main.cpp
+@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
+ {
+ QCoreApplication app(argc, argv);
+
+- if (not QDBusConnection::sessionBus().isConnected()) {
++ if (!QDBusConnection::sessionBus().isConnected()) {
+ qWarning() << "Can't connect to the D-Bus session bus.\n"
+ "To start it, run: eval `dbus-launch --auto-syntax`";
+ return 1;
+@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
+ const QString &serviceName =
+ QString::fromLatin1("org.kde.Cantor.Julia-%1").arg(app.applicationPid());
+
+- if (not QDBusConnection::sessionBus().registerService(serviceName)) {
++ if (!QDBusConnection::sessionBus().registerService(serviceName)) {
+ qWarning() << QDBusConnection::sessionBus().lastError().message();
+ return 2;
+ }
+diff --git a/src/backends/julia/juliasession.cpp b/src/backends/julia/juliasession.cpp
+index 425e6cb..9183e11 100644
+--- a/src/backends/julia/juliasession.cpp
++++ b/src/backends/julia/juliasession.cpp
+@@ -86,7 +86,7 @@ void JuliaSession::login()
+ QDBusConnection::sessionBus()
+ );
+
+- if (not m_interface->isValid()) {
++ if (!m_interface->isValid()) {
+ qWarning() << QDBusConnection::sessionBus().lastError().message();
+ return;
+ }
+@@ -213,7 +213,7 @@ bool JuliaSession::getWasException()
+ {
+ const QDBusReply<bool> &reply =
+ m_interface->call(QLatin1String("getWasException"));
+- return reply.isValid() and reply.value();
++ return reply.isValid() && reply.value();
+ }
+
+ void JuliaSession::listVariables()
+--
+2.10.2
+
diff --git a/kde/patch/cantor/cantor_python.patch b/kde/patch/cantor/cantor_python.patch
new file mode 100644
index 0000000..aa2b398
--- /dev/null
+++ b/kde/patch/cantor/cantor_python.patch
@@ -0,0 +1,31 @@
+Patch taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/kde-apps/cantor/files/cantor-16.12.2-python-kf-5.31.patch
+
+commit 4b8ef6bed62daced90c7826985650c2a813d2996
+Author: Jonathan Riddell <jr@jriddell.org>
+Date: Wed Feb 8 14:56:48 2017 +0000
+
+ remove modern C++ use to fix compile with current KDE policy
+
+diff --git a/src/backends/python/pythonhighlighter.cpp b/src/backends/python/pythonhighlighter.cpp
+index 4064524..87b10dd 100644
+--- a/src/backends/python/pythonhighlighter.cpp
++++ b/src/backends/python/pythonhighlighter.cpp
+@@ -87,7 +87,7 @@ void PythonHighlighter::highlightBlock(const QString &text)
+ while (pos < text.length()) {
+ // Trying to close current environments
+ bool triggered = false;
+- for (int i = 0; i < flags.size() and not triggered; i++) {
++ for (int i = 0; i < flags.size() && !triggered; i++) {
+ int flag = flags[i];
+ QRegExp &regexp = regexps[i];
+ QTextCharFormat &format = formats[i];
+@@ -126,7 +126,7 @@ void PythonHighlighter::highlightBlock(const QString &text)
+ singleLineCommentStart.indexIn(text, pos);
+
+ if (singleLineCommentStartPos != -1
+- and singleLineCommentStartPos < minPos) {
++ && singleLineCommentStartPos < minPos) {
+ setFormat(pos, text.length() - pos, commentFormat());
+ break;
+ } else if (minRegexp) {
diff --git a/kde/patch/kalzium.patch b/kde/patch/kalzium.patch
new file mode 100644
index 0000000..12f6609
--- /dev/null
+++ b/kde/patch/kalzium.patch
@@ -0,0 +1,3 @@
+# Fix build against KF 5.31.0:
+cat $CWD/patch/kalzium/kalzium_kf_5.31.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kalzium/kalzium_kf_5.31.patch b/kde/patch/kalzium/kalzium_kf_5.31.patch
new file mode 100644
index 0000000..a3d4e00
--- /dev/null
+++ b/kde/patch/kalzium/kalzium_kf_5.31.patch
@@ -0,0 +1,156 @@
+Patch taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/kde-apps/kalzium/files/kalzium-16.12.2-kf-5.31.patch
+
+From f233d458959548ab371e3faeca7313f746625afc Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Sun, 22 Jan 2017 14:46:24 +0100
+Subject: Fix build with extra-cmake-modules > 5.30
+
+Since a5f3a76e14799c68b5e8f74e375baa5f6f6ab4dc in
+extra-cmake-modules.git -fno-operator-names is passed to the build
+(when supported), causing a build error for kalzium.
+
+REVIEW: 129873
+---
+ src/calculator/titrationCalculator.cpp | 39 +++++++++++++++-------------------
+ 1 file changed, 17 insertions(+), 22 deletions(-)
+
+diff --git a/src/calculator/titrationCalculator.cpp b/src/calculator/titrationCalculator.cpp
+index 44ea152..6ea9ac9 100644
+--- a/src/calculator/titrationCalculator.cpp
++++ b/src/calculator/titrationCalculator.cpp
+@@ -41,11 +41,6 @@
+
+ using namespace std;
+
+-#ifdef _MSC_VER
+-#define and &&
+-#define or ||
+-#endif
+-
+ titrationCalculator::titrationCalculator(QWidget * parent) : QWidget(parent)
+ {
+ xmin = 0;
+@@ -112,7 +107,7 @@ void titrationCalculator::plot()
+ }
+ QString mreporto;
+ int iter = 0;
+- if (uid.xaxis->text() == "" or uid.xaxis->text() == " ") {
++ if (uid.xaxis->text() == "" || uid.xaxis->text() == " ") {
+ uid.xaxis->setText(i18n("nothing"));
+ }
+ if (tmpy == 0) {
+@@ -121,11 +116,11 @@ void titrationCalculator::plot()
+ //now we have to solve the system of equations NOTE:yvalue contains the equation of Y-axis variable
+ //we iterates the process until you have an equation in one only unknown variable or a numeric expression
+ mreporto = solve(yvalue);
+- while (end == 0 or lettere == 1) {
++ while (end == 0 || lettere == 1) {
+ QByteArray ba = mreporto.toLatin1();
+ char *tmreport = ba.data();
+ ++iter;
+- if (end == 1 or lettere == 0) {
++ if (end == 1 || lettere == 0) {
+ break;
+ }
+ if (iter > 100) {
+@@ -273,13 +268,13 @@ QString titrationCalculator::solve(char *yvalue)
+ QString tempyval;
+ QString ptem;
+ for (int i = 0; strlen(yvalue) + 1; ++i) {
+- if (!(yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',')) {
++ if (!(yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',')) {
+ break; //if current value is not a permitted value, this means that something is wrong
+ }
+- if (yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='.' || yvalue[i]==',') {
+ lettere = 1; //if lettere == 0 then the equation contains only mnumbers
+ }
+- if (yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',') {
+ tempyval = tempyval + QString(yvalue[i]);
+ } else {
+ tempy = tempy + QString(yvalue[i]);
+@@ -302,7 +297,7 @@ QString titrationCalculator::solve(char *yvalue)
+ end = 1;
+ }
+ if (tempy!=uid.xaxis->text()) {
+- if (yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',') {
+ //actually nothing
+ } else {
+ end = 0;
+@@ -335,13 +330,13 @@ QString titrationCalculator::solvex(char *yvalue, QString dnum) {
+ QString tempyval;
+ tempy = "";
+ for (int i = 0; strlen(yvalue) + 1; ++i) {
+- if (!(yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',')) {
++ if (!(yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',')) {
+ break; //if current value is not a permitted value, this means that something is wrong
+ }
+- if (yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='.' || yvalue[i]==',') {
+ tempy = tempy + yvalue[i]; //if lettere == 0 then the equation contains only mnumbers
+ }
+- if (yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',') {
+ if (!tempyolda.isEmpty()) {
+ tempy = tempy + yvalue[i];
+ if (tempyolda == uid.xaxis->text()) {
+@@ -359,7 +354,7 @@ QString titrationCalculator::solvex(char *yvalue, QString dnum) {
+ tempyolda = tempyold;
+ } else {
+ tempyold = "";
+- if (((olda != 1) and (yvalue[i + 1] != '^')) or (yvalue[i] == '+' or yvalue[i] == '-' or yvalue[i] == '^' or yvalue[i] == '*' or yvalue[i] == '/' or yvalue[i] == '(' or yvalue[i] == ')')) {
++ if (((olda != 1) && (yvalue[i + 1] != '^')) || (yvalue[i] == '+' || yvalue[i] == '-' || yvalue[i] == '^' || yvalue[i] == '*' || yvalue[i] == '/' || yvalue[i] == '(' || yvalue[i] == ')')) {
+ tempyval = tempyval + QString(yvalue[i]);
+ }
+ }
+@@ -374,7 +369,7 @@ QString titrationCalculator::solvex(char *yvalue, QString dnum) {
+ tempyold = "";
+ olda = 1;
+ }
+- if ((tempy==uid.xaxis->text()) and (!tempyolda.isEmpty())) {
++ if ((tempy==uid.xaxis->text()) && (!tempyolda.isEmpty())) {
+ if (yvalue[i + 1] != '^') {
+ tempyval = tempyval + dnum;
+ }
+@@ -611,7 +606,7 @@ void titrationCalculator::on_actionOpen_triggered()
+ if (tmpchr != '|') {
+ tempyval = tempyval + tmpchr;
+ } else {
+- if ((tablea == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((tablea == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ if ((i % 2) != 0) {
+ QTableWidgetItem *titemo = uid.tableWidget->item((i - 1) / 2, 1);
+ if (titemo) {
+@@ -626,7 +621,7 @@ void titrationCalculator::on_actionOpen_triggered()
+ ++i;
+ }
+
+- if ((tableb == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((tableb == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ if ((i % 2) != 0) {
+ QTableWidgetItem *titemo = uid.tableWidget_2->item((i - 1) / 2, 1);
+ if (titemo) {
+@@ -641,13 +636,13 @@ void titrationCalculator::on_actionOpen_triggered()
+ }
+ ++i;
+ }
+- if ((xax == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((xax == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ uid.xaxis->setText(tempyval);
+ }
+- if ((yax == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((yax == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ uid.yaxis->setText(tempyval);
+ }
+- if ((notea == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((notea == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ uid.note->setText(tempyval);
+ }
+
+--
+cgit v0.11.2
+
+