summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/network/fortuneclient/client.cpp4
-rw-r--r--examples/network/fortuneclient/client.h2
-rw-r--r--examples/network/fortuneserver/server.cpp4
-rw-r--r--examples/network/fortuneserver/server.h2
-rw-r--r--examples/network/http/httpwindow.cpp14
-rw-r--r--examples/network/http/httpwindow.h4
-rw-r--r--examples/opengl/qopenglwindow/background_renderer.cpp6
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.cpp2
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.h4
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.cpp2
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.h2
-rw-r--r--examples/widgets/mainwindows/mainwindow/toolbar.cpp4
-rw-r--r--examples/widgets/mainwindows/sdi/main.cpp2
-rw-r--r--examples/widgets/tools/codecs/previewform.h2
-rw-r--r--examples/widgets/tools/settingseditor/mainwindow.cpp2
-rw-r--r--examples/widgets/widgets/charactermap/mainwindow.cpp2
-rw-r--r--examples/widgets/widgets/icons/iconpreviewarea.cpp2
-rw-r--r--examples/widgets/widgets/icons/iconpreviewarea.h2
-rw-r--r--examples/widgets/widgets/icons/iconsizespinbox.h2
-rw-r--r--examples/widgets/widgets/icons/imagedelegate.h2
-rw-r--r--examples/widgets/widgets/tablet/mainwindow.cpp2
-rw-r--r--examples/widgets/widgets/tablet/tabletcanvas.cpp2
22 files changed, 35 insertions, 35 deletions
diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp
index c0043e246f..3156a9d62c 100644
--- a/examples/network/fortuneclient/client.cpp
+++ b/examples/network/fortuneclient/client.cpp
@@ -60,7 +60,7 @@ Client::Client(QWidget *parent)
, portLineEdit(new QLineEdit)
, getFortuneButton(new QPushButton(tr("Get Fortune")))
, tcpSocket(new QTcpSocket(this))
- , networkSession(Q_NULLPTR)
+ , networkSession(nullptr)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
//! [0]
@@ -127,7 +127,7 @@ Client::Client(QWidget *parent)
this, &Client::displayError);
//! [4]
- QGridLayout *mainLayout = Q_NULLPTR;
+ QGridLayout *mainLayout = nullptr;
if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
diff --git a/examples/network/fortuneclient/client.h b/examples/network/fortuneclient/client.h
index 8037e9b047..3ba15173a4 100644
--- a/examples/network/fortuneclient/client.h
+++ b/examples/network/fortuneclient/client.h
@@ -70,7 +70,7 @@ class Client : public QDialog
Q_OBJECT
public:
- explicit Client(QWidget *parent = Q_NULLPTR);
+ explicit Client(QWidget *parent = nullptr);
private slots:
void requestNewFortune();
diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp
index f027d68dd9..aac95ad820 100644
--- a/examples/network/fortuneserver/server.cpp
+++ b/examples/network/fortuneserver/server.cpp
@@ -58,7 +58,7 @@
Server::Server(QWidget *parent)
: QDialog(parent)
, statusLabel(new QLabel)
- , tcpServer(Q_NULLPTR)
+ , tcpServer(nullptr)
, networkSession(0)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@@ -109,7 +109,7 @@ Server::Server(QWidget *parent)
buttonLayout->addWidget(quitButton);
buttonLayout->addStretch(1);
- QVBoxLayout *mainLayout = Q_NULLPTR;
+ QVBoxLayout *mainLayout = nullptr;
if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
diff --git a/examples/network/fortuneserver/server.h b/examples/network/fortuneserver/server.h
index ea5ed78292..87cdea9c8c 100644
--- a/examples/network/fortuneserver/server.h
+++ b/examples/network/fortuneserver/server.h
@@ -66,7 +66,7 @@ class Server : public QDialog
Q_OBJECT
public:
- explicit Server(QWidget *parent = Q_NULLPTR);
+ explicit Server(QWidget *parent = nullptr);
private slots:
void sessionOpened();
diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp
index fddd2c809a..9640907673 100644
--- a/examples/network/http/httpwindow.cpp
+++ b/examples/network/http/httpwindow.cpp
@@ -87,8 +87,8 @@ HttpWindow::HttpWindow(QWidget *parent)
, launchCheckBox(new QCheckBox("Launch file"))
, defaultFileLineEdit(new QLineEdit(defaultFileName))
, downloadDirectoryLineEdit(new QLineEdit)
- , reply(Q_NULLPTR)
- , file(Q_NULLPTR)
+ , reply(nullptr)
+ , file(nullptr)
, httpRequestAborted(false)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@@ -204,7 +204,7 @@ QFile *HttpWindow::openFileForWrite(const QString &fileName)
tr("Unable to save the file %1: %2.")
.arg(QDir::toNativeSeparators(fileName),
file->errorString()));
- return Q_NULLPTR;
+ return nullptr;
}
return file.take();
}
@@ -224,12 +224,12 @@ void HttpWindow::httpFinished()
fi.setFile(file->fileName());
file->close();
delete file;
- file = Q_NULLPTR;
+ file = nullptr;
}
if (httpRequestAborted) {
reply->deleteLater();
- reply = Q_NULLPTR;
+ reply = nullptr;
return;
}
@@ -238,14 +238,14 @@ void HttpWindow::httpFinished()
statusLabel->setText(tr("Download failed:\n%1.").arg(reply->errorString()));
downloadButton->setEnabled(true);
reply->deleteLater();
- reply = Q_NULLPTR;
+ reply = nullptr;
return;
}
const QVariant redirectionTarget = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
reply->deleteLater();
- reply = Q_NULLPTR;
+ reply = nullptr;
if (!redirectionTarget.isNull()) {
const QUrl redirectedUrl = url.resolved(redirectionTarget.toUrl());
diff --git a/examples/network/http/httpwindow.h b/examples/network/http/httpwindow.h
index 3bb43dbf89..f942c33952 100644
--- a/examples/network/http/httpwindow.h
+++ b/examples/network/http/httpwindow.h
@@ -71,7 +71,7 @@ class ProgressDialog : public QProgressDialog {
Q_OBJECT
public:
- explicit ProgressDialog(const QUrl &url, QWidget *parent = Q_NULLPTR);
+ explicit ProgressDialog(const QUrl &url, QWidget *parent = nullptr);
public slots:
void networkReplyProgress(qint64 bytesRead, qint64 totalBytes);
@@ -82,7 +82,7 @@ class HttpWindow : public QDialog
Q_OBJECT
public:
- explicit HttpWindow(QWidget *parent = Q_NULLPTR);
+ explicit HttpWindow(QWidget *parent = nullptr);
void startRequest(const QUrl &requestedUrl);
diff --git a/examples/opengl/qopenglwindow/background_renderer.cpp b/examples/opengl/qopenglwindow/background_renderer.cpp
index d57198444e..cba4ae1f2f 100644
--- a/examples/opengl/qopenglwindow/background_renderer.cpp
+++ b/examples/opengl/qopenglwindow/background_renderer.cpp
@@ -146,7 +146,7 @@ void FragmentToy::draw(const QSize &windowSize)
m_fragment_shader.reset(new QOpenGLShader(QOpenGLShader::Fragment));
if (!m_fragment_shader->compileSourceCode(data)) {
qWarning() << "Failed to compile fragment shader:" << m_fragment_shader->log();
- m_fragment_shader.reset(Q_NULLPTR);
+ m_fragment_shader.reset(nullptr);
}
} else {
qWarning() << "Unknown error, no fragment shader";
@@ -198,14 +198,14 @@ void FragmentToy::fileChanged(const QString &path)
m_recompile_shaders = true;
if (m_program) {
m_program->removeShader(m_fragment_shader.data());
- m_fragment_shader.reset(Q_NULLPTR);
+ m_fragment_shader.reset(nullptr);
}
}
} else {
m_recompile_shaders = true;
if (m_program) {
m_program->removeShader(m_fragment_shader.data());
- m_fragment_shader.reset(Q_NULLPTR);
+ m_fragment_shader.reset(nullptr);
}
}
}
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
index c47b80275f..720f9a2085 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
@@ -468,7 +468,7 @@ static ColorSwatch *findByName(const QMainWindow *mainWindow, const QString &nam
if (name == dock->objectName())
return dock;
}
- return Q_NULLPTR;
+ return nullptr;
}
void ColorSwatch::splitInto(QAction *action)
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.h b/examples/widgets/mainwindows/mainwindow/colorswatch.h
index ec9d9e7372..7f73e46f31 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.h
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.h
@@ -62,7 +62,7 @@ class ColorSwatch : public QDockWidget
Q_OBJECT
public:
- explicit ColorSwatch(const QString &colorName, QMainWindow *parent = Q_NULLPTR, Qt::WindowFlags flags = 0);
+ explicit ColorSwatch(const QString &colorName, QMainWindow *parent = nullptr, Qt::WindowFlags flags = 0);
void setCustomSizeHint(const QSize &size);
QMenu *colorSwatchMenu() const { return menu; }
@@ -128,7 +128,7 @@ class BlueTitleBar : public QWidget
{
Q_OBJECT
public:
- explicit BlueTitleBar(QWidget *parent = Q_NULLPTR);
+ explicit BlueTitleBar(QWidget *parent = nullptr);
QSize sizeHint() const override { return minimumSizeHint(); }
QSize minimumSizeHint() const override;
diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp
index afceddfca1..b2c5ccc473 100644
--- a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp
+++ b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp
@@ -382,7 +382,7 @@ void MainWindow::switchLayoutDirection()
class CreateDockWidgetDialog : public QDialog
{
public:
- explicit CreateDockWidgetDialog(QWidget *parent = Q_NULLPTR);
+ explicit CreateDockWidgetDialog(QWidget *parent = nullptr);
QString enteredObjectName() const { return m_objectName->text(); }
Qt::DockWidgetArea location() const;
diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.h b/examples/widgets/mainwindows/mainwindow/mainwindow.h
index af4f1f5745..9b1af6df80 100644
--- a/examples/widgets/mainwindows/mainwindow/mainwindow.h
+++ b/examples/widgets/mainwindows/mainwindow/mainwindow.h
@@ -64,7 +64,7 @@ public:
typedef QMap<QString, QSize> CustomSizeHintMap;
explicit MainWindow(const CustomSizeHintMap &customSizeHints,
- QWidget *parent = Q_NULLPTR,
+ QWidget *parent = nullptr,
Qt::WindowFlags flags = 0);
public slots:
diff --git a/examples/widgets/mainwindows/mainwindow/toolbar.cpp b/examples/widgets/mainwindows/mainwindow/toolbar.cpp
index 97152a64a3..bb30b63b02 100644
--- a/examples/widgets/mainwindows/mainwindow/toolbar.cpp
+++ b/examples/widgets/mainwindows/mainwindow/toolbar.cpp
@@ -81,8 +81,8 @@ static QPixmap genIcon(const QSize &iconSize, int number, const QColor &color)
ToolBar::ToolBar(const QString &title, QWidget *parent)
: QToolBar(parent)
- , spinbox(Q_NULLPTR)
- , spinboxAction(Q_NULLPTR)
+ , spinbox(nullptr)
+ , spinboxAction(nullptr)
{
setWindowTitle(title);
setObjectName(title);
diff --git a/examples/widgets/mainwindows/sdi/main.cpp b/examples/widgets/mainwindows/sdi/main.cpp
index bed990d34d..6e29fafd6f 100644
--- a/examples/widgets/mainwindows/sdi/main.cpp
+++ b/examples/widgets/mainwindows/sdi/main.cpp
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
parser.addPositionalArgument("file", "The file(s) to open.");
parser.process(app);
- MainWindow *mainWin = Q_NULLPTR;
+ MainWindow *mainWin = nullptr;
foreach (const QString &file, parser.positionalArguments()) {
MainWindow *newWin = new MainWindow(file);
newWin->tile(mainWin);
diff --git a/examples/widgets/tools/codecs/previewform.h b/examples/widgets/tools/codecs/previewform.h
index 1846b976de..6335b6539f 100644
--- a/examples/widgets/tools/codecs/previewform.h
+++ b/examples/widgets/tools/codecs/previewform.h
@@ -69,7 +69,7 @@ class PreviewForm : public QDialog
Q_OBJECT
public:
- explicit PreviewForm(QWidget *parent = Q_NULLPTR);
+ explicit PreviewForm(QWidget *parent = nullptr);
void setCodecList(const QList<QTextCodec *> &list);
void setEncodedData(const QByteArray &data);
diff --git a/examples/widgets/tools/settingseditor/mainwindow.cpp b/examples/widgets/tools/settingseditor/mainwindow.cpp
index ab9837c513..a7a1e9b415 100644
--- a/examples/widgets/tools/settingseditor/mainwindow.cpp
+++ b/examples/widgets/tools/settingseditor/mainwindow.cpp
@@ -56,7 +56,7 @@
MainWindow::MainWindow()
: settingsTree(new SettingsTree)
- , locationDialog(Q_NULLPTR)
+ , locationDialog(nullptr)
{
setCentralWidget(settingsTree);
diff --git a/examples/widgets/widgets/charactermap/mainwindow.cpp b/examples/widgets/widgets/charactermap/mainwindow.cpp
index 5f17128a2f..d3ac55483c 100644
--- a/examples/widgets/widgets/charactermap/mainwindow.cpp
+++ b/examples/widgets/widgets/charactermap/mainwindow.cpp
@@ -244,7 +244,7 @@ void MainWindow::updateClipboard()
class FontInfoDialog : public QDialog
{
public:
- explicit FontInfoDialog(QWidget *parent = Q_NULLPTR);
+ explicit FontInfoDialog(QWidget *parent = nullptr);
private:
QString text() const;
diff --git a/examples/widgets/widgets/icons/iconpreviewarea.cpp b/examples/widgets/widgets/icons/iconpreviewarea.cpp
index 35379610c5..9cb54c47f6 100644
--- a/examples/widgets/widgets/icons/iconpreviewarea.cpp
+++ b/examples/widgets/widgets/icons/iconpreviewarea.cpp
@@ -190,7 +190,7 @@ QLabel *IconPreviewArea::createPixmapLabel()
//! [5]
void IconPreviewArea::updatePixmapLabels()
{
- QWindow *window = Q_NULLPTR;
+ QWindow *window = nullptr;
if (const QWidget *nativeParent = nativeParentWidget())
window = nativeParent->windowHandle();
for (int column = 0; column < NumModes; ++column) {
diff --git a/examples/widgets/widgets/icons/iconpreviewarea.h b/examples/widgets/widgets/icons/iconpreviewarea.h
index 3ebb9ed3ce..6ea35a5230 100644
--- a/examples/widgets/widgets/icons/iconpreviewarea.h
+++ b/examples/widgets/widgets/icons/iconpreviewarea.h
@@ -66,7 +66,7 @@ class IconPreviewArea : public QWidget
Q_OBJECT
public:
- explicit IconPreviewArea(QWidget *parent = Q_NULLPTR);
+ explicit IconPreviewArea(QWidget *parent = nullptr);
void setIcon(const QIcon &icon);
void setSize(const QSize &size);
diff --git a/examples/widgets/widgets/icons/iconsizespinbox.h b/examples/widgets/widgets/icons/iconsizespinbox.h
index 96a56e75c9..87415ac5d6 100644
--- a/examples/widgets/widgets/icons/iconsizespinbox.h
+++ b/examples/widgets/widgets/icons/iconsizespinbox.h
@@ -59,7 +59,7 @@ class IconSizeSpinBox : public QSpinBox
Q_OBJECT
public:
- explicit IconSizeSpinBox(QWidget *parent = Q_NULLPTR);
+ explicit IconSizeSpinBox(QWidget *parent = nullptr);
int valueFromText(const QString &text) const override;
QString textFromValue(int value) const override;
diff --git a/examples/widgets/widgets/icons/imagedelegate.h b/examples/widgets/widgets/icons/imagedelegate.h
index 928085d85b..3b76b78339 100644
--- a/examples/widgets/widgets/icons/imagedelegate.h
+++ b/examples/widgets/widgets/icons/imagedelegate.h
@@ -59,7 +59,7 @@ class ImageDelegate : public QItemDelegate
Q_OBJECT
public:
- explicit ImageDelegate(QObject *parent = Q_NULLPTR);
+ explicit ImageDelegate(QObject *parent = nullptr);
//! [0]
//! [1]
diff --git a/examples/widgets/widgets/tablet/mainwindow.cpp b/examples/widgets/widgets/tablet/mainwindow.cpp
index 0d63ac316b..c02e02f0a4 100644
--- a/examples/widgets/widgets/tablet/mainwindow.cpp
+++ b/examples/widgets/widgets/tablet/mainwindow.cpp
@@ -55,7 +55,7 @@
//! [0]
MainWindow::MainWindow(TabletCanvas *canvas)
- : m_canvas(canvas), m_colorDialog(Q_NULLPTR)
+ : m_canvas(canvas), m_colorDialog(nullptr)
{
createMenus();
setWindowTitle(tr("Tablet Example"));
diff --git a/examples/widgets/widgets/tablet/tabletcanvas.cpp b/examples/widgets/widgets/tablet/tabletcanvas.cpp
index d74c21f072..73678ab754 100644
--- a/examples/widgets/widgets/tablet/tabletcanvas.cpp
+++ b/examples/widgets/widgets/tablet/tabletcanvas.cpp
@@ -55,7 +55,7 @@
//! [0]
TabletCanvas::TabletCanvas()
- : QWidget(Q_NULLPTR)
+ : QWidget(nullptr)
, m_alphaChannelValuator(TangentialPressureValuator)
, m_colorSaturationValuator(NoValuator)
, m_lineWidthValuator(PressureValuator)