summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Szmigin <smidge@xsco.net>2020-09-18 00:43:50 +0100
committerAdam Szmigin <smidge@xsco.net>2020-10-11 14:41:36 +0100
commitb6400bc1bfaa769258a00d7551aeab17f0ab7dbb (patch)
tree8dd8b892ccbb0d9350bec5f19fa4ca97e7933c68
parente1c2cfc58506aff45dae034534f269258f0bba70 (diff)
Fixes for correct use of experimental optional
-rw-r--r--src/library/export/dlglibraryexport.cpp2
-rw-r--r--src/library/export/engineprimeexportjob.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/library/export/dlglibraryexport.cpp b/src/library/export/dlglibraryexport.cpp
index 428173b946..fe677b569a 100644
--- a/src/library/export/dlglibraryexport.cpp
+++ b/src/library/export/dlglibraryexport.cpp
@@ -146,7 +146,7 @@ void DlgLibraryExport::setSelectedCrate(std::optional<CrateId> crateId) {
for (auto i = 0; i < m_pCratesList->count(); ++i) {
auto* pItem = m_pCratesList->item(i);
auto currCrateId = pItem->data(Qt::UserRole).toInt();
- if (currCrateId == crateId.value().value()) {
+ if (currCrateId == crateId->value()) {
m_pCratesList->setCurrentItem(pItem);
return;
}
diff --git a/src/library/export/engineprimeexportjob.cpp b/src/library/export/engineprimeexportjob.cpp
index 353b1d113d..1957321434 100644
--- a/src/library/export/engineprimeexportjob.cpp
+++ b/src/library/export/engineprimeexportjob.cpp
@@ -500,7 +500,7 @@ void EnginePrimeExportJob::run() {
// underneath this crate.
auto optionalExtRootCrate = db.root_crate_by_name(kMixxxRootCrateName);
auto extRootCrate = optionalExtRootCrate
- ? optionalExtRootCrate.value()
+ ? *optionalExtRootCrate
: db.create_root_crate(kMixxxRootCrateName);
for (const TrackRef& trackRef : m_trackRefs) {
// Add each track to the root crate, even if it also belongs to others.