Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b6fea1ef authored by Matthieu Gallien's avatar Matthieu Gallien

remove global variable elisa by using a qml singleton type

parent 526efc1b
......@@ -357,6 +357,8 @@ add_dependencies(elisaqmlplugin copy copy2)
if (Qt5Quick_FOUND AND Qt5Widgets_FOUND)
set(elisa_SOURCES
main.cpp
elisaarguments.cpp
elisaarguments.h
windows/WindowsTheme.qml
windows/PlatformIntegration.qml
......
......@@ -97,6 +97,8 @@ LocalBalooFileListing::LocalBalooFileListing(QObject *parent)
LocalBalooFileListing::~LocalBalooFileListing()
{
d->mDbusAdaptor->setParent(nullptr);
d->mDbusAdaptor->deleteLater();
}
void LocalBalooFileListing::applicationAboutToQuit()
......
......@@ -34,7 +34,8 @@
#include <KCoreAddons/KAboutData>
#include <QQmlApplicationEngine>
#include <QQmlEngine>
#include <QQmlComponent>
#include <QGuiApplication>
#include <QDesktopServices>
#include <QDialog>
......@@ -90,7 +91,7 @@ public:
std::unique_ptr<ManageHeaderBar> mManageHeaderBar;
QQmlApplicationEngine *mEngine = nullptr;
QQmlEngine *mEngine = nullptr;
QFileSystemWatcher mConfigFileWatcher;
......@@ -273,7 +274,10 @@ void ElisaApplication::configureElisa()
return;
}
d->mEngine->load(QUrl(QStringLiteral("qrc:/qml/ElisaConfigurationDialog.qml")));
QQmlComponent configurationDialogComponent(d->mEngine,
QUrl(QStringLiteral("qrc:/qml/ElisaConfigurationDialog.qml")));
configurationDialogComponent.create();
}
void ElisaApplication::goBack() {}
......@@ -340,7 +344,7 @@ void ElisaApplication::initialize()
Q_EMIT initializationDone();
}
void ElisaApplication::setQmlEngine(QQmlApplicationEngine *engine)
void ElisaApplication::setQmlEngine(QQmlEngine *engine)
{
d->mEngine = engine;
}
......
......@@ -28,7 +28,7 @@ class AudioWrapper;
class ManageAudioPlayer;
class ManageMediaPlayerControl;
class ManageHeaderBar;
class QQmlApplicationEngine;
class QQmlEngine;
class ElisaApplicationPrivate;
class QSessionManager;
......@@ -167,7 +167,7 @@ public Q_SLOTS:
public:
void setQmlEngine(QQmlApplicationEngine *engine);
void setQmlEngine(QQmlEngine *engine);
private Q_SLOTS:
......
/*
SPDX-FileCopyrightText: 2020 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr>
SPDX-License-Identifier: LGPL-3.0-or-later
*/
#include "elisaarguments.h"
ElisaArguments::ElisaArguments(QObject *parent)
: QObject(parent)
{
}
#include "moc_elisaarguments.cpp"
/*
SPDX-FileCopyrightText: 2020 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr>
SPDX-License-Identifier: LGPL-3.0-or-later
*/
#ifndef ELISAARGUMENTS_H
#define ELISAARGUMENTS_H
#include "datatypes.h"
#include <QObject>
class ElisaArguments : public QObject
{
Q_OBJECT
Q_PROPERTY(DataTypes::EntryDataList arguments READ arguments NOTIFY argumentsChanged)
public:
ElisaArguments(QObject *parent = nullptr);
DataTypes::EntryDataList arguments() const
{
return mArguments;
}
Q_SIGNALS:
void argumentsChanged();
public Q_SLOTS:
void setArguments(DataTypes::EntryDataList arguments)
{
if (mArguments == arguments) {
return;
}
mArguments = arguments;
Q_EMIT argumentsChanged();
}
private:
DataTypes::EntryDataList mArguments;
};
#endif // ELISAARGUMENTS_H
......@@ -6,6 +6,8 @@
#include "elisaqmlplugin.h"
#include "config-upnp-qt.h"
#if defined UPNPQT_FOUND && UPNPQT_FOUND
#include "upnp/upnpcontrolconnectionmanager.h"
#include "upnp/upnpcontrolmediaserver.h"
......@@ -22,6 +24,10 @@
#include "upnpbasictypes.h"
#endif
#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND
#include <KDBusService>
#endif
#include "elisautils.h"
#include "elisaapplication.h"
#include "progressindicator.h"
......@@ -183,6 +189,26 @@ void ElisaQmlTestPlugin::registerTypes(const char *uri)
return new ElisaConfigurationDialog;
});
qmlRegisterUncreatableType<ElisaApplication>(uri, 1, 0, "ElisaApplication", QStringLiteral("only one and done in c++"));
qmlRegisterSingletonType<ElisaApplication>(uri, 1, 0, "ElisaApplication",
[](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject* {
Q_UNUSED(scriptEngine)
auto newApplication = std::make_unique<ElisaApplication>();
#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND
auto *elisaService = new KDBusService(KDBusService::Unique, newApplication.get());
#endif
#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND
QObject::connect(elisaService, &KDBusService::activateActionRequested, newApplication.get(), &ElisaApplication::activateActionRequested);
QObject::connect(elisaService, &KDBusService::activateRequested, newApplication.get(), &ElisaApplication::activateRequested);
QObject::connect(elisaService, &KDBusService::openRequested, newApplication.get(), &ElisaApplication::openRequested);
#endif
newApplication->setQmlEngine(engine);
return newApplication.release();
});
qmlRegisterUncreatableMetaObject(ElisaUtils::staticMetaObject, uri, 1, 0, "ElisaUtils", QStringLiteral("Namespace ElisaUtils"));
}
......@@ -7,6 +7,7 @@
#include "config-upnp-qt.h"
#include "elisa-version.h"
#include "elisaarguments.h"
#include "elisaapplication.h"
#include "elisa_settings.h"
......@@ -28,10 +29,6 @@
#include <KCrash>
#endif
#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND
#include <KDBusService>
#endif
#include <QIcon>
......@@ -40,6 +37,7 @@
#include <QStandardPaths>
#include <QQmlApplicationEngine>
#include <QJSEngine>
#include <QQmlFileSelector>
#include <QQuickStyle>
#include <QQmlContext>
......@@ -142,20 +140,6 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND
KDBusService elisaService(KDBusService::Unique);
#endif
std::unique_ptr<ElisaApplication> myApp = std::make_unique<ElisaApplication>();
myApp->setQmlEngine(&engine);
#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND
QObject::connect(&elisaService, &KDBusService::activateActionRequested, myApp.get(), &ElisaApplication::activateActionRequested);
QObject::connect(&elisaService, &KDBusService::activateRequested, myApp.get(), &ElisaApplication::activateRequested);
QObject::connect(&elisaService, &KDBusService::openRequested, myApp.get(), &ElisaApplication::openRequested);
#endif
auto arguments = DataTypes::EntryDataList{};
auto realArgumentsList = parser.positionalArguments();
......@@ -163,9 +147,18 @@ int main(int argc, char *argv[])
arguments.push_back(DataTypes::EntryData{{}, {}, QUrl(oneArgument)});
}
myApp->setArguments(arguments);
int typeId = qmlRegisterSingletonType<ElisaArguments>("org.kde.elisa.host", 1, 0, "ElisaArguments", [](QQmlEngine *qmlEngine, QJSEngine *scriptEngine) -> QObject* {
Q_UNUSED(qmlEngine)
Q_UNUSED(scriptEngine)
auto *result = new ElisaArguments;
return result;
});
auto *argumentsSingleton = engine.singletonInstance<ElisaArguments*>(typeId);
engine.rootContext()->setContextProperty(QStringLiteral("elisa"), myApp.release());
argumentsSingleton->setArguments(arguments);
engine.load(QUrl(QStringLiteral("qrc:/qml/ElisaMainWindow.qml")));
......
......@@ -13,19 +13,19 @@ Menu {
id: applicationMenu
title: i18nc("open application menu", "Application Menu")
property var helpAction: elisa.action("help_contents")
property var quitApplication: elisa.action("file_quit")
property var reportBugAction: elisa.action("help_report_bug")
property var aboutAppAction: elisa.action("help_about_app")
property var configureShortcutsAction: elisa.action("options_configure_keybinding")
property var configureAction: elisa.action("options_configure")
property var helpAction: ElisaApplication.action("help_contents")
property var quitApplication: ElisaApplication.action("file_quit")
property var reportBugAction: ElisaApplication.action("help_report_bug")
property var aboutAppAction: ElisaApplication.action("help_about_app")
property var configureShortcutsAction: ElisaApplication.action("options_configure_keybinding")
property var configureAction: ElisaApplication.action("options_configure")
Action {
text: i18nc("Refresh Music Collection application menu entry", "Refresh Music Collection")
icon.name: "view-refresh"
onTriggered: {
applicationMenu.close()
elisa.musicManager.resetMusicData()
ElisaApplication.musicManager.resetMusicData()
}
}
......@@ -35,7 +35,7 @@ Menu {
Action {
text: configureAction.text
shortcut: configureAction.shortcut
icon.name: elisa.iconName(configureAction.icon)
icon.name: ElisaApplication.iconName(configureAction.icon)
onTriggered: {
applicationMenu.close()
configureAction.trigger()
......@@ -45,7 +45,7 @@ Menu {
Action {
text: configureShortcutsAction.text
shortcut: configureShortcutsAction.shortcut
icon.name: elisa.iconName(configureShortcutsAction.icon)
icon.name: ElisaApplication.iconName(configureShortcutsAction.icon)
onTriggered: {
applicationMenu.close()
configureShortcutsAction.trigger()
......@@ -59,7 +59,7 @@ Menu {
Action {
text: reportBugAction.text
shortcut: reportBugAction.shortcut
icon.name: elisa.iconName(reportBugAction.icon)
icon.name: ElisaApplication.iconName(reportBugAction.icon)
onTriggered: {
applicationMenu.close()
reportBugAction.trigger()
......@@ -73,7 +73,7 @@ Menu {
Action {
text: helpAction.text
shortcut: helpAction.shortcut
icon.name: elisa.iconName(helpAction.icon)
icon.name: ElisaApplication.iconName(helpAction.icon)
onTriggered: {
applicationMenu.close()
helpAction.trigger()
......@@ -83,7 +83,7 @@ Menu {
Action {
text: aboutAppAction.text
shortcut: aboutAppAction.shortcut
icon.name: elisa.iconName(aboutAppAction.icon)
icon.name: ElisaApplication.iconName(aboutAppAction.icon)
onTriggered: {
applicationMenu.close()
aboutAppAction.trigger()
......@@ -97,7 +97,7 @@ Menu {
Action {
text: quitApplication.text
shortcut: quitApplication.shortcut
icon.name: elisa.iconName(quitApplication.icon)
icon.name: ElisaApplication.iconName(quitApplication.icon)
onTriggered: quitApplication.trigger()
}
}
......@@ -254,8 +254,8 @@ RowLayout {
Layout.fillHeight: true
onStartPlayback: elisa.audioControl.ensurePlay()
onPausePlayback: elisa.audioControl.playPause()
onStartPlayback: ElisaApplication.audioControl.ensurePlay()
onPausePlayback: ElisaApplication.audioControl.playPause()
}
states: [
......@@ -320,13 +320,13 @@ RowLayout {
ContextView {
StackView.onActivated: viewManager.viewIsLoaded()
databaseId: elisa.manageHeaderBar.databaseId
trackType: elisa.manageHeaderBar.trackType
title: elisa.manageHeaderBar.title
artistName: elisa.manageHeaderBar.artist
albumName: elisa.manageHeaderBar.album
albumArtUrl: elisa.manageHeaderBar.image
fileUrl: elisa.manageHeaderBar.fileUrl
databaseId: ElisaApplication.manageHeaderBar.databaseId
trackType: ElisaApplication.manageHeaderBar.trackType
title: ElisaApplication.manageHeaderBar.title
artistName: ElisaApplication.manageHeaderBar.artist
albumName: ElisaApplication.manageHeaderBar.album
albumArtUrl: ElisaApplication.manageHeaderBar.image
fileUrl: ElisaApplication.manageHeaderBar.fileUrl
}
}
}
......@@ -28,7 +28,7 @@ FocusScope {
TrackContextMetaDataModel {
id: metaDataModel
manager: elisa.musicManager
manager: ElisaApplication.musicManager
}
ColumnLayout {
......@@ -244,7 +244,7 @@ FocusScope {
}
Connections {
target: elisa
target: ElisaApplication
onMusicManagerChanged: {
metaDataModel.initializeByIdAndUrl(trackType, databaseId, fileUrl)
......@@ -252,7 +252,7 @@ FocusScope {
}
Component.onCompleted: {
if (elisa.musicManager) {
if (ElisaApplication.musicManager) {
metaDataModel.initializeByIdAndUrl(trackType, databaseId, fileUrl)
}
}
......
......@@ -43,7 +43,7 @@ FocusScope {
return
}
if (!elisa.musicManager) {
if (!ElisaApplication.musicManager) {
return
}
......@@ -53,10 +53,10 @@ FocusScope {
proxyModel.sourceModel = realModel
proxyModel.dataType = modelType
proxyModel.playList = elisa.mediaPlayListProxyModel
proxyModel.playList = ElisaApplication.mediaPlayListProxyModel
gridView.contentModel = proxyModel
realModel.initializeByData(elisa.musicManager, elisa.musicManager.viewDatabase,
realModel.initializeByData(ElisaApplication.musicManager, ElisaApplication.musicManager.viewDatabase,
modelType, filterType, filter)
modelIsInitialized = true
......@@ -103,7 +103,7 @@ FocusScope {
}
Connections {
target: elisa
target: ElisaApplication
onMusicManagerChanged: initializeModel()
}
......
......@@ -70,7 +70,7 @@ FocusScope {
return
}
if (!elisa.musicManager) {
if (!ElisaApplication.musicManager) {
return
}
......@@ -80,14 +80,14 @@ FocusScope {
proxyModel.sourceModel = realModel
proxyModel.dataType = modelType
proxyModel.playList = elisa.mediaPlayListProxyModel
proxyModel.playList = ElisaApplication.mediaPlayListProxyModel
listView.contentModel = proxyModel
if (!displaySingleAlbum) {
proxyModel.sortModel(sortAscending)
}
realModel.initializeByData(elisa.musicManager, elisa.musicManager.viewDatabase,
realModel.initializeByData(ElisaApplication.musicManager, ElisaApplication.musicManager.viewDatabase,
modelType, filterType, filter)
}
......@@ -126,11 +126,11 @@ FocusScope {
isAlternateColor: (index % 2) === 1
detailedView: false
onEnqueue: elisa.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
onEnqueue: ElisaApplication.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
ElisaUtils.AppendPlayList,
ElisaUtils.DoNotTriggerPlay)
onReplaceAndPlay: elisa.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
onReplaceAndPlay: ElisaApplication.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
ElisaUtils.ReplacePlayList,
ElisaUtils.TriggerPlay)
......@@ -174,11 +174,11 @@ FocusScope {
isSelected: listView.currentIndex === index
isAlternateColor: (index % 2) === 1
onEnqueue: elisa.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
onEnqueue: ElisaApplication.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
ElisaUtils.AppendPlayList,
ElisaUtils.DoNotTriggerPlay)
onReplaceAndPlay: elisa.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
onReplaceAndPlay: ElisaApplication.mediaPlayListProxyModel.enqueue(model.fullData, model.display,
ElisaUtils.ReplacePlayList,
ElisaUtils.TriggerPlay)
......@@ -232,7 +232,7 @@ FocusScope {
}
Connections {
target: elisa
target: ElisaApplication
onMusicManagerChanged: initializeModel()
}
......
This diff is collapsed.
......@@ -333,7 +333,7 @@ FocusScope {
sourceComponent: SimplePlayListView {
anchors.fill: parent
playListModel: elisa.mediaPlayListProxyModel
playListModel: ElisaApplication.mediaPlayListProxyModel
}
}
......
......@@ -50,7 +50,7 @@ FocusScope {
id: undoAction
text: i18nc("Undo", "Undo")
icon.name: "dialog-cancel"
onTriggered: elisa.mediaPlayListProxyModel.undoClearPlayList()
onTriggered: ElisaApplication.mediaPlayListProxyModel.undoClearPlayList()
}
Kirigami.Action {
......@@ -68,21 +68,21 @@ FocusScope {
}
Connections {
target: elisa.mediaPlayListProxyModel
target: ElisaApplication.mediaPlayListProxyModel
onPlayListLoadFailed: {
showPlayListNotification(i18nc("Message when playlist load failed", "Loading failed"), Kirigami.MessageType.Error, retryLoadAction)
}
}
Connections {
target: elisa.mediaPlayListProxyModel
target: ElisaApplication.mediaPlayListProxyModel
onDisplayUndoNotification: {
showPlayListNotification(i18nc("Playlist cleared", "Playlist cleared"), Kirigami.MessageType.Information, undoAction)
}
}
Connections {
target: elisa.mediaPlayListProxyModel
target: ElisaApplication.mediaPlayListProxyModel
onHideUndoNotification: hideNotification()
}
......@@ -101,11 +101,11 @@ FocusScope {
onAccepted:
{
if (fileMode === PlatformDialog.FileDialog.SaveFile) {
if (!elisa.mediaPlayListProxyModel.savePlayList(fileDialog.file)) {
if (!ElisaApplication.mediaPlayListProxyModel.savePlayList(fileDialog.file)) {
showPlayListNotification(i18nc("Message when saving a playlist failed", "Saving failed"), Kirigami.MessageType.Error, retrySaveAction)
}
} else {
elisa.mediaPlayListProxyModel.loadPlayList(fileDialog.file)
ElisaApplication.mediaPlayListProxyModel.loadPlayList(fileDialog.file)
}
}
}
......@@ -135,10 +135,10 @@ FocusScope {
FlatButtonWithToolTip {
text: i18nc("Show currently played track inside playlist", "Show Current Track")
icon.name: 'media-track-show-active'
enabled: elisa.mediaPlayListProxyModel ? elisa.mediaPlayListProxyModel.tracksCount > 0 : false
enabled: ElisaApplication.mediaPlayListProxyModel ? ElisaApplication.mediaPlayListProxyModel.tracksCount > 0 : false
onClicked: {
playListView.positionViewAtIndex(elisa.mediaPlayListProxyModel.currentTrackRow, ListView.Contain)
playListView.currentIndex = elisa.mediaPlayListProxyModel.currentTrackRow
playListView.positionViewAtIndex(ElisaApplication.mediaPlayListProxyModel.currentTrackRow, ListView.Contain)
playListView.currentIndex = ElisaApplication.mediaPlayListProxyModel.currentTrackRow
playListView.currentItem.forceActiveFocus()
}
},
......@@ -146,7 +146,7 @@ FocusScope {
id: savePlaylistButton
text: i18nc("Save a playlist file", "Save Playlist...")
icon.name: 'document-save'
enabled: elisa.mediaPlayListProxyModel ? elisa.mediaPlayListProxyModel.tracksCount > 0 : false
enabled: ElisaApplication.mediaPlayListProxyModel ? ElisaApplication.mediaPlayListProxyModel.tracksCount > 0 : false
onClicked: {
fileDialog.fileMode = PlatformDialog.FileDialog.SaveFile
fileDialog.file = ''
......@@ -166,8 +166,8 @@ FocusScope {
FlatButtonWithToolTip {
text: i18nc("Remove all tracks from play list", "Clear Playlist")
icon.name: 'edit-clear-all'
enabled: elisa.mediaPlayListProxyModel ? elisa.mediaPlayListProxyModel.tracksCount > 0 : false
onClicked: elisa.mediaPlayListProxyModel.clearPlayList()
enabled: ElisaApplication.mediaPlayListProxyModel ? ElisaApplication.mediaPlayListProxyModel.tracksCount > 0 : false
onClicked: ElisaApplication.mediaPlayListProxyModel.clearPlayList()
}
]
}
......@@ -175,7 +175,7 @@ FocusScope {
Item {
id: emptyPlaylistMessage
visible: elisa.mediaPlayListProxyModel ? elisa.mediaPlayListProxyModel.tracksCount === 0 : true
visible: ElisaApplication.mediaPlayListProxyModel ? ElisaApplication.mediaPlayListProxyModel.tracksCount === 0 : true
Layout.fillHeight: true
Layout.fillWidth: true
......@@ -197,7 +197,7 @@ FocusScope {
Layout.fillHeight: true
title: viewTitle.text
playListModel: elisa.mediaPlayListProxyModel
playListModel: ElisaApplication.mediaPlayListProxyModel
focus: true
......@@ -244,7 +244,7 @@ FocusScope {
Layout.fillWidth: true
text: i18np("1 track", "%1 tracks", (elisa.mediaPlayListProxyModel ? elisa.mediaPlayListProxyModel.tracksCount : 0))
text: i18np("1 track", "%1 tracks", (ElisaApplication.mediaPlayListProxyModel ? ElisaApplication.mediaPlayListProxyModel.tracksCount : 0))
elide: Text.ElideLeft
}
]
......
......@@ -335,7 +335,7 @@ FocusScope {
Button {
id: showHidePlaylistAction
action: Action {
shortcut: elisa.action("toggle_playlist").shortcut
shortcut: ElisaApplication.action("toggle_playlist").shortcut
onTriggered: contentView.showPlaylist = !contentView.showPlaylist
}
......@@ -386,7 +386,7 @@ FocusScope {
installFilter(elementList[i])
function installFilter(element) {
elisa.installKeyEventFilter(element)
ElisaApplication.installKeyEventFilter(element)
}
}
}
......
......@@ -38,7 +38,7 @@ Window {
EditableTrackMetadataModel {
id: realModel
manager: elisa.musicManager
manager: ElisaApplication.musicManager
}
modality: Qt.NonModal
......@@ -190,7 +190,7 @@ Window {
DialogButtonBox.buttonRole: DialogButtonBox.DestructiveRole
onClicked:
{
elisa.musicManager.deleteElementById(modelType, realModel.databaseId)
ElisaApplication.musicManager.deleteElementById(modelType, realModel.databaseId)
trackMetadata.close()
}
}
......@@ -230,7 +230,7 @@ Window {
}
Connections {
target: elisa
target: ElisaApplication
onMusicManagerChanged: {
if (isCreation) {
......@@ -242,7 +242,7 @@ Window {
}
Component.onCompleted: {
if (elisa.musicManager) {
if (ElisaApplication.musicManager) {
if (isCreation) {
realModel.initializeForNewRadio()
} else {
......
......@@ -14,18 +14,18 @@ Menu {
id: applicationMenu
title: i18nc("open application menu", "Application Menu")
property var helpAction: elisa.action("help_contents")
property var quitApplication: elisa.action("file_quit")
property var reportBugAction: elisa.action("help_report_bug")
property var aboutAppAction: elisa.action("help_about_app")
property var configureShortcutsAction: elisa.action("options_configure_keybinding")
property var configureAction: elisa.action("options_configure")
property var togglePlaylistAction: elisa.action("toggle_playlist")
property var helpAction: ElisaApplication.action("help_contents")
property var quitApplication: ElisaApplication.action("file_quit")
property var reportBugAction: ElisaApplication.action("help_report_bug")
property var aboutAppAction: ElisaApplication.action("help_about_app")
property var configureShortcutsAction: ElisaApplication.action("options_configure_keybinding")
property var configureAction: ElisaApplication.action("options_configure")
property var togglePlaylistAction: ElisaApplication.action("toggle_playlist")
MenuItem {
text: i18nc("Refresh Music Collection application menu entry", "Refresh Music Collection")
iconName: "view-refresh"
onTriggered: elisa.musicManager.resetMusicData()
onTriggered: ElisaApplication.musicManager.resetMusicData()
}
MenuSeparator {
......@@ -34,7 +34,7 @@ Menu {
MenuItem {