Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/engraving/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,5 @@ set_property(TARGET ${MODULE} APPEND PROPERTY AUTOMOC_MACRO_NAMES "BEGIN_QT_REGI

if (MUE_BUILD_ENGRAVING_TESTS)
add_subdirectory(tests)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/api/tests)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

set(MODULE_TEST muse_extensions_tests)
set(MODULE_TEST engraving_api_tests)

set(MODULE_TEST_SRC
${CMAKE_CURRENT_LIST_DIR}/util_tests.cpp
)

set(MODULE_TEST_LINK
muse_extensions
muse_global
muse_ui
muse_uicomponents
muse_draw
engraving
)

# Conditionally link to muse_autobot if it exists (not available in all build configurations)
if(TARGET muse_autobot)
list(APPEND MODULE_TEST_LINK muse_autobot)
endif()

include(SetupGTest)
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#include <QString>
#include <QByteArray>

#include "extensions/api/v1/util.h"
#include "engraving/api/v1/util.h"
#include "global/modularity/ioc.h"

using namespace muse::extensions::apiv1;
using namespace mu::engraving::apiv1;

class Extensions_UtilTests : public ::testing::Test
{
Expand Down
2 changes: 2 additions & 0 deletions src/engraving/api/v1/api_v1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ set(API_V1_SRC
${CMAKE_CURRENT_LIST_DIR}/playevent.h
${CMAKE_CURRENT_LIST_DIR}/selection.cpp
${CMAKE_CURRENT_LIST_DIR}/selection.h
${CMAKE_CURRENT_LIST_DIR}/util.cpp
${CMAKE_CURRENT_LIST_DIR}/util.h
)

# Disable unity build to avoid ambiguity errors with api vs dom classes
Expand Down
4 changes: 4 additions & 0 deletions src/engraving/api/v1/qmlpluginapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "cursor.h"
#include "elements.h"
#include "selection.h"
#include "util.h"

#include "log.h"

Expand Down Expand Up @@ -200,6 +201,9 @@ void PluginAPI::registerQmlTypes()
qmlRegisterAnonymousType<OrnamentIntervalWrapper>("MuseScore", 3);
qRegisterMetaType<OrnamentIntervalWrapper*>("OrnamentIntervalWrapper*");

qmlRegisterType<MsProcess>("MuseScore", 3, 0, "QProcess");
qmlRegisterType<FileIO, 1>("FileIO", 3, 0, "FileIO");

qmlTypesRegistered = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

using namespace muse;

namespace muse::extensions::apiv1 {
namespace mu::engraving::apiv1 {
//---------------------------------------------------------
// isPathAllowed
// Check if the file path is within allowed directories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <QDir>
#include <QProcess>

namespace muse::extensions::apiv1 {
namespace mu::engraving::apiv1 {
//---------------------------------------------------------
/// \class FileIO
/// Provides a simple API to perform file reading and
Expand Down
2 changes: 1 addition & 1 deletion src/framework/extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ endif()
setup_module()

if (MUSE_MODULE_EXTENSIONS_TESTS)
add_subdirectory(tests)
# add_subdirectory(tests)
endif()
2 changes: 0 additions & 2 deletions src/framework/extensions/api/v1/apiv1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ set(API_V1_SRC
${CMAKE_CURRENT_LIST_DIR}/filedialog.h
${CMAKE_CURRENT_LIST_DIR}/qqmlsettings.cpp
${CMAKE_CURRENT_LIST_DIR}/qqmlsettings_p.h
${CMAKE_CURRENT_LIST_DIR}/util.cpp
${CMAKE_CURRENT_LIST_DIR}/util.h
)
4 changes: 0 additions & 4 deletions src/framework/extensions/api/v1/extapiv1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "messagedialog.h"
#include "filedialog.h"
#include "qqmlsettings_p.h"
#include "util.h"
#include "iapiv1object.h"

#include "log.h"
Expand All @@ -35,9 +34,6 @@ using namespace muse::extensions::apiv1;

void ExtApiV1::registerQmlTypes()
{
qmlRegisterType<MsProcess>("MuseScore", 3, 0, "QProcess");
qmlRegisterType<FileIO, 1>("FileIO", 3, 0, "FileIO");

qmlRegisterUncreatableType<StandardButton>("MuseScore", 3, 0, "StandardButton", "Cannot create an enumeration");
qmlRegisterType<MessageDialog>("MuseScore", 3, 0, "MessageDialog");
qmlRegisterType<QQmlSettings>("MuseScore", 3, 0, "Settings");
Expand Down
Loading