Doc snippets: Use nullptr instead of 0 literal

Also mark constructors explicit, where applicable.

Pick-to: 5.15
Fixes: QTBUG-84859
Change-Id: I145d366d854fd6b4373bcc23d0b880d6361d9014
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Paul Wicking 2020-06-10 07:22:27 +02:00
parent c208b648f9
commit f3c402a6df
11 changed files with 11 additions and 11 deletions

View File

@ -65,7 +65,7 @@ class ClipWindow : public QMainWindow
Q_OBJECT
public:
ClipWindow(QWidget *parent = 0);
explicit ClipWindow(QWidget *parent = nullptr);
public slots:
void updateClipboard();

View File

@ -53,7 +53,7 @@
{
Q_OBJECT
public:
MyGLWindow(QScreen *screen = 0);
explicit MyGLWindow(QScreen *screen = nullptr);
protected:
void initializeGL();

View File

@ -66,7 +66,7 @@ class DragWidget : public QFrame
Q_OBJECT
public:
DragWidget(QWidget *parent);
explicit DragWidget(QWidget *parent = nullptr);
void setData(const QString &mimetype, const QByteArray &newData);
signals:

View File

@ -67,7 +67,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
explicit MainWindow(QWidget *parent = nullptr);
public slots:
void setDragResult(const QString &actionText);

View File

@ -65,7 +65,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
explicit MainWindow(QWidget *parent = nullptr);
protected:
void mousePressEvent(QMouseEvent *event) override;

View File

@ -64,7 +64,7 @@ class Window : public QWidget
Q_OBJECT
public:
Window(QWidget *parent = 0);
explicit Window(QWidget *parent = nullptr);
protected:
void dragEnterEvent(QDragEnterEvent *event) override;

View File

@ -64,7 +64,7 @@ class Window : public QWidget
Q_OBJECT
public:
Window(QWidget *parent = 0);
explicit Window(QWidget *parent = nullptr);
protected:
void dragMoveEvent(QDragMoveEvent *event) override;

View File

@ -58,7 +58,7 @@ class Window : public QWidget
Q_OBJECT
public:
Window(QWidget *parent = 0);
explicit Window(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;

View File

@ -54,7 +54,7 @@
class MainWindow : public QMainWindow
{
public:
MainWindow(QWidget *parent = 0);
explicit MainWindow(QWidget *parent = nullptr);
};
//! [0] //! [1]

View File

@ -68,7 +68,7 @@ void mergeFormat(QTextEdit *edit)
int main(int argc, char *argv[])
{
QWidget *parent = 0;
QWidget *parent = nullptr;
QString aStringContainingHTMLtext("<h1>Scribe Overview</h1>");
QApplication app(argc, argv);

View File

@ -58,7 +58,7 @@ class TextEdit : public QTextEdit
Q_OBJECT
public:
TextEdit(QWidget *parent=0);
explicit TextEdit(QWidget *parent = nullptr);
bool canInsertFromMimeData( const QMimeData *source ) const override;
void insertFromMimeData( const QMimeData *source ) override;
};