Commit c3bd8419 authored by Nate Graham's avatar Nate Graham

Merge branch 'release/19.12'

parents 81afd9b4 01fd8821
......@@ -143,6 +143,7 @@
<project_group>KDE</project_group>
<content_rating type="oars-1.0"/>
<releases>
<release version="19.11.80" date="2019-11-14"/>
<release version="0.4.2" date="2019-06-30"/>
<release version="0.4.1" date="2019-06-20"/>
<release version="0.4.0" date="2019-05-20"/>
......
......@@ -88,10 +88,6 @@ int main(int argc, char *argv[])
qInfo() << "Application starting...";
#endif
#if defined KF5Declarative_FOUND && KF5Declarative_FOUND
KQuickAddons::QtQuickSettings::init();
#endif
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
......@@ -99,6 +95,10 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
#if defined KF5Declarative_FOUND && KF5Declarative_FOUND
KQuickAddons::QtQuickSettings::init();
#endif
KLocalizedString::setApplicationDomain("elisa");
#if defined Qt5AndroidExtras_FOUND && Qt5AndroidExtras_FOUND
......
......@@ -142,20 +142,15 @@ QVariant ManageHeaderBar::albumArtist() const
return mCurrentTrack.data(mAlbumArtistRole);
}
QString ManageHeaderBar::fileName() const
QUrl ManageHeaderBar::fileUrl() const
{
QString result;
QUrl result;
if (!mCurrentTrack.isValid()) {
return result;
}
auto fileNameUrl = mCurrentTrack.data(mFileNameRole).toUrl();
if (fileNameUrl.isLocalFile()) {
result = fileNameUrl.toLocalFile();
} else {
result = fileNameUrl.toString();
}
result = mCurrentTrack.data(mFileNameRole).toUrl();
return result;
}
......@@ -277,7 +272,7 @@ void ManageHeaderBar::notifyFileNameProperty()
{
auto newFileNameValue = mCurrentTrack.data(mFileNameRole);
if (mOldFileName != newFileNameValue) {
Q_EMIT fileNameChanged();
Q_EMIT fileUrlChanged();
mOldFileName = newFileNameValue;
}
......
......@@ -104,9 +104,9 @@ class ELISALIB_EXPORT ManageHeaderBar : public QObject
READ albumArtist
NOTIFY albumArtistChanged)
Q_PROPERTY(QString fileName
READ fileName
NOTIFY fileNameChanged)
Q_PROPERTY(QUrl fileUrl
READ fileUrl
NOTIFY fileUrlChanged)
Q_PROPERTY(QUrl image
READ image
......@@ -162,7 +162,7 @@ public:
QVariant albumArtist() const;
QString fileName() const;
QUrl fileUrl() const;
QUrl image() const;
......@@ -206,7 +206,7 @@ Q_SIGNALS:
void albumArtistChanged();
void fileNameChanged();
void fileUrlChanged();
void imageChanged();
......
......@@ -344,7 +344,7 @@ RowLayout {
artistName: elisa.manageHeaderBar.artist
albumName: elisa.manageHeaderBar.album
albumArtUrl: elisa.manageHeaderBar.image
fileUrl: elisa.manageHeaderBar.fileName
fileUrl: elisa.manageHeaderBar.fileUrl
}
}
}
......@@ -34,7 +34,7 @@ FocusScope {
property string albumName: ''
property string artistName: ''
property url albumArtUrl: ''
property string fileUrl: ''
property url fileUrl: ''
TrackContextMetaDataModel {
id: metaDataModel
......@@ -251,7 +251,7 @@ FocusScope {
Layout.fillWidth: true
text: fileUrl
text: metaDataModel.fileUrl
elide: Text.ElideLeft
}
]
......@@ -259,20 +259,20 @@ FocusScope {
}
onDatabaseIdChanged: {
metaDataModel.initializeById(trackType, databaseId)
metaDataModel.initializeByIdAndUrl(trackType, databaseId, fileUrl)
}
Connections {
target: elisa
onMusicManagerChanged: {
metaDataModel.initializeById(trackType, databaseId)
metaDataModel.initializeByIdAndUrl(trackType, databaseId, fileUrl)
}
}
Component.onCompleted: {
if (elisa.musicManager) {
metaDataModel.initializeById(trackType, databaseId)
metaDataModel.initializeByIdAndUrl(trackType, databaseId, fileUrl)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment