From 99b2e07890cefad3541c21ea79cc43d79a8fe4fe Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Tue, 22 Apr 2025 09:21:03 +0200 Subject: [PATCH] Lint --- client/mainwindow.cpp | 7 ++++--- client/simulator_base.hpp | 7 +++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/client/mainwindow.cpp b/client/mainwindow.cpp index 98044b6..f3dfaaa 100644 --- a/client/mainwindow.cpp +++ b/client/mainwindow.cpp @@ -1,7 +1,7 @@ #include "mainwindow.hpp" #include "ui_mainwindow.h" -typedef Simulator_base *(*Get_UI)(Web_socket_wrapper*, QWidget*); +typedef Simulator_base *(*Get_UI)(Web_socket_wrapper *, QWidget *); MainWindow::MainWindow(QUrl ws_url, QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), m_web_socket(new Web_socket_wrapper(ws_url)), @@ -9,7 +9,8 @@ MainWindow::MainWindow(QUrl ws_url, QWidget *parent) { ui->setupUi(this); QLibrary lib; - QDirIterator it(QCoreApplication::applicationDirPath(), QStringList() << "*.so" << "*.dll", QDir::Files, QDirIterator::Subdirectories); + QDirIterator it(QCoreApplication::applicationDirPath(), QStringList() << "*.so" << "*.dll", QDir::Files, + QDirIterator::Subdirectories); while (it.hasNext()) { lib.setFileName(it.next()); @@ -25,7 +26,7 @@ MainWindow::MainWindow(QUrl ws_url, QWidget *parent) lib.unload(); } // Insert debug sims here - //INSERT_SIMULATOR(SIM_NAME); + // INSERT_SIMULATOR(SIM_NAME); m_error_dialog->set_error("Connection timed out\nCheck if the server is running"); ui->connection->setText("Connected to " + ws_url.toString()); diff --git a/client/simulator_base.hpp b/client/simulator_base.hpp index f0061f7..4f6b497 100644 --- a/client/simulator_base.hpp +++ b/client/simulator_base.hpp @@ -14,8 +14,11 @@ using json = nlohmann::json; #define PUSH_UI_ITEM(item) push_ui_item(ui->item) -#define EXPORT_UI(client) \ -extern "C" Q_DECL_EXPORT Simulator_base* get_ui(Web_socket_wrapper *api, QWidget *parent) { return new client(api, parent); } +#define EXPORT_UI(client) \ + extern "C" Q_DECL_EXPORT Simulator_base *get_ui(Web_socket_wrapper *api, QWidget *parent) \ + { \ + return new client(api, parent); \ + } class Simulator_base : public QMainWindow {