Skip to content

Commit

Permalink
Fix clazy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed May 13, 2024
1 parent f382642 commit bc6bbde
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/auto/simpletest/simpletest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ int main(int argc, char **argv)
if (kdsa.isPrimaryInstance()) {
std::cout << "Primary" << std::endl;

QObject::connect(&kdsa, &KDSingleApplication::messageReceived,
QObject::connect(&kdsa, &KDSingleApplication::messageReceived, qApp,
[](const QByteArray &message) {
std::cout << "MESSAGE: >" << message.constData() << '<' << std::endl;
qApp->quit();
});

QTimer::singleShot(5000, []() { qApp->exit(1); });
QTimer::singleShot(5000, qApp, []() { qApp->exit(1); });

return app.exec();
} else {
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/stresstest/stresstest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main(int argc, char **argv)
qApp->quit();
});

QTimer::singleShot(timeout, [&totalMessages]() {
QTimer::singleShot(timeout, qApp, [&totalMessages]() {
std::cerr << "Primary timed out, still " << totalMessages << " messages" << std::endl;
qApp->exit(1);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/stresstest/stresstest2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char **argv)
qApp->quit();
});

QTimer::singleShot(timeout, [&counter]() {
QTimer::singleShot(timeout, qApp, [&counter]() {
std::cerr << "Primary time out, still " << counter << " secondaries" << std::endl;
qApp->exit(1);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/manual/simplesingleapp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main(int argc, char **argv)
std::cout << "Primary; waiting for secondary instances..." << std::endl;
shutdownTimer.start();

QObject::connect(&kdsa, &KDSingleApplication::messageReceived,
QObject::connect(&kdsa, &KDSingleApplication::messageReceived, &shutdownTimer,
[&shutdownTimer](const QByteArray &message) {
shutdownTimer.start();
std::cout << "Message from secondary: >" << message.constData() << '<' << std::endl;
Expand Down

0 comments on commit bc6bbde

Please sign in to comment.