Fix saving playlist column alignment

This commit is contained in:
Jonas Kvinge 2020-07-18 18:18:34 +02:00
parent 638998a861
commit a3a1c6f4c8
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ void RegisterMetaTypes() {
qRegisterMetaType<QNetworkReply*>("QNetworkReply*");
qRegisterMetaType<QNetworkReply**>("QNetworkReply**");
qRegisterMetaType<QItemSelection>("QItemSelection");
qRegisterMetaTypeStreamOperators<QMap<int, int> >("ColumnAlignmentMap");
qRegisterMetaTypeStreamOperators<QMap<int, Qt::Alignment>>("ColumnAlignmentMap");
qRegisterMetaType<Directory>("Directory");
qRegisterMetaType<DirectoryList>("DirectoryList");
qRegisterMetaType<Subdirectory>("Subdirectory");

View File

@ -1144,7 +1144,7 @@ void PlaylistView::SaveSettings() {
QSettings s;
s.beginGroup(Playlist::kSettingsGroup);
s.setValue("state", header_->SaveState());
s.setValue("column_alignments", QVariant::fromValue(column_alignment_));
s.setValue("column_alignments", QVariant::fromValue<ColumnAlignmentMap>(column_alignment_));
s.endGroup();
}