1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00

Fix clazy connect-3arg-lambda

This commit is contained in:
Elias Steurer 2021-04-16 10:59:18 +02:00
parent c4ec91bd13
commit 36a59518e9
7 changed files with 8 additions and 9 deletions

View File

@ -225,7 +225,7 @@ void App::exit()
// Workaround because we cannot force to send exit event
m_telemetry->setSendInterval(5);
m_telemetry->endSession();
QTimer::singleShot(150, []() { QApplication::instance()->quit(); });
QTimer::singleShot(150, this, []() { QApplication::instance()->quit(); });
}
}

View File

@ -33,7 +33,7 @@ void InstalledListModel::init()
}
auto reloadLambda = [this]() {
QTimer::singleShot(500, [this]() {
QTimer::singleShot(500, this, [this]() {
reset();
});
};
@ -170,7 +170,6 @@ void InstalledListModel::loadInstalledContent()
if (!obj->contains("type"))
continue;
if (ScreenPlayUtil::getAvailableTypes().contains(obj->value("type").toString())) {
if (ScreenPlayUtil::getAvailableTypes().contains(obj->value("type").toString(), Qt::CaseInsensitive)) {
append(*obj, item.baseName(), item.lastModified());

View File

@ -187,7 +187,7 @@ void ScreenPlayWallpaper::setSDKConnection(const std::shared_ptr<SDKConnection>&
{
m_connection = connection;
QTimer::singleShot(1000, [this]() {
QTimer::singleShot(1000, this, [this]() {
if (playbackRate() != 1.0) {
setWallpaperValue("playbackRate", QString::number(playbackRate()), false);
}

View File

@ -36,7 +36,7 @@ void ScreenPlaySDK::init()
// If the wallpaper never connects it will never get the
// disconnect event. We can savely assume no connection will
// be made after 1 second timeout.
QTimer::singleShot(1000, [this]() {
QTimer::singleShot(1000, this, [this]() {
if (m_socket.state() != QLocalSocket::ConnectedState) {
m_socket.disconnectFromServer();
emit sdkDisconnected();

View File

@ -158,7 +158,7 @@ MainWindow::MainWindow(int screenAt, QString projectPath, QString id, QString de
}
});
QTimer::singleShot(3000, [=]() {
QTimer::singleShot(3000, this, [=]() {
ShowWindow(m_hwnd, SW_SHOWNOACTIVATE);
});

View File

@ -99,7 +99,7 @@ LRESULT __stdcall MouseHookCallback(int nCode, WPARAM wParam, LPARAM lParam)
if (type == QMouseEvent::Type::MouseButtonPress) {
}
QTimer::singleShot(100, [&]() {
QTimer::singleShot(100, [&]() {
//auto eventPress = QMouseEvent(QMouseEvent::Type::MouseButtonPress, g_LastMousePosition, mouseButton, mouseButtons, {});
//qInfo() << mouseButton << QApplication::sendEvent(g_winGlobalHook, &eventPress) << g_globalOffset.x() << g_globalOffset.y();
auto eventRelease = QMouseEvent(QMouseEvent::Type::MouseButtonRelease, g_LastMousePosition, mouseButton, mouseButtons, {});
@ -189,7 +189,7 @@ WinWindow::WinWindow(
}
}
QTimer::singleShot(1000, [&]() {
QTimer::singleShot(1000, this, [&]() {
setupWindowMouseHook();
});
}

View File

@ -69,7 +69,7 @@ WidgetWindow::WidgetWindow(
m_window.show();
// Do not trigger position changed save reuqest on startup
QTimer::singleShot(1000, [=, this]() {
QTimer::singleShot(1000, this, [=, this]() {
// We limit ourself to only update the position every 500ms!
auto sendPositionUpdate = [this]() {
m_positionMessageLimiter.stop();