diff options
author | Uwe Klotz <uwe_klotz@web.de> | 2017-06-07 22:00:40 +0200 |
---|---|---|
committer | Uwe Klotz <uwe_klotz@web.de> | 2017-06-12 07:30:17 +0200 |
commit | 83a1e2937aa0006a6d536c8c086a04056bc3b3b7 (patch) | |
tree | 005b5a6092f6032de55029332c399397f4ef397f /src/library/library.cpp | |
parent | eeb8661dca67e0c529bea4eaffb149dec48ba80c (diff) |
Define a constant for [Library] config group
Diffstat (limited to 'src/library/library.cpp')
-rw-r--r-- | src/library/library.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/library/library.cpp b/src/library/library.cpp index acc84f81f1..983cfbf346 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -45,6 +45,9 @@ const mixxx::Logger kLogger("Library"); } // anonymous namespace +//static +const QString Library::kConfigGroup("[Library]"); + // This is is the name which we use to register the WTrackTableView with the // WLibrary const QString Library::m_sTrackViewName = QString("WTrackTableView"); @@ -90,7 +93,7 @@ Library::Library(QObject* parent, UserSettingsPointer pConfig, qRegisterMetaType<Library::RemovalType>("Library::RemovalType"); - m_pKeyNotation.reset(new ControlObject(ConfigKey("[Library]", "key_notation"))); + m_pKeyNotation.reset(new ControlObject(ConfigKey(kConfigGroup, "key_notation"))); connect(&m_scanner, SIGNAL(scanStarted()), this, SIGNAL(scanStarted())); @@ -132,21 +135,21 @@ Library::Library(QObject* parent, UserSettingsPointer pConfig, //messagebox popup when you select them. (This forces you to reach for your //mouse or keyboard if you're using MIDI control and you scroll through them...) if (RhythmboxFeature::isSupported() && - pConfig->getValue(ConfigKey("[Library]","ShowRhythmboxLibrary"), true)) { + pConfig->getValue(ConfigKey(kConfigGroup,"ShowRhythmboxLibrary"), true)) { addFeature(new RhythmboxFeature(this, m_pTrackCollection)); } - if (pConfig->getValue(ConfigKey("[Library]","ShowBansheeLibrary"), true)) { + if (pConfig->getValue(ConfigKey(kConfigGroup,"ShowBansheeLibrary"), true)) { BansheeFeature::prepareDbPath(pConfig); if (BansheeFeature::isSupported()) { addFeature(new BansheeFeature(this, m_pTrackCollection, pConfig)); } } if (ITunesFeature::isSupported() && - pConfig->getValue(ConfigKey("[Library]","ShowITunesLibrary"), true)) { + pConfig->getValue(ConfigKey(kConfigGroup,"ShowITunesLibrary"), true)) { addFeature(new ITunesFeature(this, m_pTrackCollection)); } if (TraktorFeature::isSupported() && - pConfig->getValue(ConfigKey("[Library]","ShowTraktorLibrary"), true)) { + pConfig->getValue(ConfigKey(kConfigGroup,"ShowTraktorLibrary"), true)) { addFeature(new TraktorFeature(this, m_pTrackCollection)); } @@ -163,8 +166,8 @@ Library::Library(QObject* parent, UserSettingsPointer pConfig, } m_iTrackTableRowHeight = m_pConfig->getValue( - ConfigKey("[Library]", "RowHeight"), kDefaultRowHeightPx); - QString fontStr = m_pConfig->getValueString(ConfigKey("[Library]", "Font")); + ConfigKey(kConfigGroup, "RowHeight"), kDefaultRowHeightPx); + QString fontStr = m_pConfig->getValueString(ConfigKey(kConfigGroup, "Font")); if (!fontStr.isEmpty()) { m_trackTableFont.fromString(fontStr); } else { |