code: use config macro

Macro is much easier to use and more readable
This commit is contained in:
itsmattkc
2022-05-04 09:50:34 -07:00
parent 5f13a83009
commit 91b761693b
38 changed files with 105 additions and 106 deletions
+3 -3
View File
@@ -292,7 +292,7 @@ void TimeBasedWidget::SetTime(const rational &time)
QMetaObject::invokeMethod(this, "CatchUpScrollToPlayhead", Qt::QueuedConnection);
} else {
// Otherwise, assume we jumped to this out of nowhere and must now autoscroll
switch (static_cast<AutoScroll::Method>(Config::Current()["Autoscroll"].toInt())) {
switch (static_cast<AutoScroll::Method>(OLIVE_CONFIG("Autoscroll").toInt())) {
case AutoScroll::kNone:
// Do nothing
break;
@@ -606,12 +606,12 @@ void TimeBasedWidget::SetMarker()
color = closest->color();
} else {
// Fallback to default color in preferences
color = Config::Current()[QStringLiteral("MarkerColor")].toInt();
color = OLIVE_CONFIG("MarkerColor").toInt();
}
TimelineMarker *marker = new TimelineMarker(color, TimeRange(GetTime(), GetTime()));
if (Config::Current()[QStringLiteral("SetNameWithMarker")].toBool()) {
if (OLIVE_CONFIG("SetNameWithMarker").toBool()) {
MarkerPropertiesDialog mpd({marker}, timebase(), this);
if (mpd.exec() != QDialog::Accepted) {
delete marker;