CPaster: Replace 0 by nullptr

Change-Id: Ic916a6b464951ea319345333c0c7188852f58d8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Montel Laurent
2017-02-24 15:33:09 +01:00
committed by Laurent Montel
parent 1704c484a8
commit 1da4966b26
9 changed files with 11 additions and 11 deletions

View File

@@ -94,7 +94,7 @@ void CodePasterServiceImpl::postClipboard()
} }
// ---------- CodepasterPlugin // ---------- CodepasterPlugin
CodepasterPlugin *CodepasterPlugin::m_instance = 0; CodepasterPlugin *CodepasterPlugin::m_instance = nullptr;
CodepasterPlugin::CodepasterPlugin() : CodepasterPlugin::CodepasterPlugin() :
m_settings(new Settings) m_settings(new Settings)
@@ -106,7 +106,7 @@ CodepasterPlugin::~CodepasterPlugin()
{ {
delete m_urlOpen; delete m_urlOpen;
qDeleteAll(m_protocols); qDeleteAll(m_protocols);
CodepasterPlugin::m_instance = 0; CodepasterPlugin::m_instance = nullptr;
} }
bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMessage) bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMessage)

View File

@@ -80,7 +80,7 @@ Core::IOptionsPage *FileShareProtocol::settingsPage() const
static bool parse(const QString &fileName, static bool parse(const QString &fileName,
QString *errorMessage, QString *errorMessage,
QString *user = 0, QString *description = 0, QString *text = 0) QString *user = nullptr, QString *description = nullptr, QString *text = nullptr)
{ {
unsigned elementCount = 0; unsigned elementCount = 0;

View File

@@ -93,7 +93,7 @@ FileShareProtocolSettings FileShareProtocolSettingsWidget::settings() const
// ----------FileShareProtocolSettingsPage // ----------FileShareProtocolSettingsPage
FileShareProtocolSettingsPage::FileShareProtocolSettingsPage(const QSharedPointer<FileShareProtocolSettings> &s, FileShareProtocolSettingsPage::FileShareProtocolSettingsPage(const QSharedPointer<FileShareProtocolSettings> &s,
QObject *parent) : QObject *parent) :
Core::IOptionsPage(parent), m_settings(s), m_widget(0) Core::IOptionsPage(parent), m_settings(s), m_widget(nullptr)
{ {
setId("X.CodePaster.FileSharePaster"); setId("X.CodePaster.FileSharePaster");
setDisplayName(tr("Fileshare")); setDisplayName(tr("Fileshare"));

View File

@@ -259,7 +259,7 @@ void StickyNotesPasteProtocol::listFinished()
emit listDone(name(), parseList(m_listReply)); emit listDone(name(), parseList(m_listReply));
} }
m_listReply->deleteLater(); m_listReply->deleteLater();
m_listReply = 0; m_listReply = nullptr;
} }
QString KdePasteProtocol::protocolName() QString KdePasteProtocol::protocolName()

View File

@@ -243,7 +243,7 @@ void PasteBinDotCaProtocol::listFinished()
else else
emit listDone(name(), parseLists(m_listReply)); emit listDone(name(), parseLists(m_listReply));
m_listReply->deleteLater(); m_listReply->deleteLater();
m_listReply = 0; m_listReply = nullptr;
} }
} // namespace CodePaster } // namespace CodePaster

View File

@@ -176,7 +176,7 @@ void PasteBinDotComProtocol::fetchFinished()
} }
} }
m_fetchReply->deleteLater(); m_fetchReply->deleteLater();
m_fetchReply = 0; m_fetchReply = nullptr;
emit fetchDone(title, content, error); emit fetchDone(title, content, error);
} }
@@ -410,7 +410,7 @@ void PasteBinDotComProtocol::listFinished()
qDebug() << list; qDebug() << list;
} }
m_listReply->deleteLater(); m_listReply->deleteLater();
m_listReply = 0; m_listReply = nullptr;
} }
} // namespace CodePaster } // namespace CodePaster

View File

@@ -161,7 +161,7 @@ bool Protocol::showConfigurationError(const Protocol *p,
parent = Core::ICore::mainWindow(); parent = Core::ICore::mainWindow();
const QString title = tr("%1 - Configuration Error").arg(p->name()); const QString title = tr("%1 - Configuration Error").arg(p->name());
QMessageBox mb(QMessageBox::Warning, title, message, QMessageBox::Cancel, parent); QMessageBox mb(QMessageBox::Warning, title, message, QMessageBox::Cancel, parent);
QPushButton *settingsButton = 0; QPushButton *settingsButton = nullptr;
if (showConfig) if (showConfig)
settingsButton = mb.addButton(Core::ICore::msgShowOptionsDialog(), QMessageBox::AcceptRole); settingsButton = mb.addButton(Core::ICore::msgShowOptionsDialog(), QMessageBox::AcceptRole);
mb.exec(); mb.exec();

View File

@@ -63,7 +63,7 @@ Settings SettingsWidget::settings()
} }
SettingsPage::SettingsPage(const QSharedPointer<Settings> &settings) : SettingsPage::SettingsPage(const QSharedPointer<Settings> &settings) :
m_settings(settings), m_widget(0) m_settings(settings), m_widget(nullptr)
{ {
setId("A.CodePaster.General"); setId("A.CodePaster.General");
setDisplayName(tr("General")); setDisplayName(tr("General"));

View File

@@ -59,7 +59,7 @@ void UrlOpenProtocol::fetchFinished()
else else
content = QString::fromUtf8(m_fetchReply->readAll()); content = QString::fromUtf8(m_fetchReply->readAll());
m_fetchReply->deleteLater(); m_fetchReply->deleteLater();
m_fetchReply = 0; m_fetchReply = nullptr;
emit fetchDone(title, content, error); emit fetchDone(title, content, error);
} }