From eb2bafc3d2b36f7bbb7012bee3a21bacb8cf50e2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 31 Oct 2022 15:53:01 +0100 Subject: Add a few hacks to make it compile on Qt 5.12 again --- src/client/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/client/main.cpp') diff --git a/src/client/main.cpp b/src/client/main.cpp index cb7aea6..6a7c2a0 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -2,6 +2,10 @@ #include "clientapp/clientapp.h" #include "util/util.h" +// Remove when we don't support Ubuntu 20.04 anymore +#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) +#define endl Qt::endl +#endif /* instantiates the ClientApp, handles some extra parameters and starts the * main-loop of ClientApp */ @@ -13,12 +17,12 @@ int main(int argc, char** argv) /* here we handle the arguments that were not handled by ClientApp */ for (const auto &a : app.arguments()) { if (a == "--usage" || a == "--help") { - qStdout() << "Usage: pvsclient [--exam-mode] [--auto|--session=xxx|\"\"]" << Qt::endl; + qStdout() << "Usage: pvsclient [--exam-mode] [--auto|--session=xxx|\"\"]" << endl; exit(0); } else if (a.contains("pvsclient")) { /* do nothing */ } else { - qStdout() << "Unknown argument: " << a << Qt::endl; + qStdout() << "Unknown argument: " << a << endl; exit(1); } } -- cgit v1.2.3-55-g7522