summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs
diff options
context:
space:
mode:
authorLaurent Montel <laurent.montel@kdab.com>2017-10-10 10:16:59 +0200
committerJędrzej Nowacki <jedrzej.nowacki@qt.io>2017-11-30 20:40:13 +0000
commit40192995a59fda01bb76fd4181863fae5e0cf8f7 (patch)
treef8de97a507b5b6eeb6e5d7d1726bed0cb5c330df /src/printsupport/dialogs
parent8d75c6765d070367a1b48bd8982ba0a9948b97ea (diff)
PrintSupport: convert 0 with nullptr (c++11)
Change-Id: I35a8022c78427c9b4d4a9d9941770d22c36c3be8 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/printsupport/dialogs')
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.cpp2
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.h4
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog_p.h2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog.h4
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_p.h2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp4
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix_p.h4
-rw-r--r--src/printsupport/dialogs/qprintdialog.h4
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp6
-rw-r--r--src/printsupport/dialogs/qprintpreviewdialog.cpp2
-rw-r--r--src/printsupport/dialogs/qprintpreviewdialog.h4
11 files changed, 19 insertions, 19 deletions
diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp
index f982da46d9..71b5500bab 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.cpp
+++ b/src/printsupport/dialogs/qabstractprintdialog.cpp
@@ -471,7 +471,7 @@ void QPrintDialog::done(int result)
if (d->receiverToDisconnectOnClose) {
disconnect(this, SIGNAL(accepted(QPrinter*)),
d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
- d->receiverToDisconnectOnClose = 0;
+ d->receiverToDisconnectOnClose = nullptr;
}
d->memberToDisconnectOnClose.clear();
}
diff --git a/src/printsupport/dialogs/qabstractprintdialog.h b/src/printsupport/dialogs/qabstractprintdialog.h
index eb4dc3eb99..3cc89890fc 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.h
+++ b/src/printsupport/dialogs/qabstractprintdialog.h
@@ -81,7 +81,7 @@ public:
Q_DECLARE_FLAGS(PrintDialogOptions, PrintDialogOption)
Q_FLAG(PrintDialogOptions)
- explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = Q_NULLPTR);
+ explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
~QAbstractPrintDialog();
int exec() override = 0;
@@ -108,7 +108,7 @@ public:
QPrinter *printer() const;
protected:
- QAbstractPrintDialog(QAbstractPrintDialogPrivate &ptr, QPrinter *printer, QWidget *parent = Q_NULLPTR);
+ QAbstractPrintDialog(QAbstractPrintDialogPrivate &ptr, QPrinter *printer, QWidget *parent = nullptr);
private:
Q_DISABLE_COPY(QAbstractPrintDialog)
diff --git a/src/printsupport/dialogs/qabstractprintdialog_p.h b/src/printsupport/dialogs/qabstractprintdialog_p.h
index 2537fcbf80..a17a28f564 100644
--- a/src/printsupport/dialogs/qabstractprintdialog_p.h
+++ b/src/printsupport/dialogs/qabstractprintdialog_p.h
@@ -69,7 +69,7 @@ class QAbstractPrintDialogPrivate : public QDialogPrivate
public:
QAbstractPrintDialogPrivate()
- : printer(0), pd(0), ownsPrinter(false)
+ : printer(nullptr), pd(nullptr), ownsPrinter(false)
, options(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintPageRange |
QAbstractPrintDialog::PrintCollateCopies | QAbstractPrintDialog::PrintShowPageSize),
minPage(0), maxPage(INT_MAX)
diff --git a/src/printsupport/dialogs/qpagesetupdialog.h b/src/printsupport/dialogs/qpagesetupdialog.h
index 3bd752a413..70517dc844 100644
--- a/src/printsupport/dialogs/qpagesetupdialog.h
+++ b/src/printsupport/dialogs/qpagesetupdialog.h
@@ -57,8 +57,8 @@ class Q_PRINTSUPPORT_EXPORT QPageSetupDialog : public QDialog
Q_DECLARE_PRIVATE(QPageSetupDialog)
public:
- explicit QPageSetupDialog(QPrinter *printer, QWidget *parent = Q_NULLPTR);
- explicit QPageSetupDialog(QWidget *parent = Q_NULLPTR);
+ explicit QPageSetupDialog(QPrinter *printer, QWidget *parent = nullptr);
+ explicit QPageSetupDialog(QWidget *parent = nullptr);
~QPageSetupDialog();
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
diff --git a/src/printsupport/dialogs/qpagesetupdialog_p.h b/src/printsupport/dialogs/qpagesetupdialog_p.h
index 6a389b039a..a2b3f8363c 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_p.h
+++ b/src/printsupport/dialogs/qpagesetupdialog_p.h
@@ -71,7 +71,7 @@ class QPageSetupDialogPrivate : public QDialogPrivate
Q_DECLARE_PUBLIC(QPageSetupDialog)
public:
- QPageSetupDialogPrivate(QPrinter *printer);
+ explicit QPageSetupDialogPrivate(QPrinter *printer);
void setPrinter(QPrinter *newPrinter);
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index b048ba8b29..0715dfa548 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -230,8 +230,8 @@ void QUnixPageSetupDialogPrivate::init()
QPageSetupWidget::QPageSetupWidget(QWidget *parent)
: QWidget(parent),
- m_pagePreview(0),
- m_printer(0),
+ m_pagePreview(nullptr),
+ m_printer(nullptr),
m_outputFormat(QPrinter::PdfFormat),
m_units(QPageLayout::Point),
m_blockSignals(false)
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
index 658f103bea..4322b34690 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix_p.h
@@ -69,8 +69,8 @@ class QPagePreview;
class QPageSetupWidget : public QWidget {
Q_OBJECT
public:
- explicit QPageSetupWidget(QWidget *parent = 0);
- explicit QPageSetupWidget(QPrinter *printer, QWidget *parent = 0);
+ explicit QPageSetupWidget(QWidget *parent = nullptr);
+ explicit QPageSetupWidget(QPrinter *printer, QWidget *parent = nullptr);
void setPrinter(QPrinter *printer);
void selectPrinter(QPrinter::OutputFormat outputFormat, const QString &printerName);
diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h
index 5b81440a3c..bbddc296e9 100644
--- a/src/printsupport/dialogs/qprintdialog.h
+++ b/src/printsupport/dialogs/qprintdialog.h
@@ -59,8 +59,8 @@ class Q_PRINTSUPPORT_EXPORT QPrintDialog : public QAbstractPrintDialog
Q_PROPERTY(PrintDialogOptions options READ options WRITE setOptions)
public:
- explicit QPrintDialog(QPrinter *printer, QWidget *parent = Q_NULLPTR);
- explicit QPrintDialog(QWidget *parent = Q_NULLPTR);
+ explicit QPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
+ explicit QPrintDialog(QWidget *parent = nullptr);
~QPrintDialog();
int exec() Q_DECL_OVERRIDE;
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index a5f381d0a2..817049ad67 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -608,7 +608,7 @@ QPrintDialog::QPrintDialog(QPrinter *printer, QWidget *parent)
Constructs a print dialog with the given \a parent.
*/
QPrintDialog::QPrintDialog(QWidget *parent)
- : QAbstractPrintDialog(*(new QPrintDialogPrivate), 0, parent)
+ : QAbstractPrintDialog(*(new QPrintDialogPrivate), nullptr, parent)
{
Q_D(QPrintDialog);
d->init();
@@ -656,7 +656,7 @@ void QPrintDialog::accept()
/*! \internal
*/
QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p, QPrinter *prn)
- : parent(p), propertiesDialog(0), printer(prn), optionsPane(0),
+ : parent(p), propertiesDialog(nullptr), printer(prn), optionsPane(0),
filePrintersAdded(false), propertiesDialogShown(false)
{
q = 0;
@@ -788,7 +788,7 @@ void QUnixPrintWidgetPrivate::_q_btnBrowseClicked()
QString filename = widget.filename->text();
#if QT_CONFIG(filedialog)
filename = QFileDialog::getSaveFileName(parent, QPrintDialog::tr("Print To File ..."), filename,
- QString(), 0, QFileDialog::DontConfirmOverwrite);
+ QString(), nullptr, QFileDialog::DontConfirmOverwrite);
#else
filename.clear();
#endif
diff --git a/src/printsupport/dialogs/qprintpreviewdialog.cpp b/src/printsupport/dialogs/qprintpreviewdialog.cpp
index 174cfe4dba..af7d499eab 100644
--- a/src/printsupport/dialogs/qprintpreviewdialog.cpp
+++ b/src/printsupport/dialogs/qprintpreviewdialog.cpp
@@ -79,7 +79,7 @@ class QPrintPreviewMainWindow : public QMainWindow
{
public:
QPrintPreviewMainWindow(QWidget *parent) : QMainWindow(parent) {}
- QMenu *createPopupMenu() Q_DECL_OVERRIDE { return 0; }
+ QMenu *createPopupMenu() Q_DECL_OVERRIDE { return nullptr; }
};
class ZoomFactorValidator : public QDoubleValidator
diff --git a/src/printsupport/dialogs/qprintpreviewdialog.h b/src/printsupport/dialogs/qprintpreviewdialog.h
index 3b8f8a1171..bacafcb734 100644
--- a/src/printsupport/dialogs/qprintpreviewdialog.h
+++ b/src/printsupport/dialogs/qprintpreviewdialog.h
@@ -58,8 +58,8 @@ class Q_PRINTSUPPORT_EXPORT QPrintPreviewDialog : public QDialog
Q_DECLARE_PRIVATE(QPrintPreviewDialog)
public:
- explicit QPrintPreviewDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
- explicit QPrintPreviewDialog(QPrinter *printer, QWidget *parent = Q_NULLPTR,
+ explicit QPrintPreviewDialog(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
+ explicit QPrintPreviewDialog(QPrinter *printer, QWidget *parent = nullptr,
Qt::WindowFlags flags = Qt::WindowFlags());
~QPrintPreviewDialog();