-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Effect Blacklisting #1674
Effect Blacklisting #1674
Conversation
Could you run |
src/effects/effectmanifest.h
Outdated
|
||
void setVisibility(const bool value) { | ||
m_isVisible = value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing else in the effect manifest is changed during the runtime of Mixxx. I think it would be better for EffectsManager or EffectsBackend to hold the information of which effects are blacklisted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to store which effects are hidden in EffectsManager than in EffectsBackend.
src/effects/native/nativebackend.h
Outdated
@@ -6,7 +6,7 @@ | |||
class NativeBackend : public EffectsBackend { | |||
Q_OBJECT | |||
public: | |||
NativeBackend(QObject* pParent=NULL); | |||
NativeBackend(UserSettingsPointer pConfig, QObject* pParent = nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conventionally the QObject* pParent
argument to a constructor is the first argument.
src/widget/weffectselector.cpp
Outdated
const QList<EffectManifestPointer> availableEffectManifests = | ||
m_pEffectsManager->getAvailableEffectManifests(); | ||
QFontMetrics metrics(font()); | ||
|
||
for (int i = 0; i < availableEffectManifests.size(); ++i) { | ||
const EffectManifestPointer pManifest = availableEffectManifests.at(i); | ||
if (!pManifest->isVisible()) | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think WEffectSelector should be responsible for determining which effects to show. Calling m_pEffectsManager->getAvailableEffectManifests()
above should take care of that for WEffectSelector. I think the only change needed to WEffectSelector is to call WEffectSelector::populate
again when a signal is received from changing the blacklisted effects in the preferences.
// Highlight first row | ||
availableEffectsList->selectRow(0); | ||
|
||
availableEffectsList->setColumnWidth(0, 50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -43,28 +43,62 @@ | |||
</attribute> | |||
<layout class="QHBoxLayout" name="horizontalLayout"> | |||
<item> | |||
<widget class="QListWidget" name="availableEffectsList"> | |||
<property name="sizePolicy"> | |||
<widget class="QTableView" name="availableEffectsList"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to add a column here for the type of effect (built-in or LV2).
How should we sort the list of effects in the preferences? Maybe put an alphabetized list of built-in effects first then the alphabetized list of LV2 effects? |
This is a good start, but I think the code could use some refactoring so the visibility of effects isn't stored on the EffectManifest. |
I don't understand the purpose of the EffectProfile class. It seems to be a thin wrapper around the EffectManifest class. It looks like it was copied and pasted from the broadcasting preferences then modified at the price of overcomplicating the code for this case. |
The purpose of EffectProfile class was to store the intermediate visibility settings of each effect. It allows us to cancel without applying the new visibility settings. |
I think we can shift the visibility settings (applied and intermediate both) to EffectsManager. |
for (EffectProfilePtr profile : m_pAvailableEffectsModel->profiles()) { | ||
EffectManifest* pManifest = profile->getManifest(); | ||
pManifest->setVisibility(profile->isVisible()); | ||
m_pConfig->set(ConfigKey("[Visible Effects]", pManifest->id()), ConfigValue(profile->isVisible())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was initially thinking of using a comma or semicolon separated list for the hidden effects, but this approach has simpler code and is more robust in case the effect name has the delimiter in it. 👍
d62acfb
to
036f0e2
Compare
I think we can simplify this class by making it a private struct of EffectSettingsModel:
|
I have made all the required changes. Please review.
We will anyway have to define accessors and setter functions. So I think we will just be shifting the code from
I confirm that the segmentation fault is in the lv2 branch itself and hence is out of the scope of this PR. |
That's not necessary, just use the public members of the struct directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is better, but there's still more refactoring to do. EffectsBackend shouldn't have anything to do with effect visibility. That should all be handled by DlgPrefEffects and EffectsManager.
src/effects/lv2/lv2backend.cpp
Outdated
@@ -31,7 +31,10 @@ void LV2Backend::enumeratePlugins() { | |||
|
|||
const bool visible = m_pConfig->getValue<bool>(ConfigKey("[Visible Effects]", | |||
lv2Manifest->getEffectManifest()->id()), false); | |||
lv2Manifest->getEffectManifest()->setVisibility(visible); | |||
lv2Manifest->getEffectManifest()->setBackendName(this->getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace this->getName()
with simply getName()
src/effects/effectsbackend.h
Outdated
@@ -73,6 +74,7 @@ class EffectsBackend : public QObject { | |||
QString m_name; | |||
QMap<QString, RegisteredEffect> m_registeredEffects; | |||
QList<QString> m_effectIds; | |||
QList<QString> m_visibleEffectIds; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EffectsBackend should not track which effects are visible, only EffectsManager.
src/effects/effectsbackend.cpp
Outdated
|
||
m_registeredEffects[id] = RegisteredEffect(pManifest, pInstantiator); | ||
if (visible) { | ||
addVisibleEffect(id); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
src/effects/effectsmanager.cpp
Outdated
@@ -81,6 +85,9 @@ void EffectsManager::addEffectsBackend(EffectsBackend* pBackend) { | |||
for (const QString& effectId : backendEffects) { | |||
const EffectManifestPointer pManifest = pBackend->getManifest(effectId); | |||
m_availableEffectManifests.append(pManifest); | |||
if (pBackend->getVisibility(effectId)) { | |||
setEffectVisibility(pManifest, true); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
src/preferences/effectprofile.cpp
Outdated
EffectProfile::EffectProfile(EffectManifestPointer pManifest, | ||
bool visibility, | ||
QObject* parent) | ||
: QObject(parent), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a QObject subclass? I think a simple struct will work.
src/effects/effectsbackend.cpp
Outdated
@@ -30,9 +31,12 @@ void EffectsBackend::registerEffect(const QString& id, | |||
|
|||
const bool visible = m_pConfig->getValue<bool>(ConfigKey("[Visible Effects]", | |||
pManifest->id()), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User preference code should be in the preference dialog classes, not scattered throughout the rest of the code. Reading the configuration values should be handled by DlgPrefEffects on initialization, which should make calls to EffectsManager::setEffectVisibility.
src/effects/effectsmanager.cpp
Outdated
m_visibleEffectManifests.end(), | ||
pManifest, alphabetizeEffectManifests); | ||
m_visibleEffectManifests.insert(insertion_point, pManifest); | ||
emit visibleEffectsUpdated(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I thought you needed parentheses around the signal name: emit(visibleEffectsUpdated())
@@ -96,6 +99,8 @@ QVariant EffectSettingsModel::headerData(int section, Qt::Orientation orientatio | |||
return tr("Visible"); | |||
} else if(section == kColumnName) { | |||
return tr("Name"); | |||
} else if(section == kColumnType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after "if": } else if (
@@ -109,6 +114,9 @@ Qt::ItemFlags EffectSettingsModel::flags(const QModelIndex& index) const { | |||
if(index.column() == kColumnName) | |||
return QAbstractItemModel::flags(index) | Qt::ItemIsSelectable; | |||
|
|||
if(index.column() == kColumnType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after "if"
@@ -59,29 +60,31 @@ int EffectSettingsModel::rowCount(const QModelIndex& parent) const { | |||
|
|||
int EffectSettingsModel::columnCount(const QModelIndex& parent) const { | |||
Q_UNUSED(parent); | |||
return 2; | |||
return 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this magic number to the anonymous namespace at the top of the file
I have made all the requested changes. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done :)
src/effects/effectmanifest.h
Outdated
QString m_backendName; | ||
// QString m_backendName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
src/effects/defs.h
Outdated
@@ -11,9 +11,10 @@ enum class EffectEnableState { | |||
Enabling | |||
}; | |||
|
|||
enum class EffectType { | |||
enum class BackendType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not immediately clear what "BackendType" means without context. I think "EffectType" is a better name. If you don't like that, then how about "EffectBackendType"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, EffectBackendType seems to be better than EffectType to me. I think EffectType should denote Phaser, compressor, etc...
I have changed it to EffectBackendType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. "EffectBackendType" works well.
@@ -19,7 +19,7 @@ DlgPrefEffects::DlgPrefEffects(QWidget* pParent, | |||
EffectManifestPointer pManifest = profile->pManifest; | |||
|
|||
// Blacklisted Non-builtin effects by default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's elaborate on this comment to explain why we are choosing to do this. Replace the comment with:
"Users are likely to have lots of external plugins installed and many of them are useless for DJing. To avoid cluttering the list shown in WEffectSelector, blacklist external plugins by default."
src/effects/effectmanifest.h
Outdated
@@ -59,11 +59,15 @@ class EffectManifest final { | |||
} | |||
} | |||
|
|||
const BackendType& backendType() const { | |||
return m_backendType; | |||
} | |||
const QString& backendName() const { | |||
return m_backendName; | |||
} | |||
void setBackendName(const QString& name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
src/effects/effectsbackend.cpp
Outdated
@@ -3,7 +3,8 @@ | |||
#include "effects/effectsbackend.h" | |||
#include "effects/effectsmanager.h" | |||
|
|||
EffectsBackend::EffectsBackend(QObject* pParent, QString name) | |||
EffectsBackend::EffectsBackend(QObject* pParent, | |||
QString name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace the QString here with a BackendType value
src/effects/effectsbackend.cpp
Outdated
@@ -25,6 +26,8 @@ void EffectsBackend::registerEffect(const QString& id, | |||
return; | |||
} | |||
|
|||
pManifest->setBackendName(m_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pManifest->setBackendType
src/effects/effectsbackend.h
Outdated
@@ -61,7 +62,6 @@ class EffectsBackend : public QObject { | |||
|
|||
EffectManifestPointer manifest() const { return m_pManifest; }; | |||
EffectInstantiatorPointer initiator() const { return m_pInitator; }; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep this blank line to separate private and public members.
return; | ||
} | ||
QString effectId = pCurrent->data(Qt::UserRole).toString(); | ||
|
||
EffectManifestPointer pManifest; | ||
EffectsBackend* pBackend; | ||
m_pEffectsManager->getEffectManifestAndBackend(effectId, &pManifest, &pBackend); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub won't let me comment directly on the lines below because you haven't modified them yet. Anyway, use effectType->setText(EffectManifest::backendTypeToTranslatedString(pManifest->backendType())
below instead of pBackend->getName()
.
I noticed an issue with the EffectsManager::getEffectManifestAndBackend
and EffectsManager::getEffectManifest
functions. If two backends each have an effect that happens to have the same ID string, there will be conflict between them and only the effect in the backend that happened to be registered first will be available to the rest of Mixxx. Currently this is a hypothetical issue because LV2 effects are identified by a URL which wouldn't conflict with the ID strings for built-in effects (assuming a standards-compliant LV2 plugin, which we cannot assume because we do not control the LV2 plugins), so fixing this is not a big priority and does not need to be done in this PR. For now, removing DlgPrefEffects' dependency on EffectsManager::getEffectManifestAndBackend
is enough. I think we should keep this issue in mind going forward with the refactoring though. Effects should be identified by both their EffectType and a QString, not a QString alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the dependency on EffectsManager::getEffectManifestAndBackend
in the last commit.
I noticed the same a while ago. I think we can create a hash function using the EffectType and the Effect Id, and use it rather than just the Effect Id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may consider adding an equality operator to the EffectManifest class that compares both the ID string and the EffectBackendType.
} else if (column == kColumnName && role == Qt::DisplayRole) { | ||
return profile->pManifest->displayName(); | ||
} else if (column == kColumnType && role == Qt::DisplayRole) { | ||
return profile->pManifest->backendName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use EffectManifest::backendTypeToTranslatedString
} | ||
|
||
DlgPrefEffects::~DlgPrefEffects() { | ||
delete m_pAvailableEffectsModel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a pointer? How about making it a plain member variable?
b321c71
to
ff90165
Compare
I have made the requested changes. Currently |
src/effects/effectsmanager.cpp
Outdated
int bNameComp = QString::localeAwareCompare(pManifest1->backendName(), pManifest2->backendName()); | ||
int bNameComp = QString::localeAwareCompare( | ||
EffectManifest::backendTypeToTranslatedString(pManifest1->backendType()), | ||
EffectManifest::backendTypeToTranslatedString(pManifest2->backendType())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The results of this could change depending on how "Built-in" is translated. Let's use static_cast<int>
to compare the EffectBackendTypes instead. This way the sorting order will match the order the types are declared in the enum class.
} else { | ||
effectType->clear(); | ||
} | ||
effectType->setText(EffectManifest::backendTypeToTranslatedString(pManifest->backendType())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, now that I see this line, it looks unnecessarily verbose. Let's change backendTypeToTranslatedString
to a non-static public method of EffectManifest that reads the manifest's m_backendType member so this line could be reduced to:
effectType->setText(pManifest->backendTypeToTranslatedString());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can change the function name to something like translatedBackendName()
also.
Because anyway we are using backendTypeToTranslatedString()
as an accessor function and translatedBackendName()
seems more intuitive to me.
m_pAvailableEffectsModel->resetFromEffectManager(pEffectsManager); | ||
for (auto profile : m_pAvailableEffectsModel->profiles()) { | ||
m_availableEffectsModel.resetFromEffectManager(pEffectsManager); | ||
for (auto profile : m_availableEffectsModel.profiles()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto& profile
to prevent copying
src/effects/lv2/lv2backend.cpp
Outdated
@@ -27,7 +27,7 @@ void LV2Backend::enumeratePlugins() { | |||
continue; | |||
} | |||
LV2Manifest* lv2Manifest = new LV2Manifest(plug, m_properties); | |||
lv2Manifest->getEffectManifest()->setBackendName(getName()); | |||
lv2Manifest->getEffectManifest()->setBackendType(getType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a little odd to use getType()
here when you could simply access m_type directly by making it a protected member of EffectsBackend.
src/effects/defs.h
Outdated
@@ -11,9 +11,10 @@ enum class EffectEnableState { | |||
Enabling | |||
}; | |||
|
|||
enum class EffectType { | |||
enum class BackendType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. "EffectBackendType" works well.
enum class EffectBackendType { | ||
BuiltIn, | ||
LV2, | ||
Unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this Unknown
value? Can we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added Unknown
to handle the case of a manifest not having a backend rather than handling it while setting the effectType in dlgprefeffects
. I think we should keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When would an EffectManifest ever not have a backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EffectManifest would always have a backend currently. But because the backendName is not set in its constructor but through setBackendName()
function, I think we should set it to Unknown
for the time being rather than setting it to the first value (Built-in
) in the EffectBackendType enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I thought of a use case for this Unknown value. When we parse an XML file specifying an effect chain preset and use the EffectManifest::backendTypeFromString
function, we can use the Unknown return value to determine that the effect cannot be loaded.
src/effects/effectsmanager.h
Outdated
@@ -8,6 +8,8 @@ | |||
#include <QScopedPointer> | |||
#include <QPair> | |||
|
|||
#include <algorithm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This #include is only needed in the .cpp file, so move it there.
for (EffectProfilePtr profile : m_availableEffectsModel.profiles()) { | ||
EffectManifestPointer pManifest = profile->pManifest; | ||
m_pEffectsManager->setEffectVisibility(pManifest, profile->bIsVisible); | ||
m_pConfig->set(ConfigKey("[Visible Effects]", pManifest->id()), ConfigValue(profile->bIsVisible)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have noticed the potential for name collisions using just the ID string of EffectManifests, I see that problem could also occur here. I propose adding the EffectBackendType converted to a string to the group of the ConfigKey, for example "[Visible Built-in Effects]". We'll need a new public method of EffectManifest, let's call it backendTypeToUntranslatedString
, so the logic works regardless of the user's locale (which the user could change between different times Mixxx is run).
7f4582c
to
c3079c3
Compare
c3079c3
to
b87b2bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some comments to explain why some not-so-obvious decisions were made to future developers (including ourselves looking at this code in the future).
src/effects/effectsmanager.cpp
Outdated
int bNameComp = QString::localeAwareCompare( | ||
EffectManifest::backendTypeToTranslatedString(pManifest1->backendType()), | ||
EffectManifest::backendTypeToTranslatedString(pManifest2->backendType())); | ||
// Add an exception for "Built-in" backends, to keep the Built-in effects in the beginning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment here: "Sort built-in effects first before external plugins"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add a comment in defs.h where the EffectBackendType enum is declared explaining that the order that the values are declared in the enum class determines how they are sorted in the WEffectSelector and DlgPrefEffects.
@@ -62,7 +62,8 @@ void DlgPrefEffects::slotApply() { | |||
for (EffectProfilePtr profile : m_availableEffectsModel.profiles()) { | |||
EffectManifestPointer pManifest = profile->pManifest; | |||
m_pEffectsManager->setEffectVisibility(pManifest, profile->bIsVisible); | |||
m_pConfig->set(ConfigKey("[Visible Effects]", pManifest->id()), ConfigValue(profile->bIsVisible)); | |||
m_pConfig->set(ConfigKey("[Visible " + pManifest->backendName() + " Effects]", pManifest->id()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment here explaining why we put the backendName in the ConfigKey group.
@@ -3,6 +3,8 @@ | |||
#include <QMetaType> | |||
#include <QtAlgorithms> | |||
|
|||
#include <algorithm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the include from effectsmanager.h too
src/effects/effectmanifest.h
Outdated
return QString("Unknown"); | ||
} | ||
} | ||
QString translatedBackendName() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment: "Use this when showing the string in the GUI"
enum class EffectBackendType { | ||
BuiltIn, | ||
LV2, | ||
Unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I thought of a use case for this Unknown value. When we parse an XML file specifying an effect chain preset and use the EffectManifest::backendTypeFromString
function, we can use the Unknown return value to determine that the effect cannot be loaded.
The tests fail to compile:
Use the |
src/effects/effectsmanager.cpp
Outdated
int bNameComp = static_cast<int>(pManifest1->backendType()) - static_cast<int>(pManifest2->backendType()); | ||
int dNameComp = QString::localeAwareCompare(pManifest1->displayName(), pManifest2->displayName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do b
and d
before NameComp
mean here? Backend and... ? Let's use variable names that explain themselves better. How about "backendNameComparison" and "displayNameComparison"?
|
||
// Effects from different backends can have same Effect IDs. | ||
// Add backend name to group to uniquely identify those effects. | ||
// Use untranslated value to keep the group language independent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bbae2ba
to
99bb100
Compare
Looks good to me! I'll wait for Travis and AppVeyor to finish before merging. Thank you for rescuing the LV2 branch from rotting further. I am glad we can finally release it. |
Effect Blacklisting
https://bugs.launchpad.net/mixxx/+bug/1782868 Effect Slots need to be unloaded if a loaded effect is blacklisted. |
Implemented a functionality to hide effects through the effects tab in Preferences. LV2 Effects are hidden by default.
A few things are still left to be done:
EffectChain::refreshAllEffects()
on clickingOK
in preferences.https://bugs.launchpad.net/mixxx/+bug/1653140