OtterBrowser/otter-browser

"no matching constructor for initialization of 'Action'" when building from source

Closed this issue · 1 comments

I am attempting to build from source on an M2 Mac. I get the above error message when trying to compile the file MacPlatformIntegration.mm. Here is an example:

src/modules/platforms/mac/MacPlatformIntegration.mm:198:26: error: no matching constructor for initialization of 'Action'
                                        menu->addAction(new Action(actions.at(i), {}, {{QLatin1String("text"), QT_TRANSLATE_NOOP("actions", "Bookmarks")}}, executor, menu));
                                                            ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Looking at src/ui/Action.h, I don't see an available constructor with five parameters:

    explicit Action(const QString &text, bool isTranslateable, QObject *parent);
    explicit Action(int identifier, const QVariantMap &parameters, QObject *parent);
    explicit Action(int identifier, const QVariantMap &parameters, const ActionExecutor::Object &executor, QObject *parent);

I had a quick skim of the other calls to new Action() and the didn't spot any others that use 5 parameters.

@biggianteye, it seems that this wasn't updated after changes in Action, long time ago.
macOS support is in bad shape since gate keeper made packaging for this platform pointless (since you can't distribute binaries without signing them, which isn't free)…