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

Use nullptr

parent 4b4e6268
......@@ -36,7 +36,7 @@ class KWalletConfig : public KCModule
{
Q_OBJECT
public:
explicit KWalletConfig(QWidget *parent = 0L, const QVariantList & = QVariantList());
explicit KWalletConfig(QWidget *parent = nullptr, const QVariantList & = QVariantList());
virtual ~KWalletConfig();
void load() Q_DECL_OVERRIDE;
......
......@@ -231,7 +231,7 @@ static bool decodeEntry(KWallet::Wallet *_wallet, QDataStream &ds)
KWallet::Wallet::EntryType et;
ds >> 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) {
return false;
}
......@@ -255,7 +255,7 @@ static bool decodeFolder(KWallet::Wallet *_wallet, QDataStream &ds)
QString folder;
ds >> 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) {
return false;
}
......@@ -384,8 +384,8 @@ void KWalletEntryList::itemDropped(QDropEvent *e, QTreeWidgetItem *item)
bool isEntry;
QByteArray data;
KWalletEntryList *el = 0L;
QTreeWidgetItem *sel = 0L;
KWalletEntryList *el = nullptr;
QTreeWidgetItem *sel = nullptr;
// We fetch this here because we run an event loop further down which might invalidate this
Qt::DropAction proposedAction = e->proposedAction();
......@@ -528,15 +528,15 @@ bool KWalletEntryList::existsFolder(const QString &name)
QMimeData *KWalletEntryList::itemMimeData(const QTreeWidgetItem *i) const
{
QMimeData *sd = 0L;
QMimeData *sd = nullptr;
if (i->type() == KWalletEntryItemClass) {
const KWalletEntryItem *ei = dynamic_cast<const KWalletEntryItem *>(i);
if (!ei) {
return 0L;
return nullptr;
}
KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem *>(ei->parent());
if (!ci) {
return 0L;
return nullptr;
}
sd = new QMimeData();
QByteArray a;
......@@ -553,7 +553,7 @@ QMimeData *KWalletEntryList::itemMimeData(const QTreeWidgetItem *i) const
} else if (i->type() == KWalletFolderItemClass) {
const KWalletFolderItem *fi = dynamic_cast<const KWalletFolderItem *>(i);
if (!fi) {
return 0L;
return nullptr;
}
sd = new QMimeData();
QByteArray a;
......
......@@ -108,7 +108,7 @@ class KWalletEntryList : public QTreeWidget
Q_OBJECT
public:
explicit KWalletEntryList(QWidget *parent, const char *name = 0L);
explicit KWalletEntryList(QWidget *parent, const char *name = nullptr);
virtual ~KWalletEntryList();
bool existsFolder(const QString &name);
......
......@@ -491,8 +491,8 @@ void KWalletEditor::entrySelectionChanged(QTreeWidgetItem *item)
}
}
KWalletContainerItem *ci = 0L;
KWalletFolderItem *fi = 0L;
KWalletContainerItem *ci = nullptr;
KWalletFolderItem *fi = nullptr;
// clear the context menu
_contextMenu->clear();
......@@ -653,7 +653,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = pi->child(i);
if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L);
entrySelectionChanged(nullptr);
}
trash.push(twi);
}
......@@ -663,7 +663,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = mi->child(i);
if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L);
entrySelectionChanged(nullptr);
}
trash.push(twi);
}
......@@ -673,7 +673,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = bi->child(i);
if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L);
entrySelectionChanged(nullptr);
}
trash.push(twi);
}
......@@ -683,7 +683,7 @@ void KWalletEditor::updateEntries(const QString &folder)
QTreeWidgetItem *twi = ui->child(i);
if (!entries.contains(twi->text(0))) {
if (twi == _entryList->currentItem()) {
entrySelectionChanged(0L);
entrySelectionChanged(nullptr);
}
trash.push(twi);
}
......
......@@ -47,7 +47,7 @@ public:
void setWallet(KWallet::Wallet *wallet, bool isPath = false);
bool isOpen() const
{
return _w != 0L;
return _w != nullptr;
}
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