Modernize-use-nullptr refactors code

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5008 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2017-08-05 02:06:59 +00:00
parent 876d05a338
commit 9f9b127c04
187 changed files with 438 additions and 438 deletions

View File

@@ -134,7 +134,7 @@ namespace qdesigner_internal {
// Richtext simplification filter: Remove hard-coded font settings,
// <style> elements, <p> attributes other than 'align' and
// and unnecessary meta-information.
QString simplifyRichTextFilter(const QString &in, bool *isPlainTextPtr = 0)
QString simplifyRichTextFilter(const QString &in, bool *isPlainTextPtr = nullptr)
{
unsigned elementCount = 0;
bool paragraphAlignmentFound = false;
@@ -180,10 +180,10 @@ class RichTextEditor : public QTextEdit
{
Q_OBJECT
public:
RichTextEditor(QWidget *parent = 0);
RichTextEditor(QWidget *parent = nullptr);
void setDefaultFont(QFont font);
QToolBar *createToolBar(QWidget *parent = 0);
QToolBar *createToolBar(QWidget *parent = nullptr);
bool simplifyRichText() const { return m_simplifyRichText; }
public slots:
@@ -206,7 +206,7 @@ class AddLinkDialog : public QDialog
Q_OBJECT
public:
AddLinkDialog(RichTextEditor *editor, QWidget *parent = 0);
AddLinkDialog(RichTextEditor *editor, QWidget *parent = nullptr);
~AddLinkDialog();
int showDialog();
@@ -275,7 +275,7 @@ class HtmlTextEdit : public QTextEdit
Q_OBJECT
public:
HtmlTextEdit(QWidget *parent = 0)
HtmlTextEdit(QWidget *parent = nullptr)
: QTextEdit(parent)
{}
@@ -367,7 +367,7 @@ void ColorAction::setColor(const QColor &color)
void ColorAction::chooseColor()
{
const QColor col = QColorDialog::getColor(m_color, 0);
const QColor col = QColorDialog::getColor(m_color, nullptr);
if (col.isValid() && col != m_color) {
setColor(col);
emit colorChanged(m_color);
@@ -379,7 +379,7 @@ class RichTextEditorToolBar : public QToolBar
Q_OBJECT
public:
RichTextEditorToolBar(RichTextEditor *editor,
QWidget *parent = 0);
QWidget *parent = nullptr);
public slots:
void updateActions();
@@ -415,7 +415,7 @@ private:
static QAction *createCheckableAction(const QIcon &icon, const QString &text,
QObject *receiver, const char *slot,
QObject *parent = 0)
QObject *parent = nullptr)
{
QAction *result = new QAction(parent);
result->setIcon(icon);
@@ -477,22 +477,22 @@ RichTextEditorToolBar::RichTextEditorToolBar(RichTextEditor *editor,
m_align_left_action = createCheckableAction(
QIcon(),
tr("Left Align"), editor, 0, alignment_group);
tr("Left Align"), editor, nullptr, alignment_group);
addAction(m_align_left_action);
m_align_center_action = createCheckableAction(
QIcon(),
tr("Center"), editor, 0, alignment_group);
tr("Center"), editor, nullptr, alignment_group);
addAction(m_align_center_action);
m_align_right_action = createCheckableAction(
QIcon(),
tr("Right Align"), editor, 0, alignment_group);
tr("Right Align"), editor, nullptr, alignment_group);
addAction(m_align_right_action);
m_align_justify_action = createCheckableAction(
QIcon(),
tr("Justify"), editor, 0, alignment_group);
tr("Justify"), editor, nullptr, alignment_group);
addAction(m_align_justify_action);
m_align_justify_action -> setVisible( false );
@@ -629,7 +629,7 @@ void RichTextEditorToolBar::insertImage()
void RichTextEditorToolBar::updateActions()
{
if (m_editor == 0) {
if (m_editor == nullptr) {
setEnabled(false);
return;
}