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/clientapp/clientapp.h | |
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/clientapp/clientapp.h')
-rw-r--r-- | src/client/clientapp/clientapp.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/clientapp/clientapp.h b/src/client/clientapp/clientapp.h index 91dccf3..0824683 100644 --- a/src/client/clientapp/clientapp.h +++ b/src/client/clientapp/clientapp.h @@ -9,7 +9,7 @@ #if defined(clientApp) #undef clientApp #endif -#define clientApp (static_cast<ClientApp*>(QCoreApplication::instance())) +#define clientApp (static_cast<ClientApp*>(QCoreApplication::instance())) // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast) class Toolbar; class ConnectWindow; @@ -36,12 +36,9 @@ private: ServerConnection* _connection; QStringList _arguments; QString _iniPath; - bool _isManagerPc; QStringList parseParameters(); - void readIsManagerPc(); - public: ClientApp(int& argc, char** argv); @@ -56,9 +53,7 @@ public: ConnectWindow* connectWindow() const { return _connectWindow; } - bool isConfiguredAsManager() { return _isManagerPc; } - - bool isConnectedToLocalManager() { return _connection != nullptr && _connection->isLocalConnection(); } + bool isConnectedToLocalManager() const { return _connection != nullptr && _connection->isLocalConnection(); } private slots: |