Skip to content

Commit

Permalink
Enable macOS installer tests (trikset#1899)
Browse files Browse the repository at this point in the history
There is a chance, that this PR destroys copy-n-paste feature on macOS for text files.
* Fix crash with obsolete MacPasteboardMime, just do not use it.
* Enable installer tests for macOS
* Make install script usable locally
* Cleanup warnings
  • Loading branch information
iakov authored Jan 28, 2025
1 parent c0032e5 commit 6f9404f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,22 @@ jobs:
run: |
PATH="" $SHELL -c 'for i in "$GITHUB_WORKSPACE"/tests/*.qrs; do "$TWOD_EXEC_NAME" --generate-path "$i".js --generate-mode javascript --close \
-s 5 --script-path "$i".js -m script "$i"; done'
if: ${{ !startsWith(inputs.os, 'macos') }}
timeout-minutes: 15

- name: Run minimal Python interpeter tests in direct script mode
run: |
PATH="" $SHELL -c 'for i in "$GITHUB_WORKSPACE"/tests/*.qrs; do "$TWOD_EXEC_NAME" --generate-path "$i".py \
--close -s 5 --script-path "$i".py -m script "$i"; done'
if: ${{ !startsWith(inputs.os, 'macos') }}
timeout-minutes: 15

- name: Run minimal Javascript interpeter tests as fields in .qrs (For backward compatibility)
run: |
PATH="" $SHELL -c 'for i in "$GITHUB_WORKSPACE"/tests/*.qrs; do "$PATCHER_NAME" -s "$i".js "$i" \
&& "$TWOD_EXEC_NAME" --close -s 5 -m script "$i"; done'
if: ${{ !startsWith(inputs.os, 'macos') }}
timeout-minutes: 5

- name: Run minimal Python interpeter tests as fields in .qrs (For backward compatibility)
run: |
PATH="" $SHELL -c 'for i in "$GITHUB_WORKSPACE"/tests/*.qrs; do "$PATCHER_NAME" -s "$i".py "$i" \
&& "$TWOD_EXEC_NAME" --close -s 5 -m script "$i"; done'
if: ${{ !startsWith(inputs.os, 'macos') }}
timeout-minutes: 5
6 changes: 6 additions & 0 deletions buildScripts/github/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash
set -euxo pipefail
BUILD_INSTALLER=${BUILD_INSTALLER:-true}
TRIK_QT_VERSION=${TRIK_QT_VERSION:-5.15}
XCODE_VERSION=${XCODE_VERSION:-14.3} # 14.3 on GHA worker is compatible with Qt5.15
TRIK_PYTHON3_VERSION_MINOR=${TRIK_PYTHON3_VERSION_MINOR:-11}


TRIK_PYTHON=python3.${TRIK_PYTHON3_VERSION_MINOR}

install_qt(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ using namespace twoDModel::constraints::details;
using namespace kitBase;

ConditionsFactory::ConditionsFactory(Events &events
, const Variables &variables
, const Objects &objects
, StatusReporter &status)
: mEvents(events)
, mVariables(variables)
, mObjects(objects)
, mStatus(status)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace details {
class ConditionsFactory
{
public:
ConditionsFactory(Events &events, const Variables &variables, const Objects &objects, StatusReporter &status);
ConditionsFactory(Events &events, const Objects &objects, StatusReporter &status);

/// Produces new condition instance that always returnes \a value.
Condition constant(bool value) const;
Expand Down Expand Up @@ -81,7 +81,6 @@ class ConditionsFactory
void reportError(const QString &message) const;

Events &mEvents;
const Variables &mVariables;
const Objects &mObjects;
StatusReporter &mStatus;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ConstraintsParser::ConstraintsParser(Events &events
, mObjects(objects)
, mTimeline(timeline)
, mTriggers(mEvents, mVariables, status)
, mConditions(mEvents, mVariables, mObjects, status)
, mConditions(mEvents, mObjects, status)
, mValues(mVariables, mObjects, status)
{
}
Expand Down
2 changes: 1 addition & 1 deletion qrgui/textEditor/textManagerInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SystemEvents;

namespace text {
class QScintillaTextEdit;
class LanguageInfo;
struct LanguageInfo;
}

class QRGUI_TEXT_EDITOR_EXPORT TextManagerInterface : public QObject
Expand Down
2 changes: 2 additions & 0 deletions qrtest/unitTests/common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ INCLUDEPATH += \
$$PWD/../../ \
$$PWD/testUtils/include \

CONFIG += c++17 # for GTEST

# the line below suppresses warnings generated by google's headers
QMAKE_CXXFLAGS += \
-isystem $$PWD/../thirdparty/googletest/googletest/googletest/include \
Expand Down
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 @@ -4,7 +4,7 @@
<context>
<name>QObject</name>
<message>
<location filename="../../../../plugins/robots/common/twoDModel/src/engine/constraints/details/conditionsFactory.cpp" line="+102"/>
<location filename="../../../../plugins/robots/common/twoDModel/src/engine/constraints/details/conditionsFactory.cpp" line="+100"/>
<location filename="../../../../plugins/robots/common/twoDModel/src/engine/constraints/details/valuesFactory.cpp" line="+102"/>
<source>No such object: %1</source>
<translation>Objet inexistant : %1</translation>
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 @@ -303,7 +303,7 @@
<translation>Атрибут &quot;%1&quot; тэга &quot;%2&quot; не может быть пустым.</translation>
</message>
<message>
<location filename="../../../../plugins/robots/common/twoDModel/src/engine/constraints/details/conditionsFactory.cpp" line="+107"/>
<location filename="../../../../plugins/robots/common/twoDModel/src/engine/constraints/details/conditionsFactory.cpp" line="+105"/>
<source>No such region: %1</source>
<translation>Нет такого региона: %1</translation>
</message>
Expand Down
4 changes: 2 additions & 2 deletions thirdparty/qscintilla/Qt4Qt5/qsciscintillabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <QStyle>
#include <QTextCodec>

#include "SciAccessibility.h"
//#include "SciAccessibility.h"
#include "ScintillaQt.h"


Expand Down Expand Up @@ -116,7 +116,7 @@ QsciScintillaBase::QsciScintillaBase(QWidget *parent)

triple_click.setSingleShot(true);

#if (QT_VERSION >= 0x040200 && QT_VERSION < 0x050000 && defined(Q_OS_MAC)) || (QT_VERSION >= 0x050200 && defined(Q_OS_OSX))
#if DISABLED_BECAUSE_IS_OBSOLETE_AND_CRAHES && ((QT_VERSION >= 0x040200 && QT_VERSION < 0x050000 && defined(Q_OS_MAC)) || (QT_VERSION >= 0x050200 && defined(Q_OS_OSX)))
initialiseRectangularPasteboardMime();
#endif

Expand Down

0 comments on commit 6f9404f

Please sign in to comment.