Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions examples/calculator/FlowchartManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
#include <QtCore/QJsonParseError>
#include <QtCore/QJsonValue>
#include <QtCore/QList>
#include <QtCore/QObject>
#include <QtCore/QRegularExpression>
Expand Down Expand Up @@ -523,9 +524,9 @@ bool FlowchartManager::saveFlowchart(FlowchartPage *page, bool forceSaveAs, bool
}
}

bool const saved = forceSaveAs ? page->saveAs() : page->save();
bool const wasSaved = forceSaveAs ? page->saveAs() : page->save();

if (!saved) {
if (!wasSaved) {
if (showErrorOnFailure) {
QString targetName = page->filePath().isEmpty() ? page->displayName()
: QFileInfo(page->filePath()).fileName();
Expand Down Expand Up @@ -757,7 +758,7 @@ bool FlowchartManager::loadProject(QString const &fileName)

bool anyLoaded = false;

for (QJsonValueConstRef value : charts) {
for (QJsonValue const &value : charts) {
if (!value.isObject())
continue;

Expand Down