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

[MU4 Issue][Plugins] A "Qt.quit()" instruction in a plugin closes the entire MS4 #13222

Open
lgvr123 opened this issue Sep 7, 2022 · 4 comments
Labels
P2 Priority: Medium plugins Related to MuseScore's QML plugin framework (NOT VST/audio plugins)

Comments

@lgvr123
Copy link

lgvr123 commented Sep 7, 2022

Calling Qt.quit()in a plugin closes the entire MS4.

Although it is not longer recommended for plugin developers to use Qt.quit() to close their plugins, it can still be found in many plugins.

To be reproduced with this basic plugin:

import QtQuick 2.2
import MuseScore 3.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1 // was 1.3 in MS3, but 1.1 in Temperaments
import QtQuick.Window 2.3

MuseScore {
    menuPath: "Plugins.testBasicGUI"
    description: "This plugins shows a BasicGUI "
    version: "1.0"
    requiresScore: false
    pluginType: "dialog"
    id: mainWindow
    width : 300
    height : 300
    
    ColumnLayout {
        id: container
        anchors.margins: 5
        anchors.fill: parent
        spacing: 5
        CheckBox {
            text: "I'm the default component"
            checked: true
        }

        Button {
            text: qsTranslate("QPlatformTheme", "Close")
            Layout.alignment: Qt.AlignLeft
            onClicked: {
                //mainWindow.parent.Window.window.close();
                Qt.quit(); // as found in many-many plugins --> closes MS4
            }
        }
    }
}
@Jojo-Schmitz
Copy link
Contributor

Related to #8859, which has been moved to 4.x

@Eism
Copy link
Contributor

Eism commented Sep 7, 2022

Should be quit() instead of Qt.quit()

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Sep 7, 2022

Well, it is Qt.quit() in many existing plugins, that's the (compatibility) problem here

@JeffRocchio
Copy link

fwiw, Qt.quit() explains my issue #13089. I just modified my 3.6 plugins to change Qt.quit() to quit() and now they all work fine.

To Jojo's point - if not addressed, then upon release of MS4 I have to believe there will be a lot of noise concerning this incompatability.

@cbjeukendrup cbjeukendrup added the P2 Priority: Medium label Feb 18, 2023
@cbjeukendrup cbjeukendrup added this to To do in 4.x SHORTLIST via automation Feb 18, 2023
@cbjeukendrup cbjeukendrup added this to To do in Plugins Feb 19, 2023
@cbjeukendrup cbjeukendrup added the plugins Related to MuseScore's QML plugin framework (NOT VST/audio plugins) label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority: Medium plugins Related to MuseScore's QML plugin framework (NOT VST/audio plugins)
Projects
Status: One of the next releases
Plugins
To do
4.x SHORTLIST
  
To do
Development

No branches or pull requests

5 participants