OtterBrowser / otter-browser

Otter Browser aims to recreate the best aspects of the classic Opera (12.x) UI using Qt5
https://otter-browser.org
GNU General Public License v3.0
1.8k stars 277 forks source link

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

Closed biggianteye closed 12 months ago

biggianteye commented 12 months ago

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.

Emdek commented 12 months ago

@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)…