Skip to content
Snippets Groups Projects
Verified Commit d426f7d0 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

fix: cannot send stop signal properly and settings path may not exist

parent 304d6f90
No related branches found
No related tags found
No related merge requests found
Pipeline #76711 passed
......@@ -197,11 +197,20 @@ void Backend::runProject(const QString &id, const QByteArray &projectData)
Qt::QueuedConnection,
Q_ARG(QString, id));
bool retVal;
QMetaObject::invokeMethod(m_projectManager.get(),
"runProject",
Qt::QueuedConnection,
Q_ARG(QByteArray, projectData),
Q_ARG(bool, autoScaleProject()));
Q_ARG(bool, autoScaleProject()),
Q_RETURN_ARG(bool, retVal));
if (!retVal) {
QMetaObject::invokeMethod(m_dsManager.get(),
"sendProjectStopped",
Qt::QueuedConnection,
Q_ARG(QString, id));
}
emit popupClose();
}
......
......@@ -3,6 +3,7 @@
#include "settings.h"
#include <QDir>
#include <QFile>
#include <QJsonDocument>
#include <QStandardPaths>
......@@ -20,6 +21,13 @@ Settings::Settings()
QStandardPaths::writableLocation(QStandardPaths::ConfigLocation).append("/settings.json"))
{
qDebug() << "Settings path:" << m_settingsPath;
const QDir dir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation));
if (!dir.exists()) {
qWarning() << "Settings directory does not exist. Creating one.";
dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation));
}
if (!loadSettings()) {
qDebug() << "Failed to load settings. Applying default ones.";
applyDefaultSettings();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment