Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_4.0.2 #16422

Merged
merged 23 commits into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fdb939d
Fixed the body for newly created score
Eism Feb 14, 2023
a408c1a
Error about not being able to upload newly created score
Eism Feb 14, 2023
706617a
Fix QML warning in "How would you like to save?" dialog
cbjeukendrup Feb 9, 2023
561d7a8
Fix text wrap in Score Upload Success dialog
cbjeukendrup Feb 9, 2023
0cb3246
Fix vertical spacing in Score Upload Success dialog
cbjeukendrup Feb 9, 2023
2a6d94c
Fix width of checkboxes in New Workspace dialog
cbjeukendrup Feb 9, 2023
d680590
Elide text at the borders of FlatButton
cbjeukendrup Feb 9, 2023
741ea81
reverted PR #12152
RomanPudashkin Feb 6, 2023
e5c7b4e
fix #12150
RomanPudashkin Feb 6, 2023
6b44aa9
fix #16206
RomanPudashkin Feb 13, 2023
5f6f693
added the ability to manually corrupt the open score (for testing pur…
RomanPudashkin Feb 13, 2023
14add38
Score sanity check: also check part scores
cbjeukendrup Jan 20, 2023
9d98e3a
Fix QML error reg. accessibility in ErrorDetailsView.qml
cbjeukendrup Jan 20, 2023
c3095b1
Add horizontal scrollbar in ErrorDetailsView
cbjeukendrup Jan 25, 2023
1467387
Revert "Fix crash on deleting "system object" staff"
mike-spa Jan 12, 2023
6d0c41e
Improved management of system objects upon deleting/reinserting staves
mike-spa Feb 10, 2023
2b80d36
Fix keyboard navigation for DockTitleBar
cbjeukendrup Jan 25, 2023
2a00fed
DockTitleBar navigation fix
Eism Feb 9, 2023
cbb2530
Fix #16141: Add 'Text Line Spacing' option in the Text properties panel
octopols Feb 13, 2023
accffcf
Add "user dir" default paths for sampler
iamtesch Feb 8, 2023
811bced
Fix code style
iamtesch Feb 8, 2023
e0c6a37
Update MACOSX_DEPLOYMENT_TARGET in setup.sh
cbjeukendrup Feb 16, 2023
80450a5
Fix macOS CI
cbjeukendrup Feb 16, 2023
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
6 changes: 3 additions & 3 deletions build/ci/macos/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "Setup MacOS build environment"
trap 'echo Setup failed; exit 1' ERR
SKIP_ERR_FLAG=true

export MACOSX_DEPLOYMENT_TARGET=10.10
export MACOSX_DEPLOYMENT_TARGET=10.14

# install dependencies
wget -c --no-check-certificate -nv -O bottles.zip https://musescore.org/sites/musescore.org/files/2020-02/bottles-MuseScore-3.0-yosemite.zip
Expand Down Expand Up @@ -91,9 +91,9 @@ installBottleManually libsndfile

# fixing install python 3.9 error (it is a dependency for ninja)
rm '/usr/local/bin/2to3'
brew install ninja

brew install ninja pkg-config

# Qt
export QT_SHORT_VERSION=5.15.2
export QT_PATH=$HOME/Qt
export QT_MACOS=$QT_PATH/$QT_SHORT_VERSION/clang_64
Expand Down
2 changes: 1 addition & 1 deletion build/cmake/FindSndFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ elseif (OS_IS_WASM)

else()
# Use pkg-config to get hints about paths
find_package(PkgConfig QUIET)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(LIBSNDFILE_PKGCONF sndfile>=1.0.25 QUIET)
endif()
Expand Down
1 change: 1 addition & 0 deletions src/appshell/appshell.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<file>qml/HomePage/PluginsPage.qml</file>
<file>qml/DevTools/Gallery/GeneralComponentsGallery.qml</file>
<file>qml/DevTools/CrashHandler/CrashHandlerDevTools.qml</file>
<file>qml/DevTools/CorruptScore/CorruptScoreDevTools.qml</file>
<file>qml/AboutDialog.qml</file>
<file>qml/AboutMusicXMLDialog.qml</file>
<file>qml/resources/mu_logo.svg</file>
Expand Down
18 changes: 10 additions & 8 deletions src/appshell/internal/applicationactioncontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
#include "applicationactioncontroller.h"

#include <QCoreApplication>
#include <QApplication>
#include <QCloseEvent>
#include <QFileOpenEvent>
Expand All @@ -31,6 +30,7 @@
#include "async/async.h"
#include "audio/synthtypes.h"

#include "defer.h"
#include "translation.h"
#include "log.h"

Expand Down Expand Up @@ -161,6 +161,15 @@ mu::ValCh<bool> ApplicationActionController::isFullScreen() const

bool ApplicationActionController::quit(bool isAllInstances, const io::path_t& installerPath)
{
if (m_quiting) {
return false;
}

m_quiting = true;
DEFER {
m_quiting = false;
};

if (!projectFilesController()->closeOpenedProject()) {
return false;
}
Expand Down Expand Up @@ -284,10 +293,3 @@ void ApplicationActionController::revertToFactorySettings()

restart();
}

bool ApplicationActionController::canReceiveAction(const mu::actions::ActionCode& code) const
{
Q_UNUSED(code);
auto focus = QGuiApplication::focusWindow();
return !focus || focus->modality() == Qt::WindowModality::NonModal;
}
3 changes: 2 additions & 1 deletion src/appshell/internal/applicationactioncontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class ApplicationActionController : public QObject, public IApplicationActionCon
void onDragEnterEvent(QDragEnterEvent* event) override;
void onDragMoveEvent(QDragMoveEvent* event) override;
void onDropEvent(QDropEvent* event) override;
bool canReceiveAction(const mu::actions::ActionCode&) const override;

private:
bool eventFilter(QObject* watched, QEvent* event) override;
Expand All @@ -87,6 +86,8 @@ class ApplicationActionController : public QObject, public IApplicationActionCon

void revertToFactorySettings();

bool m_quiting = false;

async::Channel<bool> m_fullScreenChannel;
async::Channel<actions::ActionCodeList> m_actionsReceiveAvailableChanged;
};
Expand Down
74 changes: 74 additions & 0 deletions src/appshell/qml/DevTools/CorruptScore/CorruptScoreDevTools.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick 2.15

import MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
import MuseScore.Diagnostics 1.0

Rectangle {
color: ui.theme.backgroundSecondaryColor

CorruptScoreDevToolsModel {
id: model
}

Column {
anchors.top: parent.top
anchors.left: parent.left
anchors.margins: 12

spacing: 12

Rectangle {
readonly property real padding: 12

width: hintLabel.implicitWidth + 2 * padding
height: hintLabel.implicitHeight + 2 * padding

color: Utils.colorWithAlpha(border.color, 0.25)
border.color: "red"
border.width: 1
radius: 6

Row {
id: hintLabel
anchors.fill: parent
anchors.margins: parent.padding
spacing: 4

StyledIconLabel {
iconCode: IconCode.WARNING
}

StyledTextLabel {
text: "DANGER! This button does exactly what it says!"
}
}
}

FlatButton {
text: "Corrupt the open score"
onClicked: model.corruptOpenScore()
}
}
}
9 changes: 9 additions & 0 deletions src/appshell/qml/DevTools/DevToolsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import MuseScore.Mpe 1.0
import "./Gallery"
import "./Interactive"
import "./CrashHandler"
import "./CorruptScore"
import "./KeyNav"
import "./Preferences"

Expand All @@ -48,6 +49,7 @@ DockPage {
case "gallery": root.central = galleryComp; break
case "interactive": root.central = interactiveComp; break
case "crashhandler": root.central = crashhandlerComp; break
case "corruptscore": root.central = corruptScoreComp; break
case "mpe": root.central = mpeComponent; break
case "navigation": root.central = keynavComp; break
}
Expand Down Expand Up @@ -78,6 +80,7 @@ DockPage {
{ "name": "gallery", "title": "UI Gallery" },
{ "name": "interactive", "title": "Interactive" },
{ "name": "crashhandler", "title": "Crash handler" },
{ "name": "corruptscore", "title": "Corrupt score" },
{ "name": "mpe", "title": "MPE" },
{ "name": "navigation", "title": "KeyNav" }
]
Expand Down Expand Up @@ -116,6 +119,12 @@ DockPage {
CrashHandlerDevTools {}
}

Component {
id: corruptScoreComp

CorruptScoreDevTools {}
}

Component {
id: mpeComponent

Expand Down
24 changes: 24 additions & 0 deletions src/appshell/qml/DevTools/Gallery/GeneralComponentsGallery.qml
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,36 @@ Rectangle {
text: "Text with icon"
}

FlatButton {
icon: IconCode.SAVE
text: "Suuuuuuuuuuuuuper long text with icon"
}

FlatButton {
icon: IconCode.SAVE
text: "Elided suuuuuuuuuuuuuper long text with icon"
width: 132
}

FlatButton {
icon: IconCode.SAVE
text: "Text with icon"
orientation: Qt.Horizontal
}

FlatButton {
icon: IconCode.SAVE
text: "Suuuuuuuuuuuuuper long text with icon"
orientation: Qt.Horizontal
}

FlatButton {
icon: IconCode.SAVE
text: "Elided suuuuuuuuuuuuuper long text with icon"
orientation: Qt.Horizontal
width: 132
}

FlatButton {
text: "Just text"
}
Expand Down
1 change: 1 addition & 0 deletions src/appshell/qml/NotationPage/NotationPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ DockPage {

MixerPanel {
navigationSection: mixerPanel.navigationSection
navigationPanelOrderStart: mixerPanel.navigationPanelOrderStart

Component.onCompleted: {
mixerPanel.contextMenuModel = contextMenuModel
Expand Down
5 changes: 4 additions & 1 deletion src/appshell/qml/dockwindow/DockFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Rectangle {
order: 1

onNavigationEvent: function(event) {
if (event.type === NavigationEvent.AboutActive) {
if (event.type === NavigationEvent.AboutActive && tabsPanel.visible) {
event.setData("controlName", tabs.currentItem.navigation.name)
}
}
Expand All @@ -87,6 +87,9 @@ Rectangle {
visible: frameModel.titleBarVisible
isHorizontalPanel: frameModel.isHorizontalPanel

navigation.panel: navPanel
navigation.order: 1

onHandleContextMenuItemRequested: function(itemId) {
frameModel.handleMenuItem(itemId)
}
Expand Down
2 changes: 2 additions & 0 deletions src/appshell/qml/dockwindow/DockPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ DockPanelView {

default property alias contentComponent : contentLoader.sourceComponent

property int navigationPanelOrderStart: 1 // take into account the context menu button

Loader {
id: contentLoader

Expand Down
2 changes: 2 additions & 0 deletions src/appshell/qml/dockwindow/DockTitleBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Item {
property alias heightWhenVisible: titleBar.heightWhenVisible
property bool isHorizontalPanel: false

property alias navigation: contextMenuButton.navigation

signal handleContextMenuItemRequested(string itemId)

width: parent.width
Expand Down
2 changes: 2 additions & 0 deletions src/diagnostics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ set(MODULE_SRC

${CMAKE_CURRENT_LIST_DIR}/devtools/crashhandlerdevtoolsmodel.cpp
${CMAKE_CURRENT_LIST_DIR}/devtools/crashhandlerdevtoolsmodel.h
${CMAKE_CURRENT_LIST_DIR}/devtools/corruptscoredevtoolsmodel.cpp
${CMAKE_CURRENT_LIST_DIR}/devtools/corruptscoredevtoolsmodel.h
)

# --- Crashpad ---
Expand Down
67 changes: 67 additions & 0 deletions src/diagnostics/devtools/corruptscoredevtoolsmodel.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "corruptscoredevtoolsmodel.h"

using namespace mu::diagnostics;

CorruptScoreDevToolsModel::CorruptScoreDevToolsModel(QObject* parent)
: QObject(parent)
{
}

void CorruptScoreDevToolsModel::corruptOpenScore()
{
project::INotationProjectPtr project = globalContext()->currentProject();
if (!project) {
return;
}

LOGW() << "Score corruption on demand!";

mu::notation::INotationPtr notation = project->masterNotation()->notation();

notation->undoStack()->prepareChanges();

for (engraving::System* system : notation->elements()->msScore()->systems()) {
for (engraving::MeasureBase* measureBase : system->measures()) {
if (!measureBase->isMeasure()) {
continue;
}

mu::engraving::Measure* measure = mu::engraving::toMeasure(measureBase);
mu::engraving::Segment* firstSegment = measure->first(mu::engraving::SegmentType::ChordRest);

for (mu::engraving::Segment* s = firstSegment; s; s = s->next(mu::engraving::SegmentType::ChordRest)) {
mu::engraving::EngravingItem* element = s->element(0);
if (!element) {
continue;
}

mu::engraving::ChordRest* cr = toChordRest(element);
cr->undoChangeProperty(mu::engraving::Pid::DURATION, mu::engraving::Fraction::fromString(u"0/4"));
}
}
}

notation->undoStack()->commitChanges();
}
Loading