mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:44:01 +02:00
Noop change with more declarations, in hopes of convincing MSVS how lambdas work.
(Hey, it's worth a try...)
This commit is contained in:
parent
1b134d60d5
commit
069e6237cc
1 changed files with 6 additions and 6 deletions
|
@ -434,16 +434,16 @@ void ScriptEngine::addEventHandler(const EntityItemID& entityID, const QString&
|
|||
});
|
||||
|
||||
// Two common cases of event handler, differing only in argument signature.
|
||||
auto makeSingleEntityHandler = [=](const QString& eventName) {
|
||||
return [=](const EntityItemID& entityItemID) {
|
||||
generalHandler(entityItemID, eventName, [=]() {
|
||||
auto makeSingleEntityHandler = [=](const QString& eventName) -> std::function<void(const EntityItemID&)> {
|
||||
return [=](const EntityItemID& entityItemID) -> void {
|
||||
generalHandler(entityItemID, eventName, [=]() -> QScriptValueList {
|
||||
return QScriptValueList() << entityItemID.toScriptValue(this);
|
||||
});
|
||||
};
|
||||
};
|
||||
auto makeMouseHandler = [=](const QString& eventName) {
|
||||
return [=](const EntityItemID& entityItemID, const MouseEvent& event) {
|
||||
generalHandler(entityItemID, eventName, [=]() {
|
||||
auto makeMouseHandler = [=](const QString& eventName) -> std::function<void(const EntityItemID&, const MouseEvent&)> {
|
||||
return [=](const EntityItemID& entityItemID, const MouseEvent& event) -> void {
|
||||
generalHandler(entityItemID, eventName, [=]() -> QScriptValueList {
|
||||
return QScriptValueList() << entityItemID.toScriptValue(this) << event.toScriptValue(this);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue