History

Merging with master

samcake committed 8 years ago

Commit 33bbbce2 parents f50b2fa da154d331 files · +361 −141Browse files

Showing the changes to interface/src/Application.cpp (1 of 31 files). Show all

Unified · Split

interface/src/Application.cpp+11−2
@@ -4753,7 +4753,7 @@ void Application::updateLOD(float deltaTime) const { · 4752 unmodified lines
4753 }4753 }
4754}4754}
4755 4755
4756void Application::pushPostUpdateLambda(void* key, std::function<void()> func) {4756void Application::pushPostUpdateLambda(void* key, const std::function<void()>& func) {
4757 std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);4757 std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
4758 _postUpdateLambdas[key] = func;4758 _postUpdateLambdas[key] = func;
4759}4759}
@@ -7377,7 +7377,7 @@ void Application::windowMinimizedChanged(bool minimized) { · 2617 unmodified lines
7377 }7377 }
7378}7378}
7379 7379
7380void Application::postLambdaEvent(std::function<void()> f) {7380void Application::postLambdaEvent(const std::function<void()>& f) {
7381 if (this->thread() == QThread::currentThread()) {7381 if (this->thread() == QThread::currentThread()) {
7382 f();7382 f();
7383 } else {7383 } else {
@@ -7385,6 +7385,15 @@ void Application::postLambdaEvent(std::function<void()> f) { · 1 unmodified line
7385 }7385 }
7386}7386}
7387 7387
7388void Application::sendLambdaEvent(const std::function<void()>& f) {
7389 if (this->thread() == QThread::currentThread()) {
7390 f();
7391 } else {
7392 LambdaEvent event(f);
7393 QCoreApplication::sendEvent(this, &event);
7394 }
7395}
7396
7388void Application::initPlugins(const QStringList& arguments) {7397void Application::initPlugins(const QStringList& arguments) {
7389 QCommandLineOption display("display", "Preferred displays", "displays");7398 QCommandLineOption display("display", "Preferred displays", "displays");
7390 QCommandLineOption disableDisplays("disable-displays", "Displays to disable", "displays");7399 QCommandLineOption disableDisplays("disable-displays", "Displays to disable", "displays");