forked from qt-creator/qt-creator
Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -46,7 +46,7 @@ class SftpDirNode;
|
||||
class SftpFileNode
|
||||
{
|
||||
public:
|
||||
SftpFileNode() : parent(0) { }
|
||||
SftpFileNode() : parent(nullptr) { }
|
||||
virtual ~SftpFileNode() { }
|
||||
|
||||
QString path;
|
||||
@@ -98,9 +98,9 @@ using namespace Internal;
|
||||
SftpFileSystemModel::SftpFileSystemModel(QObject *parent)
|
||||
: QAbstractItemModel(parent), d(new SftpFileSystemModelPrivate)
|
||||
{
|
||||
d->sshConnection = 0;
|
||||
d->sshConnection = nullptr;
|
||||
d->rootDirectory = QLatin1Char('/');
|
||||
d->rootNode = 0;
|
||||
d->rootNode = nullptr;
|
||||
d->statJobId = SftpInvalidJob;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void SftpFileSystemModel::setRootDirectory(const QString &path)
|
||||
beginResetModel();
|
||||
d->rootDirectory = path;
|
||||
delete d->rootNode;
|
||||
d->rootNode = 0;
|
||||
d->rootNode = nullptr;
|
||||
d->lsOps.clear();
|
||||
d->statJobId = SftpInvalidJob;
|
||||
endResetModel();
|
||||
@@ -262,17 +262,17 @@ void SftpFileSystemModel::statRootDirectory()
|
||||
void SftpFileSystemModel::shutDown()
|
||||
{
|
||||
if (d->sftpSession) {
|
||||
disconnect(d->sftpSession.get(), 0, this, 0);
|
||||
disconnect(d->sftpSession.get(), nullptr, this, nullptr);
|
||||
d->sftpSession->quit();
|
||||
d->sftpSession.release()->deleteLater();
|
||||
}
|
||||
if (d->sshConnection) {
|
||||
disconnect(d->sshConnection, 0, this, 0);
|
||||
disconnect(d->sshConnection, nullptr, this, nullptr);
|
||||
QSsh::releaseConnection(d->sshConnection);
|
||||
d->sshConnection = 0;
|
||||
d->sshConnection = nullptr;
|
||||
}
|
||||
delete d->rootNode;
|
||||
d->rootNode = 0;
|
||||
d->rootNode = nullptr;
|
||||
}
|
||||
|
||||
void SftpFileSystemModel::handleSshConnectionFailure()
|
||||
|
||||
@@ -41,7 +41,7 @@ class QSSH_EXPORT SftpFileSystemModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SftpFileSystemModel(QObject *parent = 0);
|
||||
explicit SftpFileSystemModel(QObject *parent = nullptr);
|
||||
~SftpFileSystemModel();
|
||||
|
||||
/*
|
||||
|
||||
@@ -99,7 +99,7 @@ class QSSH_EXPORT SshConnection : public QObject
|
||||
public:
|
||||
enum State { Unconnected, Connecting, Connected, Disconnecting };
|
||||
|
||||
explicit SshConnection(const SshConnectionParameters &serverInfo, QObject *parent = 0);
|
||||
explicit SshConnection(const SshConnectionParameters &serverInfo, QObject *parent = nullptr);
|
||||
|
||||
void connectToHost();
|
||||
void disconnectFromHost();
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
~SshConnectionManager()
|
||||
{
|
||||
foreach (const UnaquiredConnection &connection, m_unacquiredConnections) {
|
||||
disconnect(connection.connection, 0, this, 0);
|
||||
disconnect(connection.connection, nullptr, this, nullptr);
|
||||
delete connection.connection;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
}
|
||||
|
||||
if (doDelete) {
|
||||
disconnect(connection, 0, this, 0);
|
||||
disconnect(connection, nullptr, this, nullptr);
|
||||
m_deprecatedConnections.removeAll(connection);
|
||||
connection->deleteLater();
|
||||
}
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
for (int i = 0; i < m_unacquiredConnections.count(); ++i) {
|
||||
SshConnection * const connection = m_unacquiredConnections.at(i).connection;
|
||||
if (connection->connectionParameters() == sshParams) {
|
||||
disconnect(connection, 0, this, 0);
|
||||
disconnect(connection, nullptr, this, nullptr);
|
||||
delete connection;
|
||||
m_unacquiredConnections.removeAt(i);
|
||||
break;
|
||||
@@ -205,7 +205,7 @@ private:
|
||||
return;
|
||||
|
||||
if (m_unacquiredConnections.removeOne(UnaquiredConnection(currentConnection))) {
|
||||
disconnect(currentConnection, 0, this, 0);
|
||||
disconnect(currentConnection, nullptr, this, nullptr);
|
||||
currentConnection->deleteLater();
|
||||
}
|
||||
}
|
||||
@@ -216,7 +216,7 @@ private:
|
||||
for (int i = m_unacquiredConnections.count() - 1; i >= 0; --i) {
|
||||
UnaquiredConnection &c = m_unacquiredConnections[i];
|
||||
if (c.scheduledForRemoval) {
|
||||
disconnect(c.connection, 0, this, 0);
|
||||
disconnect(c.connection, nullptr, this, nullptr);
|
||||
c.connection->deleteLater();
|
||||
m_unacquiredConnections.removeAt(i);
|
||||
} else {
|
||||
|
||||
@@ -37,7 +37,7 @@ class QSSH_EXPORT SshKeyCreationDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SshKeyCreationDialog(QWidget *parent = 0);
|
||||
SshKeyCreationDialog(QWidget *parent = nullptr);
|
||||
~SshKeyCreationDialog();
|
||||
|
||||
QString privateKeyFilePath() const;
|
||||
|
||||
@@ -189,9 +189,9 @@ void SshRemoteProcessRunner::setState(int newState)
|
||||
d->m_process.release()->deleteLater();
|
||||
}
|
||||
if (d->m_connection) {
|
||||
disconnect(d->m_connection, 0, this, 0);
|
||||
disconnect(d->m_connection, nullptr, this, nullptr);
|
||||
QSsh::releaseConnection(d->m_connection);
|
||||
d->m_connection = 0;
|
||||
d->m_connection = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class QSSH_EXPORT SshRemoteProcessRunner : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SshRemoteProcessRunner(QObject *parent = 0);
|
||||
SshRemoteProcessRunner(QObject *parent = nullptr);
|
||||
~SshRemoteProcessRunner();
|
||||
|
||||
void run(const QString &command, const SshConnectionParameters &sshParams);
|
||||
|
||||
Reference in New Issue
Block a user