summaryrefslogtreecommitdiffstats
path: root/src/client/toolbar/toolbar.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2018-07-24 13:08:25 +0200
committerSimon Rettberg2018-07-24 13:08:25 +0200
commit9ba63d1460db41c219b638212b42476164fcfdff (patch)
tree55e3249c18c50ec8e90278e639732988845c990c /src/client/toolbar/toolbar.cpp
parent[server] Fix logic error (diff)
downloadpvs2-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/toolbar/toolbar.cpp')
-rw-r--r--src/client/toolbar/toolbar.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 955731a..a8e50e9 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -99,7 +99,7 @@ void Toolbar::init()
setAttribute(Qt::WA_DeleteOnClose, false);
/* Create the VNC Window */
- _vnc = new VncWindow(NULL);
+ _vnc = new VncWindow(nullptr);
/* Create the connect window */
clientApp->connectWindow()->setAvailableRooms(myRooms());
@@ -353,7 +353,7 @@ void Toolbar::onVncServerIsRunning(int port)
*/
void Toolbar::onDisconnected(ServerConnection* connection)
{
- if (connection != NULL) {
+ if (connection != nullptr) {
disconnect(connection, SIGNAL(disconnected(ServerConnection*)), this, SLOT(onDisconnected(ServerConnection*)));
}
_ui->lblStatus->setStyleSheet("color:red");
@@ -398,7 +398,7 @@ void Toolbar::onConnected(ServerConnection* connection)
*/
void Toolbar::onDoDisconnect()
{
- if (clientApp->connection() != NULL)
+ if (clientApp->connection() != nullptr)
clientApp->connection()->disconnectFromServer();
}
@@ -486,12 +486,12 @@ void Toolbar::showInformationDialog()
void Toolbar::onBtnAttention()
{
- const bool on = clientApp->connection() != NULL && _ui->btnAttention->isChecked();
+ const bool on = clientApp->connection() != nullptr && _ui->btnAttention->isChecked();
if (on != _ui->btnAttention->isChecked()) {
_ui->btnAttention->setChecked(on);
return;
}
- if (clientApp->connection() != NULL) {
+ if (clientApp->connection() != nullptr) {
clientApp->connection()->sendAttention(on);
}
}