From 9ba63d1460db41c219b638212b42476164fcfdff Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 24 Jul 2018 13:08:25 +0200 Subject: 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 --- src/client/connectwindow/connectwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/connectwindow/connectwindow.cpp') diff --git a/src/client/connectwindow/connectwindow.cpp b/src/client/connectwindow/connectwindow.cpp index b1f583a..c77a5e6 100644 --- a/src/client/connectwindow/connectwindow.cpp +++ b/src/client/connectwindow/connectwindow.cpp @@ -27,7 +27,7 @@ ConnectWindow::ConnectWindow(QWidget *parent) : QWidget(parent) _timerHide = 0; _state = Idle; _hashSslErrorCount = 0; - _pendingConnection = NULL; + _pendingConnection = nullptr; // Initialize the GUI _ui->setupUi(this); @@ -320,7 +320,7 @@ void ConnectWindow::onConnectionStateChange(ConnectWindow::ConnectionState state QObject::disconnect(_pendingConnection, SIGNAL(stateChange(ConnectWindow::ConnectionState)), this, SLOT(onConnectionStateChange(ConnectWindow::ConnectionState))); QObject::disconnect(_pendingConnection, SIGNAL(destroyed(QObject*)), this, SLOT(onConnectionClosed(QObject*))); emit connected(_pendingConnection); - _pendingConnection = NULL; + _pendingConnection = nullptr; this->updateUserInterface(); @@ -341,12 +341,12 @@ void ConnectWindow::onComboBox_keyPressed(QKeyEvent* e) } /***************************************************************************//** - * If connection is closed set _pendingConnection = NULL. + * If connection is closed set _pendingConnection = nullptr. * @param connection */ void ConnectWindow::onConnectionClosed(QObject* /* connection */ ) { - _pendingConnection = NULL; + _pendingConnection = nullptr; } /***************************************************************************//** -- cgit v1.2.3-55-g7522