diff options
| author | Simon Rettberg | 2022-10-30 20:34:23 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2022-10-30 20:34:23 +0100 |
| commit | 9f479b8f76238a03bce5d13aee14efd34e659c6e (patch) | |
| tree | e320d32838202ac4604032da7a4bc3702cc304da /src/client/main.cpp | |
| parent | Update translation files (diff) | |
| download | pvs2-9f479b8f76238a03bce5d13aee14efd34e659c6e.tar.gz pvs2-9f479b8f76238a03bce5d13aee14efd34e659c6e.tar.xz pvs2-9f479b8f76238a03bce5d13aee14efd34e659c6e.zip | |
Clean up and modernize code
- static "new-style" signal->slot connections
- Fix a lot of things Clang-Tidy complained about
- Move includes to .cpp files and use forward decls in .h
- Don't use <QtWidgets> and <QtCore>, but specific includes instead
Diffstat (limited to 'src/client/main.cpp')
| -rw-r--r-- | src/client/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/main.cpp b/src/client/main.cpp index eefd0d8..cb7aea6 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -9,19 +9,18 @@ int main(int argc, char** argv) { ClientApp app(argc, argv); - qsrand(uint(QDateTime::currentMSecsSinceEpoch())); /* here we handle the arguments that were not handled by ClientApp */ - for (QString a : app.arguments()) { + for (const auto &a : app.arguments()) { if (a == "--usage" || a == "--help") { - qStdout() << "Usage: pvsclient [--exam-mode] [--auto|--session=xxx|\"\"]" << endl; + qStdout() << "Usage: pvsclient [--exam-mode] [--auto|--session=xxx|\"\"]" << Qt::endl; exit(0); } else if (a.contains("pvsclient")) { /* do nothing */ } else { - qStdout() << "Unknown argument: " << a << endl; + qStdout() << "Unknown argument: " << a << Qt::endl; exit(1); } } - return app.exec(); + return ClientApp::exec(); } |
