Skip to content

Commit

Permalink
adjust to Qt5 on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Chunosov committed Nov 24, 2023
1 parent 3faf01f commit 7c7a04e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libs/orion
12 changes: 6 additions & 6 deletions src/core/Formula.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "LuaHelper.h"

#include <QApplication>
#include <QRegularExpression.h>
#include <QRegularExpression>

namespace Z {

Expand All @@ -15,7 +15,7 @@ Formula::Formula(Parameter* target): _target(target)
Formula::~Formula()
{
_target->setValueDriver(ParamValueDriver::None);
for (Z::Parameter* dep : _deps)
foreach (Z::Parameter* dep, _deps)
dep->removeListener(this);
}

Expand All @@ -42,7 +42,7 @@ void Formula::calculate()
return;
}

for (auto dep : _deps)
foreach (auto dep, _deps)
lua.setGlobalVar(dep->alias(), dep->value().toSi());

auto res = lua.calculate(_code);
Expand Down Expand Up @@ -122,7 +122,7 @@ void Formulas::free(Parameter *p)

void Formulas::clear()
{
qDeleteAll(_items.values());
qDeleteAll(_items);
_items.clear();
}

Expand Down Expand Up @@ -150,8 +150,8 @@ bool Formulas::ifDependsOn(Parameter *whichParam, Parameter *onParam) const
Parameters Formulas::dependentParams(Parameter *whichParam) const
{
Parameters result;
for (Formula *formula : _items.values())
for (Parameter *param : formula->deps())
foreach (Formula *formula, _items.values())
foreach (Parameter *param, formula->deps())
if (param == whichParam)
{
if (!result.contains(formula->target()))
Expand Down
4 changes: 4 additions & 0 deletions src/funcs/PlotFuncWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include <QToolButton>
#include <QPen>

#ifdef Q_OS_LINUX
#include <optional>
#endif

QT_BEGIN_NAMESPACE
class QAction;
class QLabel;
Expand Down
4 changes: 4 additions & 0 deletions src/math/StabilityMapFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#include <QApplication>

#ifdef Q_OS_LINUX
#include <optional>
#endif

void StabilityMapFunction::calculate(CalculationMode calcMode)
{
_approxStabBounds.T.clear();
Expand Down

0 comments on commit 7c7a04e

Please sign in to comment.