Skip to content

Commit

Permalink
[trik-checkapp] + installer fixes (trikset#1743)
Browse files Browse the repository at this point in the history
* Add missing QtConcurrent to installer
* Update trik-checkapp submodule
  • Loading branch information
MinyazevR authored Jul 8, 2024
1 parent bfaaf60 commit b79bea4
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ rsync -a "$QT_LIB"/libQt5Script.so* "$PWD"/.
rsync -a "$QT_LIB"/libQt5Test.so* "$PWD"/../data/lib/
rsync -a "$QT_LIB"/libQt5XcbQpa.so* "$PWD"/../data/lib/
rsync -a "$QT_LIB"/libQt5WaylandC{lient,ompositor}.so* "$PWD"/../data/lib/
rsync -a "$QT_LIB"/libQt5Concurrent.so* "$PWD"/../data/lib/

rsync -avR "$QT_PLUGINS"/./{platforms,imageformats,iconengines,wayland-*}/lib*.so "$PWD"/../data/bin/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ copy_qt_lib QtXml
copy_qt_lib QtScript
copy_qt_lib QtTest
copy_qt_lib QtMacExtras
copy_qt_lib QtConcurrent

mkdir "$BUNDLE_CONTENTS/MacOS/platforms"
mkdir "$BUNDLE_CONTENTS/MacOS/imageformats"
Expand Down
2 changes: 1 addition & 1 deletion plugins/robots/checker/twoDModelRunner/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ bool Runner::interpret(const QString &saveFile, const bool background

connect(&mPluginFacade->eventsForKitPlugins(), &kitBase::EventsForKitPluginInterface::interpretationStopped
, this, [this, closeOnFinish, closeOnSuccess](qReal::interpretation::StopReason reason) {
if (closeOnFinish || (closeOnSuccess && reason == qReal::interpretation::StopReason::finised))
if (closeOnFinish || (closeOnSuccess && reason == qReal::interpretation::StopReason::finished))
QTimer::singleShot(0, this, &Runner::close);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ void ConstraintsChecker::programStarted()
void ConstraintsChecker::programFinished(qReal::interpretation::StopReason reason)
{
if (!mSuccessTriggered && !mFailTriggered && mEnabled) {
if (mDefferedSuccessTriggered && reason == qReal::interpretation::StopReason::finised) {
if (mDefferedSuccessTriggered && reason == qReal::interpretation::StopReason::finished) {
onSuccess();
} else {
emit fail(tr("Program has finished, but the task is not accomplished."));
Expand Down
5 changes: 3 additions & 2 deletions plugins/robots/common/twoDModel/src/engine/model/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ void Model::init(qReal::ErrorReporterInterface &errorReporter
// Stopping cannot be performed immediately because we still have constraints to check in event loop
// and they need scene to be alive (in checker stopping interpretation means deleting all).
QTimer::singleShot(0, &interpreterControl,
[&interpreterControl](){ Q_EMIT interpreterControl.stopAllInterpretation(); });
[&interpreterControl]() {
Q_EMIT interpreterControl.stopAllInterpretation(qReal::interpretation::StopReason::finished); });
});
connect(mChecker.data(), &constraints::ConstraintsChecker::fail, this, [&](const QString &message) {
errorReporter.addError(message);
// Stopping cannot be performed immediately because we still have constraints to check in event loop
// and they need scene to be alive (in checker stopping interpretation means deleting all).
QTimer::singleShot(0, &interpreterControl,
[&interpreterControl](){ Q_EMIT interpreterControl.stopAllInterpretation(); });
[&interpreterControl]() { Q_EMIT interpreterControl.stopAllInterpretation(); });
});
connect(mChecker.data(), &constraints::ConstraintsChecker::message, this, [&](const QString &message) {
errorReporter.addInformation(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void TrikKitInterpreterPluginBase::init(const kitBase::KitPluginConfigurator &co
, &TrikTextualInterpreter::completed
, this
, [this](){
this->testStop(qReal::interpretation::StopReason::finised);
this->testStop(qReal::interpretation::StopReason::finished);
});
// refactor?
connect(this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ TEST_F(InterpreterTest, stopRobot)
mEventLoop.exec();
}

mInterpreter->stopRobot(qReal::interpretation::StopReason::finised);
mInterpreter->stopRobot(qReal::interpretation::StopReason::finished);
}
2 changes: 1 addition & 1 deletion qrtranslations/fr/plugins/robots/twoDModel_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
<translation>La tâche a été accomplie en %1 secondes!</translation>
</message>
<message>
<location line="+22"/>
<location line="+23"/>
<source>Error in checker: %1</source>
<translation>Erreur dans le vérificateur : %1</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion qrtranslations/ru/plugins/robots/twoDModel_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@
<translation>Задание выполнено за %1 сек!</translation>
</message>
<message>
<location line="+22"/>
<location line="+23"/>
<source>Error in checker: %1</source>
<translation>Ошибка в проверяющей программе: %1</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion qrutils/interpreter/stopReason.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace interpretation {
enum class StopReason
{
/// Program finished correctly
finised = 0
finished = 0
/// Program finished incorrectly, error occured
, error
/// User stopped program execution (explicitly or implicitly)
Expand Down
2 changes: 1 addition & 1 deletion qrutils/interpreter/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void Thread::stepInto(const Id &diagram)
void Thread::finishedSteppingInto()
{
if (mStack.isEmpty()) {
emit stopped(qReal::interpretation::StopReason::finised);
emit stopped(qReal::interpretation::StopReason::finished);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion qrutils/interpreter/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class QRUTILS_EXPORT Thread : public QObject
void interpret();

/// Stops interpretation. Optionally reason may be specified.
void stop(qReal::interpretation::StopReason reason = qReal::interpretation::StopReason::finised);
void stop(qReal::interpretation::StopReason reason = qReal::interpretation::StopReason::finished);

/// Inserts a message to a message queue.
void newMessage(const QString &message);
Expand Down

0 comments on commit b79bea4

Please sign in to comment.