diff options
author | Simon Rettberg | 2018-07-24 13:08:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-07-24 13:08:25 +0200 |
commit | 9ba63d1460db41c219b638212b42476164fcfdff (patch) | |
tree | 55e3249c18c50ec8e90278e639732988845c990c /src/client/clientapp/clientapp.cpp | |
parent | [server] Fix logic error (diff) | |
download | pvs2-9ba63d1460db41c219b638212b42476164fcfdff.tar.gz pvs2-9ba63d1460db41c219b638212b42476164fcfdff.tar.xz pvs2-9ba63d1460db41c219b638212b42476164fcfdff.zip |
Update code style, fix compiler warnings
- Use nullptr instead of NULL for better warnings in case of mistakes
- Get rid of VLAs which are not in C++11 actually
- Fix implicit signed <-> unsigned mismatches by adding checks and casts
Diffstat (limited to 'src/client/clientapp/clientapp.cpp')
-rw-r--r-- | src/client/clientapp/clientapp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/clientapp/clientapp.cpp b/src/client/clientapp/clientapp.cpp index 2f65bd1..962ec42 100644 --- a/src/client/clientapp/clientapp.cpp +++ b/src/client/clientapp/clientapp.cpp @@ -5,7 +5,7 @@ #include "../net/serverconnection.h" ClientApp::ClientApp(int& argc, char** argv) - : QApplication(argc, argv), _connectionMode(ConnectionMode::None), _examMode(false), _connection(NULL), _isManagerPc(false) + : QApplication(argc, argv), _connectionMode(ConnectionMode::None), _examMode(false), _connection(nullptr), _isManagerPc(false) { /* some values */ setOrganizationName("openslx"); @@ -31,7 +31,7 @@ ClientApp::ClientApp(int& argc, char** argv) readIsManagerPc(); - _connectWindow = new ConnectWindow(NULL); + _connectWindow = new ConnectWindow(nullptr); connect(_connectWindow, SIGNAL(connected(ServerConnection*)), this, SLOT(connected(ServerConnection*))); if (_connectionMode == ConnectionMode::Auto) { _toolbar = new Toolbar(true); // auto connect client without session ID. @@ -114,10 +114,10 @@ void ClientApp::connected(ServerConnection* connection) void ClientApp::disconnected(ServerConnection* connection) { - if (connection != NULL) + if (connection != nullptr) connection->blockSignals(true); if (_connection == connection) { - _connection = NULL; + _connection = nullptr; } } |