Commit 0f73f019 authored by Laurent Montel's avatar Laurent Montel 😁

Use nullptr

parent 4b4e6268
...@@ -36,7 +36,7 @@ class KWalletConfig : public KCModule ...@@ -36,7 +36,7 @@ class KWalletConfig : public KCModule
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit KWalletConfig(QWidget *parent = 0L, const QVariantList & = QVariantList()); explicit KWalletConfig(QWidget *parent = nullptr, const QVariantList & = QVariantList());
virtual ~KWalletConfig(); virtual ~KWalletConfig();
void load() Q_DECL_OVERRIDE; void load() Q_DECL_OVERRIDE;
......
...@@ -231,7 +231,7 @@ static bool decodeEntry(KWallet::Wallet *_wallet, QDataStream &ds) ...@@ -231,7 +231,7 @@ static bool decodeEntry(KWallet::Wallet *_wallet, QDataStream &ds)
KWallet::Wallet::EntryType et; KWallet::Wallet::EntryType et;
ds >> name; ds >> name;
if (_wallet->hasEntry(name)) { if (_wallet->hasEntry(name)) {
int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?", name)); int rc = KMessageBox::warningContinueCancel(nullptr, i18n("An entry by the name '%1' already exists. Would you like to continue?", name));
if (rc == KMessageBox::Cancel) { if (rc == KMessageBox::Cancel) {
return false; return false;
} }
...@@ -255,7 +255,7 @@ static bool decodeFolder(KWallet::Wallet *_wallet, QDataStream &ds) ...@@ -255,7 +255,7 @@ static bool decodeFolder(KWallet::Wallet *_wallet, QDataStream &ds)
QString folder; QString folder;
ds >> folder; ds >> folder;
if (_wallet->hasFolder(folder)) { if (_wallet->hasFolder(folder)) {
int rc = KMessageBox::warningYesNoCancel(0L, i18n("A folder by the name '%1' already exists. What would you like to do?", folder), QString(), KStandardGuiItem::cont(), KGuiItem(i18n("Replace"))); int rc = KMessageBox::warningYesNoCancel(nullptr, i18n("A folder by the name '%1' already exists. What would you like to do?", folder), QString(), KStandardGuiItem::cont(), KGuiItem(i18n("Replace")));
if (rc == KMessageBox::Cancel) { if (rc == KMessageBox::Cancel) {
return false; return false;
} }
...@@ -384,8 +384,8 @@ void KWalletEntryList::itemDropped(QDropEvent *e, QTreeWidgetItem *item) ...@@ -384,8 +384,8 @@ void KWalletEntryList::itemDropped(QDropEvent *e, QTreeWidgetItem *item)
bool isEntry; bool isEntry;
QByteArray data; QByteArray data;
KWalletEntryList *el = 0L; KWalletEntryList *el = nullptr;
QTreeWidgetItem *sel = 0L; QTreeWidgetItem *sel = nullptr;
// We fetch this here because we run an event loop further down which might invalidate this // We fetch this here because we run an event loop further down which might invalidate this
Qt::DropAction proposedAction = e->proposedAction(); Qt::DropAction proposedAction = e->proposedAction();
...@@ -528,15 +528,15 @@ bool KWalletEntryList::existsFolder(const QString &name) ...@@ -528,15 +528,15 @@ bool KWalletEntryList::existsFolder(const QString &name)
QMimeData *KWalletEntryList::itemMimeData(const QTreeWidgetItem *i) const QMimeData *KWalletEntryList::itemMimeData(const QTreeWidgetItem *i) const
{ {
QMimeData *sd = 0L; QMimeData *sd = nullptr;
if (i->type() == KWalletEntryItemClass) { if (i->type() == KWalletEntryItemClass) {
const KWalletEntryItem *ei = dynamic_cast<const KWalletEntryItem *>(i); const KWalletEntryItem *ei = dynamic_cast<const KWalletEntryItem *>(i);
if (!ei) { if (!ei) {
return 0L; return nullptr;
} }
KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem *>(ei->parent()); KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem *>(ei->parent());
if (!ci) { if (!ci) {
return 0L; return nullptr;
} }
sd = new QMimeData(); sd = new QMimeData();
QByteArray a; QByteArray a;
...@@ -553,7 +553,7 @@ QMimeData *KWalletEntryList::itemMimeData(const QTreeWidgetItem *i) const ...@@ -553,7 +553,7 @@ QMimeData *KWalletEntryList::itemMimeData(const QTreeWidgetItem *i) const
} else if (i->type() == KWalletFolderItemClass) { } else if (i->type() == KWalletFolderItemClass) {
const KWalletFolderItem *fi = dynamic_cast<const KWalletFolderItem *>(i); const KWalletFolderItem *fi = dynamic_cast<const KWalletFolderItem *>(i);
if (!fi) { if (!fi) {
return 0L; return nullptr;
} }
sd = new QMimeData(); sd = new QMimeData();
QByteArray a; QByteArray a;
......
...@@ -108,7 +108,7 @@ class KWalletEntryList : public QTreeWidget ...@@ -108,7 +108,7 @@ class KWalletEntryList : public QTreeWidget
Q_OBJECT Q_OBJECT
public: public:
explicit KWalletEntryList(QWidget *parent, const char *name = 0L); explicit KWalletEntryList(QWidget *parent, const char *name = nullptr);
virtual ~KWalletEntryList(); virtual ~KWalletEntryList();
bool existsFolder(const QString &name); bool existsFolder(const QString &name);
......
...@@ -491,8 +491,8 @@ void KWalletEditor::entrySelectionChanged(QTreeWidgetItem *item) ...@@ -491,8 +491,8 @@ void KWalletEditor::entrySelectionChanged(QTreeWidgetItem *item)
} }
} }
KWalletContainerItem *ci = 0L; KWalletContainerItem *ci = nullptr;
KWalletFolderItem *fi = 0L; KWalletFolderItem *fi = nullptr;
// clear the context menu // clear the context menu
_contextMenu->clear(); _contextMenu->clear();
...@@ -653,7 +653,7 @@ void KWalletEditor::updateEntries(const QString &folder) ...@@ -653,7 +653,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = pi->child(i); QTreeWidgetItem *twi = pi->child(i);
if (!entries.contains(twi->text(0))) { if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) { if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L); entrySelectionChanged(nullptr);
} }
trash.push(twi); trash.push(twi);
} }
...@@ -663,7 +663,7 @@ void KWalletEditor::updateEntries(const QString &folder) ...@@ -663,7 +663,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = mi->child(i); QTreeWidgetItem *twi = mi->child(i);
if (!entries.contains(twi->text(0))) { if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) { if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L); entrySelectionChanged(nullptr);
} }
trash.push(twi); trash.push(twi);
} }
...@@ -673,7 +673,7 @@ void KWalletEditor::updateEntries(const QString &folder) ...@@ -673,7 +673,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = bi->child(i); QTreeWidgetItem *twi = bi->child(i);
if (!entries.contains(twi->text(0))) { if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) { if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L); entrySelectionChanged(nullptr);
} }
trash.push(twi); trash.push(twi);
} }
...@@ -683,7 +683,7 @@ void KWalletEditor::updateEntries(const QString &folder) ...@@ -683,7 +683,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = ui->child(i); QTreeWidgetItem *twi = ui->child(i);
if (!entries.contains(twi->text(0))) { if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) { if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L); entrySelectionChanged(nullptr);
} }
trash.push(twi); trash.push(twi);
} }
......
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
void setWallet(KWallet::Wallet *wallet, bool isPath = false); void setWallet(KWallet::Wallet *wallet, bool isPath = false);
bool isOpen() const bool isOpen() const
{ {
return _w != 0L; return _w != nullptr;
} }
bool hasUnsavedChanges() const; bool hasUnsavedChanges() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment