PrintSupport: replace 0 with nullptr

Change-Id: Ic5e0000e384989239965f269474d17fa29669db1
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Laurent Montel 2017-10-09 11:29:26 +02:00
parent b4b36c9b50
commit bd98a52256
3 changed files with 12 additions and 12 deletions

View File

@ -97,7 +97,7 @@ QT_BEGIN_NAMESPACE
constructor.
*/
QPageSetupDialogPrivate::QPageSetupDialogPrivate(QPrinter *prntr) : printer(0), ownsPrinter(false)
QPageSetupDialogPrivate::QPageSetupDialogPrivate(QPrinter *prntr) : printer(nullptr), ownsPrinter(false)
{
setPrinter(prntr);
}
@ -174,7 +174,7 @@ void QPageSetupDialog::done(int result)
if (d->receiverToDisconnectOnClose) {
disconnect(this, SIGNAL(accepted()),
d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
d->receiverToDisconnectOnClose = 0;
d->receiverToDisconnectOnClose = nullptr;
}
d->memberToDisconnectOnClose.clear();

View File

@ -124,7 +124,7 @@ class QPrintPropertiesDialog : public QDialog
{
Q_OBJECT
public:
QPrintPropertiesDialog(QAbstractPrintDialog *parent = 0);
QPrintPropertiesDialog(QAbstractPrintDialog *parent = nullptr);
~QPrintPropertiesDialog();
void selectPrinter(QPrinter::OutputFormat outputFormat, const QString &printerName);
@ -149,7 +149,7 @@ class QUnixPrintWidget : public QWidget
Q_OBJECT
public:
explicit QUnixPrintWidget(QPrinter *printer, QWidget *parent = 0);
explicit QUnixPrintWidget(QPrinter *printer, QWidget *parent = nullptr);
~QUnixPrintWidget();
void updatePrinter();
@ -298,7 +298,7 @@ void QPrintPropertiesDialog::selectPrinter(QPrinter::OutputFormat outputFormat,
*/
QPrintDialogPrivate::QPrintDialogPrivate()
: top(0), bottom(0), buttons(0), collapseButton(0)
: top(nullptr), bottom(nullptr), buttons(nullptr), collapseButton(nullptr)
{
initResources();
}
@ -744,7 +744,7 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index)
// Reset properties dialog when printer is changed
if (propertiesDialog){
delete propertiesDialog;
propertiesDialog = 0;
propertiesDialog = nullptr;
propertiesDialogShown = false;
}
@ -802,7 +802,7 @@ void QUnixPrintWidgetPrivate::_q_btnBrowseClicked()
void QUnixPrintWidgetPrivate::applyPrinterProperties()
{
if (printer == 0)
if (printer == nullptr)
return;
if (printer->outputFileName().isEmpty()) {
QString home = QDir::homePath();
@ -923,7 +923,7 @@ void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
// If properties dialog was rejected the dialog is deleted and
// the properties are set to defaults when printer is setup
delete propertiesDialog;
propertiesDialog = 0;
propertiesDialog = nullptr;
propertiesDialogShown = false;
} else
// properties dialog was shown and accepted

View File

@ -115,7 +115,7 @@ class LineEdit : public QLineEdit
{
Q_OBJECT
public:
LineEdit(QWidget* parent = 0)
LineEdit(QWidget* parent = nullptr)
: QLineEdit(parent)
{
setContextMenuPolicy(Qt::NoContextMenu);
@ -152,7 +152,7 @@ class QPrintPreviewDialogPrivate : public QDialogPrivate
Q_DECLARE_PUBLIC(QPrintPreviewDialog)
public:
QPrintPreviewDialogPrivate()
: printDialog(0), ownPrinter(false),
: printDialog(nullptr), ownPrinter(false),
initialized(false) {}
// private slots
@ -167,7 +167,7 @@ public:
void _q_previewChanged();
void _q_zoomFactorChanged();
void init(QPrinter *printer = 0);
void init(QPrinter *printer = nullptr);
void populateScene();
void layoutPages();
void setupActions();
@ -736,7 +736,7 @@ void QPrintPreviewDialog::done(int result)
if (d->receiverToDisconnectOnClose) {
disconnect(this, SIGNAL(finished(int)),
d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
d->receiverToDisconnectOnClose = 0;
d->receiverToDisconnectOnClose = nullptr;
}
d->memberToDisconnectOnClose.clear();
}