[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kregexpeditor] src: Use nullptr
From: Montel Laurent <null () kde ! org>
Date: 2017-05-28 19:27:08
Message-ID: E1dF3qG-0003Lh-Gj () code ! kde ! org
[Download RAW message or body]
Git commit a309d8cd10ec1173ec3b1fe22927a4b2edb8bcdc by Montel Laurent.
Committed on 28/05/2017 at 19:27.
Pushed by mlaurent into branch 'master'.
Use nullptr
M +2 -2 src/KMultiFormListBox/kmultiformlistboxentry.h
M +1 -1 src/altnwidget.cpp
M +1 -1 src/characterswidget.cpp
M +2 -2 src/characterswidget.h
M +1 -1 src/dragaccepter.cpp
M +2 -2 src/multicontainerwidget.cpp
M +1 -1 src/regexp.cpp
M +1 -1 src/regexpwidget.cpp
M +1 -1 src/regexpwidget.h
M +1 -1 src/singlecontainerwidget.cpp
M +1 -1 src/verifybuttons.cpp
M +6 -6 src/widgetfactory.cpp
https://commits.kde.org/kregexpeditor/a309d8cd10ec1173ec3b1fe22927a4b2edb8bcdc
diff --git a/src/KMultiFormListBox/kmultiformlistboxentry.h \
b/src/KMultiFormListBox/kmultiformlistboxentry.h index f748f9b..f5c28f9 100644
--- a/src/KMultiFormListBox/kmultiformlistboxentry.h
+++ b/src/KMultiFormListBox/kmultiformlistboxentry.h
@@ -57,12 +57,12 @@ public:
virtual QPushButton *indexButton()
{
- return 0;
+ return nullptr;
}
virtual QWidget *valueWidget()
{
- return 0;
+ return nullptr;
}
virtual void indexWindowPos(QPoint *start, int *width); // both variables are \
return values.
diff --git a/src/altnwidget.cpp b/src/altnwidget.cpp
index ba48d8a..ecfff6c 100644
--- a/src/altnwidget.cpp
+++ b/src/altnwidget.cpp
@@ -201,7 +201,7 @@ RegExp *AltnWidget::selection() const
}
}
qFatal("Selection not found");
- return 0; // compiler shut up.
+ return nullptr; // compiler shut up.
}
bool AltnWidget::validateSelection() const
diff --git a/src/characterswidget.cpp b/src/characterswidget.cpp
index 38e9d41..c68da15 100644
--- a/src/characterswidget.cpp
+++ b/src/characterswidget.cpp
@@ -167,7 +167,7 @@ RegExpWidget *CharactersWidget::findWidgetToEdit(QPoint \
globalPos) if (QRect(mapToGlobal(QPoint(0, 0)), size()).contains(globalPos)) {
return this;
} else {
- return 0;
+ return nullptr;
}
}
diff --git a/src/characterswidget.h b/src/characterswidget.h
index 464c87f..56441b5 100644
--- a/src/characterswidget.h
+++ b/src/characterswidget.h
@@ -107,7 +107,7 @@ public:
QWidget *separator(QWidget *) override
{
- return 0;
+ return nullptr;
}
};
@@ -124,7 +124,7 @@ public:
QWidget *separator(QWidget *) override
{
- return 0;
+ return nullptr;
}
};
diff --git a/src/dragaccepter.cpp b/src/dragaccepter.cpp
index 4a22995..241c467 100644
--- a/src/dragaccepter.cpp
+++ b/src/dragaccepter.cpp
@@ -146,5 +146,5 @@ void DragAccepter::dropEvent(QDropEvent *event)
RegExp *DragAccepter::regExp() const
{
- return 0;
+ return nullptr;
}
diff --git a/src/multicontainerwidget.cpp b/src/multicontainerwidget.cpp
index 9e4ca79..9659a82 100644
--- a/src/multicontainerwidget.cpp
+++ b/src/multicontainerwidget.cpp
@@ -225,7 +225,7 @@ RegExpWidget *MultiContainerWidget::widgetUnderPoint(QPoint \
globalPos, bool just }
if (justVisibleWidgets) {
- return 0;
+ return nullptr;
} else {
return RegExpWidget::widgetUnderPoint(globalPos, justVisibleWidgets);
}
@@ -239,7 +239,7 @@ RegExpWidget *MultiContainerWidget::findWidgetToEdit(QPoint \
globalPos) return wid;
}
}
- return 0;
+ return nullptr;
}
void MultiContainerWidget::selectWidget(bool sel)
diff --git a/src/regexp.cpp b/src/regexp.cpp
index 8a44e74..b53043a 100644
--- a/src/regexp.cpp
+++ b/src/regexp.cpp
@@ -67,7 +67,7 @@ RegExp *RegExp::readRegExp(QDomElement top, const QString &version)
RegExp *regexp = WidgetFactory::createRegExp(node.toElement(), version);
return regexp;
}
- return 0;
+ return nullptr;
}
QString RegExp::toXmlString() const
diff --git a/src/regexpwidget.cpp b/src/regexpwidget.cpp
index 1152bb1..f63c934 100644
--- a/src/regexpwidget.cpp
+++ b/src/regexpwidget.cpp
@@ -207,7 +207,7 @@ RegExpWidget *RegExpWidget::widgetUnderPoint(QPoint globalPos, \
bool) if (QRect(mapToGlobal(QPoint(0, 0)), size()).contains(globalPos)) {
return this;
} else {
- return 0;
+ return nullptr;
}
}
diff --git a/src/regexpwidget.h b/src/regexpwidget.h
index 1764817..eb45edc 100644
--- a/src/regexpwidget.h
+++ b/src/regexpwidget.h
@@ -169,7 +169,7 @@ public:
*/
virtual RegExpWidget *findWidgetToEdit(QPoint /* globalPos */)
{
- return 0;
+ return nullptr;
}
/**
diff --git a/src/singlecontainerwidget.cpp b/src/singlecontainerwidget.cpp
index 599409e..2afbe48 100644
--- a/src/singlecontainerwidget.cpp
+++ b/src/singlecontainerwidget.cpp
@@ -101,7 +101,7 @@ RegExpWidget *SingleContainerWidget::findWidgetToEdit(QPoint \
globalPos)
} else if (QRect(mapToGlobal(QPoint(0, 0)), size()).contains(globalPos)) {
return this;
} else {
- return 0;
+ return nullptr;
}
}
diff --git a/src/verifybuttons.cpp b/src/verifybuttons.cpp
index f1b0dfd..1d2b3ae 100644
--- a/src/verifybuttons.cpp
+++ b/src/verifybuttons.cpp
@@ -200,7 +200,7 @@ RegExpConverter *VerifyButtons::setSyntax(const QString &which)
}
}
qWarning("No such converter: '%s'", qPrintable(noAmpersand));
- return 0;
+ return nullptr;
}
void VerifyButtons::setAllowNonQtSyntax(bool b)
diff --git a/src/widgetfactory.cpp b/src/widgetfactory.cpp
index 07f5e33..8c298f1 100644
--- a/src/widgetfactory.cpp
+++ b/src/widgetfactory.cpp
@@ -87,12 +87,12 @@ RegExpWidget *WidgetFactory::createWidget(RegExpEditorWindow \
*win, QWidget *pare break;
default:
qFatal("It should not be possible to get here!");
- return 0;
+ return nullptr;
}
if (widget->edit() == QDialog::Rejected) {
delete widget;
- return 0;
+ return nullptr;
}
return widget;
}
@@ -135,7 +135,7 @@ RegExpWidget *WidgetFactory::createWidget(RegExp *regexp, \
RegExpEditorWindow *ed } else {
qFatal("%s:%d Internal Error: Unknown RegExp type", __FILE__, __LINE__);
}
- return 0;
+ return nullptr;
}
RegExp *WidgetFactory::createRegExp(QDomElement node, const QString &version)
@@ -172,7 +172,7 @@ RegExp *WidgetFactory::createRegExp(QDomElement node, const \
QString &version)
KMessageBox::sorry(0, i18n("<p>Unknown tag while reading XML. Tag was \
<b>%1</b></p>", tag), i18n("Error While Loading From XML File"));
- return 0;
+ return nullptr;
}
bool ok = regexp->load(node, version);
@@ -180,9 +180,9 @@ RegExp *WidgetFactory::createRegExp(QDomElement node, const \
QString &version) return regexp;
} else {
delete regexp;
- return 0;
+ return nullptr;
}
- return 0;
+ return nullptr;
}
RegExp *WidgetFactory::createRegExp(const QString &str)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic