Use nullptr

parent b2178a2b
......@@ -382,7 +382,7 @@ KonqAboutPage::~KonqAboutPage()
bool KonqAboutPage::openUrl(const QUrl &u)
{
emit started(0);
emit started(nullptr);
if (u.url() == QLatin1String("about:plugins")) {
serve(s_staticData->plugins(), QStringLiteral("plugins"));
} else if (u.url() == QLatin1String("about:konqueror/intro")) {
......
......@@ -44,7 +44,7 @@ void HistoryManagerTest::initTestCase()
void HistoryManagerTest::testGetSetMaxCount()
{
KonqHistoryManager mgr(0);
KonqHistoryManager mgr(nullptr);
const int oldMaxCount = mgr.maxCount();
qDebug("oldMaxCount=%d", oldMaxCount);
mgr.emitSetMaxCount(4242);
......@@ -60,7 +60,7 @@ void HistoryManagerTest::testGetSetMaxCount()
void HistoryManagerTest::testGetSetMaxAge()
{
KonqHistoryManager mgr(0);
KonqHistoryManager mgr(nullptr);
const int oldMaxAge = mgr.maxAge();
qDebug("oldMaxAge=%d", oldMaxAge);
mgr.emitSetMaxAge(4242);
......@@ -87,7 +87,7 @@ static void waitForRemovedSignal(KonqHistoryManager *mgr)
void HistoryManagerTest::testAddHistoryEntry()
{
KonqHistoryManager mgr(0);
KonqHistoryManager mgr(nullptr);
qRegisterMetaType<KonqHistoryEntry>("KonqHistoryEntry");
QSignalSpy addedSpy(&mgr, SIGNAL(entryAdded(KonqHistoryEntry)));
QSignalSpy removedSpy(&mgr, SIGNAL(entryRemoved(KonqHistoryEntry)));
......
......@@ -80,7 +80,7 @@ private Q_SLOTS:
{
KonqMainWindow mainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
KonqView *view = mainWindow.currentView();
QVERIFY(view);
QVERIFY(view->part());
......@@ -95,7 +95,7 @@ private Q_SLOTS:
{
KonqMainWindow mainWindow;
const QUrl url = QUrl::fromLocalFile(QDir::homePath());
mainWindow.openUrl(0, url, QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, url, QStringLiteral("text/html"));
KonqView *view = mainWindow.currentView();
qDebug() << "Waiting for first completed signal";
QSignalSpy spyCompleted(view, SIGNAL(viewCompleted(KonqView*)));
......@@ -115,7 +115,7 @@ private Q_SLOTS:
{
QPointer<KonqMainWindow> mainWindow = new KonqMainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
mainWindow->openUrl(0, QUrl(
mainWindow->openUrl(nullptr, QUrl(
"data:text/html, <script type=\"text/javascript\">"
"function closeMe() { window.close(); } "
"document.onmousedown = closeMe; "
......@@ -194,7 +194,7 @@ private Q_SLOTS:
// would lead to double deletion (#228255)
QPointer<KonqMainWindow> mainWindow = new KonqMainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
mainWindow->openUrl(0, QUrl(QStringLiteral("data:text/html, <script>window.foo=bar</script><p>Hello World</p>")), QStringLiteral("text/html"));
mainWindow->openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <script>window.foo=bar</script><p>Hello World</p>")), QStringLiteral("text/html"));
KonqView *view = mainWindow->currentView();
QVERIFY(view);
QVERIFY(view->part());
......
......@@ -422,7 +422,7 @@ static void openHtmlWithLink(KonqMainWindow &mainWindow)
{
// Much like KonqHtmlTest::loadSimpleHtml.
// We use text/plain as the linked file, in order to test #67956 (switching parts in new tab)
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <a href=\"data:text/plain, Link target\" id=\"linkid\">Click me</a>")), QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <a href=\"data:text/plain, Link target\" id=\"linkid\">Click me</a>")), QStringLiteral("text/html"));
KonqView *view = mainWindow.currentView();
QVERIFY(view);
QSignalSpy spyCompleted(view, SIGNAL(viewCompleted(KonqView*)));
......@@ -543,7 +543,7 @@ void ViewMgrTest::testCtrlClickOnLink()
qDebug() << "CLICKING NOW";
QTest::mouseClick(partWidget(view), Qt::LeftButton, Qt::ControlModifier, QPoint(10, 10));
QTest::qWait(100);
KonqView *newView = Q_NULLPTR;
KonqView *newView = nullptr;
// Expected behavior for Ctrl+click:
// new tab, if mmbOpensTab
// new window, if !mmbOpensTab
......@@ -754,7 +754,7 @@ void ViewMgrTest::testDeletePartInTab()
delete view->part();
QVERIFY(view.isNull());
QVERIFY(partWidget.isNull());
qApp->sendPostedEvents(0, QEvent::DeferredDelete);
qApp->sendPostedEvents(nullptr, QEvent::DeferredDelete);
QVERIFY(mainWindow.isNull());
}
......@@ -762,7 +762,7 @@ void ViewMgrTest::testSaveProfile()
{
MyKonqMainWindow mainWindow;
const QUrl url(QStringLiteral("data:text/html, <p>Hello World</p>"));
mainWindow.openUrl(0, url, QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, url, QStringLiteral("text/html"));
KonqViewManager *viewManager = mainWindow.viewManager();
KonqView *view2 = viewManager->addTab(QStringLiteral("text/html"));
const QUrl url2(QStringLiteral("data:text/html, <p>view2</p>"));
......@@ -803,7 +803,7 @@ void ViewMgrTest::testSaveProfile()
void ViewMgrTest::testDuplicateWindow()
{
MyKonqMainWindow mainWindow;
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
KonqViewManager *viewManager = mainWindow.viewManager();
KonqView *viewTab2 = viewManager->addTab(QStringLiteral("text/html"));
KonqView *splitted = viewManager->splitView(viewTab2, Qt::Horizontal);
......@@ -816,7 +816,7 @@ void ViewMgrTest::testDuplicateWindow()
void ViewMgrTest::testCloseOtherTabs()
{
MyKonqMainWindow mainWindow;
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
KonqViewManager *viewManager = mainWindow.viewManager();
QTabWidget *tabWidget = mainWindow.findChild<QTabWidget *>();
QVERIFY(tabWidget);
......@@ -843,7 +843,7 @@ void ViewMgrTest::testCloseOtherTabs()
void ViewMgrTest::testCloseTabsFast() // #210551/#150162
{
MyKonqMainWindow mainWindow;
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
KonqViewManager *viewManager = mainWindow.viewManager();
viewManager->addTab(QStringLiteral("text/html"));
viewManager->addTab(QStringLiteral("text/html"));
......@@ -861,7 +861,7 @@ void ViewMgrTest::testCloseTabsFast() // #210551/#150162
void ViewMgrTest::testBrowserArgumentsNewTab()
{
MyKonqMainWindow mainWindow;
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
KParts::OpenUrlArguments urlArgs;
KParts::BrowserArguments browserArgs;
browserArgs.setNewTab(true);
......@@ -921,7 +921,7 @@ void ViewMgrTest::testBreakOffTab()
void ViewMgrTest::moveTabLeft()
{
MyKonqMainWindow mainWindow;
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"));
KonqViewManager *viewManager = mainWindow.viewManager();
KonqView *view1 = viewManager->addTab(QStringLiteral("text/html"));
view1->openUrl(QUrl(QStringLiteral("data:text/html, <p>view1</p>")), QStringLiteral("1"));
......
......@@ -38,7 +38,7 @@ private Q_SLOTS:
KonqMainWindow mainWindow;
// we specify the mimetype so that we don't have to wait for a KonqRun
KonqOpenURLRequest req; req.forceAutoEmbed = true;
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/plain, Hello World")), QStringLiteral("text/plain"), req);
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/plain, Hello World")), QStringLiteral("text/plain"), req);
KonqView *view = mainWindow.currentView();
QVERIFY(view);
QVERIFY(view->part());
......@@ -51,7 +51,7 @@ private Q_SLOTS:
// Now open HTML, as if we typed a URL in the location bar.
KonqOpenURLRequest req2; req2.typedUrl = QStringLiteral("http://www.kde.org");
mainWindow.openUrl(0, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"), req2);
mainWindow.openUrl(nullptr, QUrl(QStringLiteral("data:text/html, <p>Hello World</p>")), QStringLiteral("text/html"), req2);
qDebug() << view->service()->entryPath();
QVERIFY(view->service()->entryPath() != firstService);
}
......
......@@ -40,7 +40,7 @@ void UndoManagerTest::initTestCase()
// Make sure we start clean
QStandardPaths::setTestModeEnabled(true);
KonqSessionManager::self()->disableAutosave();
KonqUndoManager manager(0);
KonqUndoManager manager(nullptr);
QSignalSpy spyUndoAvailable(&manager, SIGNAL(undoAvailable(bool)));
QVERIFY(spyUndoAvailable.isValid());
manager.clearClosedItemsList();
......@@ -51,7 +51,7 @@ void UndoManagerTest::initTestCase()
void UndoManagerTest::testAddClosedTabItem()
{
KonqUndoManager manager(0);
KonqUndoManager manager(nullptr);
QVERIFY(!manager.undoAvailable());
KonqClosedTabItem *item = new KonqClosedTabItem(QStringLiteral("url"), QStringLiteral("title"), 0, manager.newCommandSerialNumber());
QCOMPARE(item->url(), QString("url"));
......
......@@ -128,7 +128,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
++i) {
newargv[ i + 1 ] = argv[ i ];
}
newargv[ argc + 1 ] = NULL;
newargv[ argc + 1 ] = nullptr;
#ifdef WIN32
_execvp(wrapper, newargv);
#else
......@@ -187,7 +187,7 @@ bool ClientApp::createNewWindow(const QUrl &url, bool newTab, bool tempFile, con
// TODO we don't handle tempFile here, but most likely the external browser doesn't support it,
// so we should sleep and delete it ourselves....
KRun *run = new KRun(url, 0, false /* no progress window */);
KRun *run = new KRun(url, nullptr, false /* no progress window */);
QObject::connect(run, &KRun::finished, this, &ClientApp::delayedQuit);
QObject::connect(run, &KRun::error, this, [](){ qApp->exit(1); });
return qApp->exec();
......@@ -282,7 +282,7 @@ bool ClientApp::doIt(const QCommandLineParser &parser)
void ClientApp::slotResult(KJob *job)
{
if (job->error() && m_interactive) {
KJobWidgets::setWindow(job, 0);
KJobWidgets::setWindow(job, nullptr);
job->uiDelegate()->showErrorMessage();
}
const bool ok = !job->error();
......
......@@ -97,13 +97,13 @@ void KonqPopupMenuTest::initTestCase()
m_fileItem = KFileItem(QUrl::fromLocalFile(makefile), QStringLiteral("text/x-makefile"), S_IFREG + 0660);
m_linkItem = KFileItem(QUrl::fromLocalFile(QStringLiteral("http://www.kde.org/foo")), QStringLiteral("text/html"), S_IFREG + 0660);
m_subDirItem = KFileItem(QUrl::fromLocalFile(QDir::currentPath() + "/CMakeFiles"), QStringLiteral("inode/directory"), S_IFDIR + 0755);
m_cut = KStandardAction::cut(0, 0, this);
m_cut = KStandardAction::cut(nullptr, nullptr, this);
m_actionCollection.addAction(QStringLiteral("cut"), m_cut);
m_copy = KStandardAction::copy(0, 0, this);
m_copy = KStandardAction::copy(nullptr, nullptr, this);
m_actionCollection.addAction(QStringLiteral("copy"), m_copy);
m_paste = KStandardAction::paste(0, 0, this);
m_paste = KStandardAction::paste(nullptr, nullptr, this);
m_actionCollection.addAction(QStringLiteral("paste"), m_paste);
m_pasteTo = KStandardAction::paste(0, 0, this);
m_pasteTo = KStandardAction::paste(nullptr, nullptr, this);
m_actionCollection.addAction(QStringLiteral("pasteto"), m_pasteTo);
m_properties = new QAction(this);
m_actionCollection.addAction(QStringLiteral("properties"), m_properties);
......@@ -146,7 +146,7 @@ void KonqPopupMenuTest::initTestCase()
QAction *viewDocumentSource = new QAction(m_partActions);
m_actionCollection.addAction(QStringLiteral("viewDocumentSource"), viewDocumentSource);
m_newMenu = new KNewFileMenu(&m_actionCollection, QStringLiteral("newmenu"), 0);
m_newMenu = new KNewFileMenu(&m_actionCollection, QStringLiteral("newmenu"), nullptr);
// Check if extractActionNames works
QMenu popup;
......@@ -173,7 +173,7 @@ void KonqPopupMenuTest::testFile()
actionGroups.insert(KonqPopupMenu::PreviewActions, QList<QAction *>() << m_preview1);
KonqPopupMenu popup(itemList, viewUrl, m_actionCollection, flags,
0 /*parent*/);
nullptr /*parent*/);
popup.setNewFileMenu(m_newMenu);
popup.setActionGroups(actionGroups);
......
......@@ -22,7 +22,7 @@
#include <QDataStream>
KonqHistoryEntry::KonqHistoryEntry()
: numberOfTimesVisited(1), d(0)
: numberOfTimesVisited(1), d(nullptr)
{
}
......@@ -43,7 +43,7 @@ KonqHistoryEntry &KonqHistoryEntry::operator=(const KonqHistoryEntry &other)
numberOfTimesVisited = other.numberOfTimesVisited;
firstVisited = other.firstVisited;
lastVisited = other.lastVisited;
d = 0;
d = nullptr;
return *this;
}
......
......@@ -53,7 +53,7 @@ public:
return static_cast<KonqHistoryProvider *>(KParts::HistoryProvider::self());
}
explicit KonqHistoryProvider(QObject *parent = Q_NULLPTR);
explicit KonqHistoryProvider(QObject *parent = nullptr);
virtual ~KonqHistoryProvider();
/**
......
......@@ -81,9 +81,9 @@ public:
: q(qq),
m_parentWidget(parentWidget),
m_popupFlags(KonqPopupMenu::DefaultPopupItems),
m_pMenuNew(0),
m_pMenuNew(nullptr),
m_copyToMenu(parentWidget),
m_bookmarkManager(0),
m_bookmarkManager(nullptr),
m_actions(actions)
{
}
......@@ -226,7 +226,7 @@ void KonqPopupMenuPrivate::populate()
QAction *act;
QAction *actNewWindow = 0;
QAction *actNewWindow = nullptr;
#if 0 // TODO in the desktop code itself.
if ((flags & KonqPopupMenu::ShowProperties) && isOnDesktop &&
......
......@@ -101,7 +101,7 @@ public:
const QUrl &viewURL,
KActionCollection &actions,
Flags flags,
QWidget *parentWidget = 0);
QWidget *parentWidget = nullptr);
/**
* Don't forget to destroy the object
......
......@@ -90,9 +90,9 @@ KonqFeedIcon::~KonqFeedIcon()
delete m_feedIcon;
}
// the icon is deleted in every case
m_feedIcon = 0;
m_feedIcon = nullptr;
delete m_menu;
m_menu = 0;
m_menu = nullptr;
}
bool KonqFeedIcon::feedFound()
......@@ -187,12 +187,12 @@ void KonqFeedIcon::removeFeedIcon()
if (m_feedIcon && m_statusBarEx) {
m_statusBarEx->removeStatusBarItem(m_feedIcon);
delete m_feedIcon;
m_feedIcon = 0;
m_feedIcon = nullptr;
}
// Close the popup if it's open, otherwise we crash
delete m_menu;
m_menu = 0;
m_menu = nullptr;
}
void KonqFeedIcon::addFeed()
......
......@@ -114,7 +114,7 @@ void AutoRefresh::slotRefresh()
QString title = i18nc("@title:window", "Cannot Refresh Source");
QString text = i18n("<qt>This plugin cannot auto-refresh the current part.</qt>");
KMessageBox::error(0, text, title);
KMessageBox::error(nullptr, text, title);
} else {
// Get URL
QUrl url = part->url();
......
......@@ -50,7 +50,7 @@ public:
/**
* Construct a new KParts plugin.
*/
explicit AutoRefresh(QObject *parent = Q_NULLPTR, const QVariantList &args = QVariantList());
explicit AutoRefresh(QObject *parent = nullptr, const QVariantList &args = QVariantList());
/**
* Destructor.
......
......@@ -163,7 +163,7 @@ void PluginBabelFish::slotAboutToShow()
I18N_NOOP("&French"), "nl_fr",
I18N_NOOP("&English"), "ru_en",
I18N_NOOP("&French"), "ru_fr", // only on voila
0, 0
nullptr, nullptr
};
for (int i = 0; translations[i]; i += 2) {
......
......@@ -224,8 +224,8 @@ void FilterBar::keyReleaseEvent(QKeyEvent *event)
DirFilterPlugin::DirFilterPlugin(QObject *parent, const QVariantList &)
: KParts::Plugin(parent)
, m_filterBar(0)
, m_focusWidget(0)
, m_filterBar(nullptr)
, m_focusWidget(nullptr)
{
m_part = qobject_cast<KParts::ReadOnlyPart *>(parent);
if (m_part) {
......@@ -271,7 +271,7 @@ void DirFilterPlugin::slotOpenURLCompleted()
void DirFilterPlugin::slotShowPopup()
{
QMenu *filterMenu = (m_filterBar ? m_filterBar->typeFilterMenu() : 0);
QMenu *filterMenu = (m_filterBar ? m_filterBar->typeFilterMenu() : nullptr);
if (!filterMenu) {
return;
}
......@@ -410,7 +410,7 @@ void DirFilterPlugin::slotCloseRequest()
m_filterBar->hide();
if (m_focusWidget) {
m_focusWidget->setFocus();
m_focusWidget = 0;
m_focusWidget = nullptr;
}
}
}
......@@ -498,7 +498,7 @@ void DirFilterPlugin::slotMultipleFilters()
void DirFilterPlugin::slotShowFilterBar()
{
QWidget *partWidget = (m_part ? m_part->widget() : 0);
QWidget *partWidget = (m_part ? m_part->widget() : nullptr);
if (!m_filterBar && partWidget) {
m_filterBar = new FilterBar(partWidget);
......@@ -519,8 +519,8 @@ void DirFilterPlugin::slotShowFilterBar()
// Get the widget that currently has the focus so we can properly
// restore it when the filter bar is closed.
QWidget *window = (partWidget ? partWidget->window() : 0);
m_focusWidget = (window ? window->focusWidget() : 0);
QWidget *window = (partWidget ? partWidget->window() : nullptr);
m_focusWidget = (window ? window->focusWidget() : nullptr);
if (m_filterBar) {
setFilterBar();
......
......@@ -42,7 +42,7 @@ class FilterBar : public QWidget
Q_OBJECT
public:
explicit FilterBar(QWidget *parent = Q_NULLPTR);
explicit FilterBar(QWidget *parent = nullptr);
virtual ~FilterBar();
void selectAll();
......@@ -121,7 +121,7 @@ private:
void setFilterBar();
struct MimeInfo {
MimeInfo() : action(0), useAsFilter(false) {}
MimeInfo() : action(nullptr), useAsFilter(false) {}
QAction *action;
bool useAsFilter;
......
......@@ -105,7 +105,7 @@ class ChangedNodeSet : public QMap<DOM::Node, bool>
// == ManipulationCommand ===========================================
ManipulationCommand::ManipulationCommand() : _exception(0), changedNodes(0)
ManipulationCommand::ManipulationCommand() : _exception(0), changedNodes(nullptr)
, _reapplied(false), allow_signals(true)
{
}
......
......@@ -116,11 +116,11 @@ public:
DOMTreeView::DOMTreeView(QWidget *parent, bool /*allowSaving*/)
: QWidget(parent), m_expansionDepth(5), m_maxDepth(0),
m_bPure(true), m_bShowAttributes(true), m_bHighlightHTML(true),
m_findDialog(0), focused_child(0)
m_findDialog(nullptr), focused_child(nullptr)
{
setupUi(this);
part = 0;
part = nullptr;
const QFont font(QFontDatabase::systemFont(QFontDatabase::GeneralFont));
m_listView->setFont(font);
......@@ -188,7 +188,7 @@ bool DOMTreeView::eventFilter(QObject *o, QEvent *e)
kDebug(90180) << " focusout o " << o->objectName();
if (o != this) {
focused_child = 0;
focused_child = nullptr;
}
}
......@@ -205,7 +205,7 @@ void DOMTreeView::activateNode(const DOM::Node &node)
void DOMTreeView::slotShowNode(const DOM::Node &pNode)
{
if (QTreeWidgetItem *item = m_itemdict.value(pNode.handle(), 0)) {
if (QTreeWidgetItem *item = m_itemdict.value(pNode.handle(), nullptr)) {
m_listView->setCurrentItem(item);
m_listView->scrollToItem(item);
}
......@@ -225,7 +225,7 @@ void DOMTreeView::slotShowTree(const DOM::Node &pNode)
}
while (!child.isNull()) {
showRecursive(0, child, 0);
showRecursive(nullptr, child, 0);
child = child.nextSibling();
}
......@@ -236,7 +236,7 @@ void DOMTreeView::slotShowTree(const DOM::Node &pNode)
void DOMTreeView::showRecursive(const DOM::Node &pNode, const DOM::Node &node, uint depth)
{
DOMListViewItem *cur_item;
DOMListViewItem *parent_item = m_itemdict.value(pNode.handle(), 0);
DOMListViewItem *parent_item = m_itemdict.value(pNode.handle(), nullptr);
if (depth > m_maxDepth) {
m_maxDepth = depth;
......@@ -469,7 +469,7 @@ void DOMTreeView::slotItemClicked(QTreeWidgetItem *cur_item)
void DOMTreeView::slotFindClicked()
{
if (m_findDialog == 0) {
if (m_findDialog == nullptr) {
m_findDialog = new KFindDialog(this);
m_findDialog->setSupportsWholeWordsFind(false);
m_findDialog->setHasCursor(false);
......@@ -483,7 +483,7 @@ void DOMTreeView::slotFindClicked()
void DOMTreeView::slotRefreshNode(const DOM::Node &pNode)
{
DOMListViewItem *cur = static_cast<DOMListViewItem *>(m_itemdict.value(pNode.handle(), 0));
DOMListViewItem *cur = static_cast<DOMListViewItem *>(m_itemdict.value(pNode.handle(), nullptr));
if (!cur) {
return;
}
......@@ -743,7 +743,7 @@ void DOMTreeView::decreaseExpansionDepth()
void DOMTreeView::adjustDepth()
{
// get current item in a hypersmart way
DOMListViewItem *cur_node_item = m_itemdict.value(infoNode.handle(), 0);
DOMListViewItem *cur_node_item = m_itemdict.value(infoNode.handle(), nullptr);
if (!cur_node_item) {
cur_node_item = static_cast<DOMListViewItem *>(m_listView->currentItem());
}
......@@ -994,7 +994,7 @@ void DOMTreeView::slotAddElementDlg()
try {
DOM::Node parent = addBefore() ? curNode.parentNode() : curNode;
DOM::Node after = addBefore() ? curNode : 0;
DOM::Node after = addBefore() ? curNode : nullptr;
// ### take namespace into account
DOM::Node newNode = curNode.ownerDocument().createElement(qname);
......@@ -1037,7 +1037,7 @@ void DOMTreeView::slotAddTextDlg()
try {
DOM::Node parent = addBefore() ? curNode.parentNode() : curNode;
DOM::Node after = addBefore() ? curNode : 0;
DOM::Node after = addBefore() ? curNode : nullptr;
DOM::Node newNode = curNode.ownerDocument().createTextNode(text);
......@@ -1188,7 +1188,7 @@ void DOMTreeView::initializeOptionsFromElement(const DOM::Element &element)
void DOMTreeView::initializeDOMInfoFromElement(const DOM::Element &element)
{
QTreeWidgetItem *last = 0;
QTreeWidgetItem *last = nullptr;
nodeAttributes->clear();
DOM::NamedNodeMap attrs = element.attributes();
......@@ -1228,7 +1228,7 @@ void DOMTreeView::initializeCSSInfoFromElement(const DOM::Element &element)
QStringList values;
values.append(name.string());
values.append(value.string());
items.append(new QTreeWidgetItem(static_cast<QTreeWidget *>(0), values));
items.append(new QTreeWidgetItem(static_cast<QTreeWidget *>(nullptr), values));
}
cssProperties->insertTopLevelItems(0, items);
......
......@@ -83,11 +83,11 @@ public:
using domtreeviewer::ManipulationCommand;
DOMTreeWindow::DOMTreeWindow(PluginDomtreeviewer *plugin)
: KXmlGuiWindow(0),
: KXmlGuiWindow(nullptr),
m_plugin(plugin), m_view(new DOMTreeView(this))
{
setObjectName(QStringLiteral("DOMTreeWindow"));
part_manager = 0;
part_manager = nullptr;
// set configuration object
_config = new KConfig(QStringLiteral("domtreeviewerrc"));
......@@ -99,7 +99,7 @@ DOMTreeWindow::DOMTreeWindow(PluginDomtreeviewer *plugin)
setCentralWidget(m_view);
// message window dialog
msgdlg = new MessageDialog(0);
msgdlg = new MessageDialog(nullptr);
// msgdlg->show();
// then, setup our actions
......@@ -419,7 +419,7 @@ void DOMTreeWindow::saveProperties(KConfigGroup &config)
m_commandHistory->clear();
view()->disconnectFromTornDownPart();
view()->setHtmlPart(0);
view()->setHtmlPart(nullptr);
}
void DOMTreeWindow::slotClosePart() {
......
......@@ -18,7 +18,7 @@ K_PLUGIN_FACTORY(DomtreeviewerFactory, registerPlugin<PluginDomtreeviewer>();)
PluginDomtreeviewer::PluginDomtreeviewer(QObject *parent,
const QVariantList &)
: Plugin(parent), m_dialog(0)
: Plugin(parent), m_dialog(nullptr)
{
QAction *a = actionCollection()->addAction(QStringLiteral("viewdomtree"));
......@@ -37,7 +37,7 @@ void PluginDomtreeviewer::slotShowDOMTree()
{
if (m_dialog) {
delete m_dialog;
Q_ASSERT((DOMTreeWindow *)m_dialog == (DOMTreeWindow *)0);
Q_ASSERT((DOMTreeWindow *)m_dialog == (DOMTreeWindow *)nullptr);
}
if (KHTMLPart *part = qobject_cast<KHTMLPart *>(parent())) {
m_dialog = new DOMTreeWindow(this);
......@@ -50,7 +50,7 @@ void PluginDomtreeviewer::slotShowDOMTree()
void PluginDomtreeviewer::slotDestroyed()
{
kDebug(90180);
m_dialog = 0;
m_dialog = nullptr;
}
#include <plugin_domtreeviewer.moc>
......@@ -47,7 +47,7 @@ class SignalReceiver : public QObject
Q_OBJECT
public:
explicit SignalReceiver(QObject *parent = Q_NULLPTR);
explicit SignalReceiver(QObject *parent = nullptr);
virtual ~SignalReceiver();
/** returns true if any signal has been received */
......
......@@ -73,7 +73,7 @@ FSView::FSView(Inode *base, QWidget *parent)
_progressSize = 0;
_progress = 0;
_dirsFinished = 0;
_lastDir = 0;
_lastDir = nullptr;