Skip to content
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

Merged
merged 20 commits into from
May 29, 2018
Merged

Conversation

kshitij98
Copy link
Contributor

@kshitij98 kshitij98 commented May 20, 2018

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:

  • Add a signal to connect visibility mode update to effect selector.
  • Debug segmentation fault triggered in EffectChain::refreshAllEffects() on clicking OK in preferences.

https://bugs.launchpad.net/mixxx/+bug/1653140

@Be-ing
Copy link
Contributor

Be-ing commented May 20, 2018

Could you run git rebase -i upstream/lv2_support2 and squash the last code cleanup commit into the commit before it? (Be sure you have fetched the latest updates from upstream first.) You'll need to use the --force option with git push after that.


void setVisibility(const bool value) {
m_isVisible = value;
}
Copy link
Contributor

@Be-ing Be-ing May 20, 2018

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.

Copy link
Contributor

@Be-ing Be-ing May 21, 2018

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.

@@ -6,7 +6,7 @@
class NativeBackend : public EffectsBackend {
Q_OBJECT
public:
NativeBackend(QObject* pParent=NULL);
NativeBackend(UserSettingsPointer pConfig, QObject* pParent = nullptr);
Copy link
Contributor

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.

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;
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The width of the first column cuts off the "Visible" column header text for me (Qt5 with 2.5 scale factor)
screenshot from 2018-05-20 08-17-33

@@ -43,28 +43,62 @@
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QListWidget" name="availableEffectsList">
<property name="sizePolicy">
<widget class="QTableView" name="availableEffectsList">
Copy link
Contributor

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).

@Be-ing
Copy link
Contributor

Be-ing commented May 20, 2018

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?

@Be-ing
Copy link
Contributor

Be-ing commented May 20, 2018

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.

@Be-ing Be-ing added the effects label May 20, 2018
@Be-ing Be-ing added this to the 2.2.0 milestone May 20, 2018
@Be-ing
Copy link
Contributor

Be-ing commented May 21, 2018

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.

@kshitij98
Copy link
Contributor Author

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.

@kshitij98
Copy link
Contributor Author

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()));
Copy link
Contributor

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. 👍

@Be-ing
Copy link
Contributor

Be-ing commented May 21, 2018

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 simplify this class by making it a private struct of EffectSettingsModel:

struct EffectProfile {
    EffectManifestPointer pManifest;
    bool bIsVisible;
}

@kshitij98
Copy link
Contributor Author

kshitij98 commented May 23, 2018

I have made all the required changes. Please review.

I think we can simplify this class by making it a private struct of EffectSettingsModel:

struct EffectProfile {
    EffectManifestPointer pManifest;
    bool bIsVisible;
}

We will anyway have to define accessors and setter functions. So I think we will just be shifting the code from EffectProfile.cpp to EffectSettingsModel.cpp and it is better as it is.

Debug segmentation fault triggered in EffectChain::refreshAllEffects() on clicking OK in preferences.

I confirm that the segmentation fault is in the lv2 branch itself and hence is out of the scope of this PR.

@Be-ing
Copy link
Contributor

Be-ing commented May 24, 2018

We will anyway have to define accessors and setter functions.

That's not necessary, just use the public members of the struct directly.

Copy link
Contributor

@Be-ing Be-ing left a 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.

@@ -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());
Copy link
Contributor

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()

@@ -73,6 +74,7 @@ class EffectsBackend : public QObject {
QString m_name;
QMap<QString, RegisteredEffect> m_registeredEffects;
QList<QString> m_effectIds;
QList<QString> m_visibleEffectIds;
Copy link
Contributor

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.


m_registeredEffects[id] = RegisteredEffect(pManifest, pInstantiator);
if (visible) {
addVisibleEffect(id);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this.

@@ -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);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this.

EffectProfile::EffectProfile(EffectManifestPointer pManifest,
bool visibility,
QObject* parent)
: QObject(parent),
Copy link
Contributor

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.

@@ -30,9 +31,12 @@ void EffectsBackend::registerEffect(const QString& id,

const bool visible = m_pConfig->getValue<bool>(ConfigKey("[Visible Effects]",
pManifest->id()), true);
Copy link
Contributor

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.

m_visibleEffectManifests.end(),
pManifest, alphabetizeEffectManifests);
m_visibleEffectManifests.insert(insertion_point, pManifest);
emit visibleEffectsUpdated();
Copy link
Contributor

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) {
Copy link
Contributor

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)
Copy link
Contributor

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;
Copy link
Contributor

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

@Be-ing Be-ing mentioned this pull request May 27, 2018
@kshitij98
Copy link
Contributor Author

I have made all the requested changes. Please review.

Copy link
Contributor

@Be-ing Be-ing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost done :)

QString m_backendName;
// QString m_backendName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@@ -11,9 +11,10 @@ enum class EffectEnableState {
Enabling
};

enum class EffectType {
enum class BackendType {
Copy link
Contributor

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"?

Copy link
Contributor Author

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

Copy link
Contributor

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
Copy link
Contributor

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."

@@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@@ -3,7 +3,8 @@
#include "effects/effectsbackend.h"
#include "effects/effectsmanager.h"

EffectsBackend::EffectsBackend(QObject* pParent, QString name)
EffectsBackend::EffectsBackend(QObject* pParent,
QString name)
Copy link
Contributor

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

@@ -25,6 +26,8 @@ void EffectsBackend::registerEffect(const QString& id,
return;
}

pManifest->setBackendName(m_name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pManifest->setBackendType

@@ -61,7 +62,6 @@ class EffectsBackend : public QObject {

EffectManifestPointer manifest() const { return m_pManifest; };
EffectInstantiatorPointer initiator() const { return m_pInitator; };

Copy link
Contributor

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);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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();
Copy link
Contributor

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;
Copy link
Contributor

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?

@kshitij98
Copy link
Contributor Author

I have made the requested changes.

Currently backendTypeToTranslatedString returns QString("") for Unknown backends. We can set it to tr("Unknown"), but for consistency in Effect Info in Effects Preferences, I've returned an empty string.

int bNameComp = QString::localeAwareCompare(pManifest1->backendName(), pManifest2->backendName());
int bNameComp = QString::localeAwareCompare(
EffectManifest::backendTypeToTranslatedString(pManifest1->backendType()),
EffectManifest::backendTypeToTranslatedString(pManifest2->backendType()));
Copy link
Contributor

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()));
Copy link
Contributor

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());

Copy link
Contributor Author

@kshitij98 kshitij98 May 29, 2018

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()) {
Copy link
Contributor

@Be-ing Be-ing May 29, 2018

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

@@ -27,7 +27,7 @@ void LV2Backend::enumeratePlugins() {
continue;
}
LV2Manifest* lv2Manifest = new LV2Manifest(plug, m_properties);
lv2Manifest->getEffectManifest()->setBackendName(getName());
lv2Manifest->getEffectManifest()->setBackendType(getType());
Copy link
Contributor

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.

@@ -11,9 +11,10 @@ enum class EffectEnableState {
Enabling
};

enum class EffectType {
enum class BackendType {
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@@ -8,6 +8,8 @@
#include <QScopedPointer>
#include <QPair>

#include <algorithm>
Copy link
Contributor

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));
Copy link
Contributor

@Be-ing Be-ing May 29, 2018

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).

Copy link
Contributor

@Be-ing Be-ing left a 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).

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
Copy link
Contributor

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"

Copy link
Contributor

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()),
Copy link
Contributor

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>
Copy link
Contributor

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

return QString("Unknown");
}
}
QString translatedBackendName() {
Copy link
Contributor

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
Copy link
Contributor

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.

@Be-ing
Copy link
Contributor

Be-ing commented May 29, 2018

The tests fail to compile:

In file included from src/test/baseeffecttest.cpp:4:
src/test/baseeffecttest.h: In constructor ‘TestEffectBackend::TestEffectBackend()’:
src/test/baseeffecttest.h:22:61: error: no matching function for call to ‘EffectsBackend::EffectsBackend(NULL, const char [12])’
     TestEffectBackend() : EffectsBackend(NULL, "TestBackend") {
                                                             ^
In file included from src/test/baseeffecttest.h:13,
                 from src/test/baseeffecttest.cpp:4:
src/effects/effectsbackend.h:24:5: note: candidate: ‘EffectsBackend::EffectsBackend(QObject*, EffectBackendType)’
     EffectsBackend(QObject* pParent, EffectBackendType type);
     ^~~~~~~~~~~~~~
src/effects/effectsbackend.h:24:5: note:   no known conversion for argument 2 from ‘const char [12]’ to ‘EffectBackendType’

Use the test=1 option with scons to build the tests.

int bNameComp = static_cast<int>(pManifest1->backendType()) - static_cast<int>(pManifest2->backendType());
int dNameComp = QString::localeAwareCompare(pManifest1->displayName(), pManifest2->displayName());
Copy link
Contributor

@Be-ing Be-ing May 29, 2018

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Be-ing
Copy link
Contributor

Be-ing commented May 29, 2018

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.

@Be-ing Be-ing merged commit 9a456ed into mixxxdj:lv2_support2 May 29, 2018
ronso0 added a commit to ronso0/mixxx that referenced this pull request Jul 19, 2018
@kshitij98
Copy link
Contributor Author

https://bugs.launchpad.net/mixxx/+bug/1782868

Effect Slots need to be unloaded if a loaded effect is blacklisted.

@mixxxbot mixxxbot mentioned this pull request Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants