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
2 changes: 1 addition & 1 deletion muse
Submodule muse updated 52 files
+74 −0 docs/adr/00107-Commands-Availability.md
+25 −12 framework/diagnostics/internal/diagnosticscommandsregister.cpp
+4 −0 framework/extensions/iextensionsuiengine.h
+5 −0 framework/extensions/internal/extensionsprovider.cpp
+2 −0 framework/extensions/internal/extensionsprovider.h
+15 −0 framework/extensions/internal/extensionsuiengine.cpp
+3 −2 framework/extensions/internal/extensionsuiengine.h
+3 −1 framework/extensions/qml/Muse/Extensions/extensionslistmodel.cpp
+2 −0 framework/extensions/qml/Muse/Extensions/extensionslistmodel.h
+1 −0 framework/global/modularity/imodulesetup.h
+9 −0 framework/global/stringutils.cpp
+1 −0 framework/global/stringutils.h
+14 −0 framework/rcommand/commandtypes.h
+1 −1 framework/rcommand/internal/commanddispatcher.cpp
+58 −10 framework/shortcuts/internal/migration/migrationhelper.cpp
+1 −0 framework/shortcuts/internal/migration/migrationhelper.h
+6 −6 framework/shortcuts_v2/internal/commandshortcutsregister.cpp
+0 −4 framework/stubs/update/CMakeLists.txt
+0 −46 framework/stubs/update/appupdatescenariostub.cpp
+0 −14 framework/stubs/update/appupdatescenariostub.h
+2 −7 framework/stubs/update/appupdateservicestub.cpp
+2 −3 framework/stubs/update/appupdateservicestub.h
+0 −30 framework/stubs/update/qml/Muse/Update/CMakeLists.txt
+0 −29 framework/stubs/update/qml/Muse/Update/UpdateBanner.qml
+2 −2 framework/stubs/update/updateconfigurationstub.cpp
+2 −2 framework/stubs/update/updateconfigurationstub.h
+25 −1 framework/ui/internal/guiapplication.cpp
+1 −0 framework/ui/internal/guiapplication.h
+0 −20 framework/update/iappupdatescenario.h
+2 −3 framework/update/iappupdateservice.h
+112 −218 framework/update/internal/appupdatescenario.cpp
+13 −28 framework/update/internal/appupdatescenario.h
+136 −19 framework/update/internal/appupdateservice.cpp
+9 −3 framework/update/internal/appupdateservice.h
+6 −6 framework/update/internal/updateconfiguration.cpp
+2 −2 framework/update/internal/updateconfiguration.h
+2 −2 framework/update/iupdateconfiguration.h
+63 −60 framework/update/qml/Muse/Update/AppReleaseInfoDialog.qml
+1 −5 framework/update/qml/Muse/Update/CMakeLists.txt
+0 −96 framework/update/qml/Muse/Update/UpdateBanner.qml
+5 −1 framework/update/qml/Muse/Update/appupdatemodel.cpp
+8 −8 framework/update/qml/Muse/Update/internal/AppReleaseInfoBottomPanel.qml
+22 −35 framework/update/qml/Muse/Update/internal/AutoUpdateSetting.qml
+0 −105 framework/update/qml/Muse/Update/internal/UpdateReadyContent.qml
+0 −80 framework/update/qml/Muse/Update/updatebannermodel.cpp
+0 −67 framework/update/qml/Muse/Update/updatebannermodel.h
+661 −105 framework/update/tests/appupdatescenario_tests.cpp
+316 −25 framework/update/tests/appupdateservice_tests.cpp
+2 −3 framework/update/tests/mocks/appupdateservicemock.h
+2 −2 framework/update/tests/mocks/updateconfigurationmock.h
+5 −1 framework/update/updatemodule.cpp
+1 −0 framework/update/updatemodule.h
5 changes: 1 addition & 4 deletions src/appshell/internal/appshellcommandscontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,7 @@ void AppshellCommandsController::doQuit(bool isAllInstances, const muse::io::pat
//! in-place, falling back to handing the package to the user.
bool applied = false;
if (appUpdateService()->canAutoInstall()) {
const muse::RetVal<muse::io::path_t> prepared = appUpdateService()->prepareUpdate(installerPath);
if (prepared.ret) {
applied = bool(appUpdateService()->finalizeUpdate(prepared.val));
}
applied = bool(appUpdateService()->installUpdate());
}

if (!applied) {
Expand Down
1 change: 0 additions & 1 deletion src/appshell/qml/MuseScore/AppShell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ qt_add_qml_module(appshell_qml
TARGET muse_ui_qml
TARGET muse_uicomponents_qml
TARGET muse_cloud_qml
TARGET muse_update_qml
TARGET muse_dockwindow_qml
TARGET muse_diagnostics_qml
TARGET muse_extensions_qml
Expand Down
8 changes: 0 additions & 8 deletions src/appshell/qml/MuseScore/AppShell/HomePage/HomeMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import QtQuick.Layouts
import Muse.Ui
import Muse.UiComponents
import Muse.Cloud
import Muse.Update

Item {
id: root
Expand Down Expand Up @@ -130,12 +129,5 @@ Item {
}
}
}

UpdateBanner {
Layout.fillWidth: true
Layout.margins: 8

visible: (hasReadyUpdate || hasCompletedUpdate) && !root.iconsOnly
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ PreferencesPage {
AutomaticUpdateSection {
isAppUpdatable: preferencesModel.isAppUpdatable()
needCheckForNewAppVersion: preferencesModel.needCheckForNewAppVersion
autoDownloadNewAppVersion: preferencesModel.autoDownloadNewAppVersion
autoUpdateNewAppVersion: preferencesModel.autoUpdateNewAppVersion
museScorePrivacyPolicyUrl: preferencesModel.museScorePrivacyPolicyUrl()

navigation.section: root.navigationSection
Expand All @@ -135,8 +135,8 @@ PreferencesPage {
preferencesModel.needCheckForNewAppVersion = check
}

onAutoDownloadNewAppVersionChangeRequested: function(download) {
preferencesModel.autoDownloadNewAppVersion = download
onAutoUpdateNewAppVersionChangeRequested: function(enabled) {
preferencesModel.autoUpdateNewAppVersion = enabled
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,25 @@ void GeneralPreferencesModel::setNeedCheckForNewAppVersion(bool value)

updateConfiguration()->setNeedCheckForUpdate(value);
emit needCheckForNewAppVersionChanged(value);

//! NOTE: Updates can not be downloaded without checking for them; once checking
//! is turned on again, downloading is turned on with it, whatever it was before
setAutoUpdateNewAppVersion(value);
}

bool GeneralPreferencesModel::autoDownloadNewAppVersion() const
bool GeneralPreferencesModel::autoUpdateNewAppVersion() const
{
return updateConfiguration()->autoDownloadEnabled();
return updateConfiguration()->autoUpdateEnabled();
}

void GeneralPreferencesModel::setAutoDownloadNewAppVersion(bool value)
void GeneralPreferencesModel::setAutoUpdateNewAppVersion(bool value)
{
if (value == autoDownloadNewAppVersion()) {
if (value == autoUpdateNewAppVersion()) {
return;
}

updateConfiguration()->setAutoDownloadEnabled(value);
emit autoDownloadNewAppVersionChanged(value);
updateConfiguration()->setAutoUpdateEnabled(value);
emit autoUpdateNewAppVersionChanged(value);
}

QString GeneralPreferencesModel::museScorePrivacyPolicyUrl() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class GeneralPreferencesModel : public QObject, public muse::Contextable, public
Q_PROPERTY(
bool needCheckForNewAppVersion READ needCheckForNewAppVersion WRITE setNeedCheckForNewAppVersion NOTIFY needCheckForNewAppVersionChanged)
Q_PROPERTY(
bool autoDownloadNewAppVersion READ autoDownloadNewAppVersion WRITE setAutoDownloadNewAppVersion NOTIFY autoDownloadNewAppVersionChanged)
bool autoUpdateNewAppVersion READ autoUpdateNewAppVersion WRITE setAutoUpdateNewAppVersion NOTIFY autoUpdateNewAppVersionChanged)

muse::GlobalInject<appshell::IAppShellConfiguration> configuration;
muse::GlobalInject<muse::languages::ILanguagesConfiguration> languagesConfiguration;
Expand Down Expand Up @@ -98,7 +98,7 @@ class GeneralPreferencesModel : public QObject, public muse::Contextable, public
void setShowWelcomeDialog(bool show);

bool needCheckForNewAppVersion() const;
bool autoDownloadNewAppVersion() const;
bool autoUpdateNewAppVersion() const;
Q_INVOKABLE bool isAppUpdatable() const;
Q_INVOKABLE QString museScorePrivacyPolicyUrl() const;

Expand All @@ -111,7 +111,7 @@ public slots:
void setCurrentStartupMode(int mode);
void setStartupScorePath(const QString& scorePath);
void setNeedCheckForNewAppVersion(bool value);
void setAutoDownloadNewAppVersion(bool value);
void setAutoUpdateNewAppVersion(bool value);

signals:
void languagesChanged(QVariantList languages);
Expand All @@ -129,7 +129,7 @@ public slots:
void showWelcomeDialogChanged();

void needCheckForNewAppVersionChanged(bool value);
void autoDownloadNewAppVersionChanged(bool value);
void autoUpdateNewAppVersionChanged(bool value);

private:
muse::Progress m_languageUpdateProgress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ BaseSection {

property bool isAppUpdatable: true
property alias needCheckForNewAppVersion: needCheckEnable.checked
property alias autoDownloadNewAppVersion: autoDownloadCheckBox.checked
property alias autoUpdateNewAppVersion: autoUpdateToggle.checked
property string museScorePrivacyPolicyUrl

signal needCheckForNewAppVersionChangeRequested(bool check)
signal autoDownloadNewAppVersionChangeRequested(bool download)
signal autoUpdateNewAppVersionChangeRequested(bool enabled)

ToggleButton {
id: needCheckEnable
width: parent.width

text: qsTrc("preferences", "Check automatically for updates to MuseScore Studio is available")
text: qsTrc("preferences", "Check automatically for updates to MuseScore Studio")

visible: root.isAppUpdatable

Expand All @@ -54,30 +54,29 @@ BaseSection {
}
}

CheckBox {
id: autoDownloadCheckBox
ToggleButton {
id: autoUpdateToggle
width: parent.width

text: qsTrc("preferences", "Download updates in the background")
text: qsTrc("preferences", "Download and install updates automatically")

visible: root.isAppUpdatable
//! NOTE: Turned off together with "Check automatically..." and turned on with it again in model
enabled: needCheckEnable.checked

navigation.name: "AutoDownloadCheckBox"
navigation.name: "AutoUpdateToggle"
navigation.panel: root.navigation
navigation.row: 1

onClicked: {
root.autoDownloadNewAppVersionChangeRequested(!checked)
onToggled: {
root.autoUpdateNewAppVersionChangeRequested(!checked)
}
}

StyledTextLabel {
width: parent.width

text: qsTrc("preferences", "Checking for updates requires network access. In order to protect your privacy, MuseScore Studio does not store any personal information. See our <a href=\"%1\">privacy policy</a> for more info.")
.arg(root.museScorePrivacyPolicyUrl)
.replace("\n", "<br>")
text: qsTrc("preferences", "Checking for updates requires network access. In order to protect your privacy, MuseScore Studio does not store any personal information. See our <a href=\"%1\">privacy policy</a> for more info.").arg(root.museScorePrivacyPolicyUrl).replace("\n", "<br>")

horizontalAlignment: Qt.AlignLeft
wrapMode: Text.WordWrap
Expand Down
Loading