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:
parent
c208b648f9
commit
f3c402a6df
@ -65,7 +65,7 @@ class ClipWindow : public QMainWindow
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClipWindow(QWidget *parent = 0);
|
explicit ClipWindow(QWidget *parent = nullptr);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateClipboard();
|
void updateClipboard();
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MyGLWindow(QScreen *screen = 0);
|
explicit MyGLWindow(QScreen *screen = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initializeGL();
|
void initializeGL();
|
||||||
|
@ -66,7 +66,7 @@ class DragWidget : public QFrame
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DragWidget(QWidget *parent);
|
explicit DragWidget(QWidget *parent = nullptr);
|
||||||
void setData(const QString &mimetype, const QByteArray &newData);
|
void setData(const QString &mimetype, const QByteArray &newData);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -67,7 +67,7 @@ class MainWindow : public QMainWindow
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow(QWidget *parent = 0);
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setDragResult(const QString &actionText);
|
void setDragResult(const QString &actionText);
|
||||||
|
@ -65,7 +65,7 @@ class MainWindow : public QMainWindow
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow(QWidget *parent = 0);
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent *event) override;
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
|
@ -64,7 +64,7 @@ class Window : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Window(QWidget *parent = 0);
|
explicit Window(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
|
@ -64,7 +64,7 @@ class Window : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Window(QWidget *parent = 0);
|
explicit Window(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void dragMoveEvent(QDragMoveEvent *event) override;
|
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||||
|
@ -58,7 +58,7 @@ class Window : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Window(QWidget *parent = 0);
|
explicit Window(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MainWindow(QWidget *parent = 0);
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
//! [0] //! [1]
|
//! [0] //! [1]
|
||||||
|
@ -68,7 +68,7 @@ void mergeFormat(QTextEdit *edit)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QWidget *parent = 0;
|
QWidget *parent = nullptr;
|
||||||
QString aStringContainingHTMLtext("<h1>Scribe Overview</h1>");
|
QString aStringContainingHTMLtext("<h1>Scribe Overview</h1>");
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
@ -58,7 +58,7 @@ class TextEdit : public QTextEdit
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TextEdit(QWidget *parent=0);
|
explicit TextEdit(QWidget *parent = nullptr);
|
||||||
bool canInsertFromMimeData( const QMimeData *source ) const override;
|
bool canInsertFromMimeData( const QMimeData *source ) const override;
|
||||||
void insertFromMimeData( const QMimeData *source ) override;
|
void insertFromMimeData( const QMimeData *source ) override;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user