summaryrefslogtreecommitdiffstats
path: root/src/designer/src/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-03 16:40:05 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-05 10:26:08 +0200
commit13f0365a960538693ee4b52f9e02864d08845fae (patch)
treecea2924f8113152ff10bdc126ebe5a0c8d3c4f95 /src/designer/src/designer
parentfac0dcbeef6a0c23e780b9751c17883ec9918d6f (diff)
Qt Designer: Introduce nullptr
Apply Fixits by Qt Creator with some amendments. Change-Id: Idc948b1132fbb61c3ae6706b71659e2e8790fbc6 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/designer/src/designer')
-rw-r--r--src/designer/src/designer/appfontdialog.cpp2
-rw-r--r--src/designer/src/designer/appfontdialog.h4
-rw-r--r--src/designer/src/designer/mainwindow.cpp2
-rw-r--r--src/designer/src/designer/mainwindow.h4
-rw-r--r--src/designer/src/designer/newform.cpp10
-rw-r--r--src/designer/src/designer/preferencesdialog.h2
-rw-r--r--src/designer/src/designer/qdesigner.cpp6
-rw-r--r--src/designer/src/designer/qdesigner_actions.cpp8
-rw-r--r--src/designer/src/designer/qdesigner_appearanceoptions.h2
-rw-r--r--src/designer/src/designer/qdesigner_formwindow.cpp2
-rw-r--r--src/designer/src/designer/qdesigner_formwindow.h2
-rw-r--r--src/designer/src/designer/qdesigner_server.cpp6
-rw-r--r--src/designer/src/designer/qdesigner_server.h4
-rw-r--r--src/designer/src/designer/qdesigner_toolwindow.cpp14
-rw-r--r--src/designer/src/designer/qdesigner_toolwindow.h2
-rw-r--r--src/designer/src/designer/qdesigner_workbench.cpp40
-rw-r--r--src/designer/src/designer/saveformastemplate.h2
-rw-r--r--src/designer/src/designer/versiondialog.cpp2
18 files changed, 57 insertions, 57 deletions
diff --git a/src/designer/src/designer/appfontdialog.cpp b/src/designer/src/designer/appfontdialog.cpp
index e5a76033f..42e3ea1ab 100644
--- a/src/designer/src/designer/appfontdialog.cpp
+++ b/src/designer/src/designer/appfontdialog.cpp
@@ -215,7 +215,7 @@ const AppFontManager::FileNameFontIdPairs &AppFontManager::fonts() const
class AppFontModel : public QStandardItemModel {
Q_DISABLE_COPY(AppFontModel)
public:
- AppFontModel(QObject *parent = 0);
+ AppFontModel(QObject *parent = nullptr);
void init(const AppFontManager &mgr);
void add(const QString &fontFile, int id);
diff --git a/src/designer/src/designer/appfontdialog.h b/src/designer/src/designer/appfontdialog.h
index ca5bc3320..959b71a6d 100644
--- a/src/designer/src/designer/appfontdialog.h
+++ b/src/designer/src/designer/appfontdialog.h
@@ -49,7 +49,7 @@ class AppFontWidget : public QGroupBox
Q_DISABLE_COPY(AppFontWidget)
Q_OBJECT
public:
- explicit AppFontWidget(QWidget *parent = 0);
+ explicit AppFontWidget(QWidget *parent = nullptr);
QStringList fontFiles() const;
@@ -77,7 +77,7 @@ class AppFontDialog : public QDialog
Q_DISABLE_COPY(AppFontDialog)
Q_OBJECT
public:
- explicit AppFontDialog(QWidget *parent = 0);
+ explicit AppFontDialog(QWidget *parent = nullptr);
private:
AppFontWidget *m_appFontWidget;
diff --git a/src/designer/src/designer/mainwindow.cpp b/src/designer/src/designer/mainwindow.cpp
index 1e882cc71..d856e396e 100644
--- a/src/designer/src/designer/mainwindow.cpp
+++ b/src/designer/src/designer/mainwindow.cpp
@@ -293,7 +293,7 @@ bool ToolBarManager::restoreState(const QByteArray &state, int version)
DockedMainWindow::DockedMainWindow(QDesignerWorkbench *wb,
QMenu *toolBarMenu,
const QVector<QDesignerToolWindow *> &toolWindows) :
- m_toolBarManager(0)
+ m_toolBarManager(nullptr)
{
setObjectName(QStringLiteral("MDIWindow"));
setWindowTitle(mainWindowTitle());
diff --git a/src/designer/src/designer/mainwindow.h b/src/designer/src/designer/mainwindow.h
index 9c4687ad6..640730f89 100644
--- a/src/designer/src/designer/mainwindow.h
+++ b/src/designer/src/designer/mainwindow.h
@@ -58,7 +58,7 @@ class MainWindowBase: public QMainWindow
Q_DISABLE_COPY(MainWindowBase)
Q_OBJECT
protected:
- explicit MainWindowBase(QWidget *parent = 0, Qt::WindowFlags flags = Qt::Window);
+ explicit MainWindowBase(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::Window);
public:
enum CloseEventPolicy {
@@ -92,7 +92,7 @@ class DockedMdiArea : public QMdiArea
Q_DISABLE_COPY(DockedMdiArea)
Q_OBJECT
public:
- explicit DockedMdiArea(const QString &extension, QWidget *parent = 0);
+ explicit DockedMdiArea(const QString &extension, QWidget *parent = nullptr);
signals:
void fileDropped(const QString &);
diff --git a/src/designer/src/designer/newform.cpp b/src/designer/src/designer/newform.cpp
index b4eb49554..797e60149 100644
--- a/src/designer/src/designer/newform.cpp
+++ b/src/designer/src/designer/newform.cpp
@@ -59,9 +59,9 @@ NewForm::NewForm(QDesignerWorkbench *workbench, QWidget *parentWidget, const QSt
m_newFormWidget(QDesignerNewFormWidgetInterface::createNewFormWidget(workbench->core())),
m_workbench(workbench),
m_chkShowOnStartup(new QCheckBox(tr("Show this Dialog on Startup"))),
- m_createButton(new QPushButton(QApplication::translate("NewForm", "C&reate", 0))),
- m_recentButton(new QPushButton(QApplication::translate("NewForm", "Recent", 0))),
- m_buttonBox(0)
+ m_createButton(new QPushButton(QApplication::translate("NewForm", "C&reate", nullptr))),
+ m_recentButton(new QPushButton(QApplication::translate("NewForm", "Recent", nullptr))),
+ m_buttonBox(nullptr)
{
setWindowTitle(tr("New Form"));
QDesignerSettings settings(m_workbench->core());
@@ -94,10 +94,10 @@ QDialogButtonBox *NewForm::createButtonBox()
{
// Dialog buttons with 'recent files'
QDialogButtonBox *buttonBox = new QDialogButtonBox;
- buttonBox->addButton(QApplication::translate("NewForm", "&Close", 0),
+ buttonBox->addButton(QApplication::translate("NewForm", "&Close", nullptr),
QDialogButtonBox::RejectRole);
buttonBox->addButton(m_createButton, QDialogButtonBox::AcceptRole);
- buttonBox->addButton(QApplication::translate("NewForm", "&Open...", 0),
+ buttonBox->addButton(QApplication::translate("NewForm", "&Open...", nullptr),
QDialogButtonBox::ActionRole);
buttonBox->addButton(m_recentButton, QDialogButtonBox::ActionRole);
QDesignerActions *da = m_workbench->actionManager();
diff --git a/src/designer/src/designer/preferencesdialog.h b/src/designer/src/designer/preferencesdialog.h
index 16b625314..654e93388 100644
--- a/src/designer/src/designer/preferencesdialog.h
+++ b/src/designer/src/designer/preferencesdialog.h
@@ -45,7 +45,7 @@ class PreferencesDialog: public QDialog
{
Q_OBJECT
public:
- explicit PreferencesDialog(QDesignerFormEditorInterface *core, QWidget *parentWidget = 0);
+ explicit PreferencesDialog(QDesignerFormEditorInterface *core, QWidget *parentWidget = nullptr);
~PreferencesDialog();
diff --git a/src/designer/src/designer/qdesigner.cpp b/src/designer/src/designer/qdesigner.cpp
index daec73b08..ff244ec29 100644
--- a/src/designer/src/designer/qdesigner.cpp
+++ b/src/designer/src/designer/qdesigner.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
static const char *designerApplicationName = "Designer";
static const char designerDisplayName[] = "Qt Designer";
static const char *designerWarningPrefix = "Designer: ";
-static QtMessageHandler previousMessageHandler = 0;
+static QtMessageHandler previousMessageHandler = nullptr;
static void designerMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
@@ -73,8 +73,8 @@ static void designerMessageHandler(QtMsgType type, const QMessageLogContext &con
QDesigner::QDesigner(int &argc, char **argv)
: QApplication(argc, argv),
- m_server(0),
- m_client(0),
+ m_server(nullptr),
+ m_client(nullptr),
m_workbench(0), m_suppressNewFormShow(false)
{
setOrganizationName(QStringLiteral("QtProject"));
diff --git a/src/designer/src/designer/qdesigner_actions.cpp b/src/designer/src/designer/qdesigner_actions.cpp
index c221262da..5ac2c565c 100644
--- a/src/designer/src/designer/qdesigner_actions.cpp
+++ b/src/designer/src/designer/qdesigner_actions.cpp
@@ -138,7 +138,7 @@ static QString getSaveFileNameWithExtension(QWidget *parent, const QString &titl
QString saveFile;
while (true) {
- saveFile = QFileDialog::getSaveFileName(parent, title, dir, filter, 0, QFileDialog::DontConfirmOverwrite);
+ saveFile = QFileDialog::getSaveFileName(parent, title, dir, filter, nullptr, QFileDialog::DontConfirmOverwrite);
if (saveFile.isEmpty())
return saveFile;
@@ -206,7 +206,7 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_quitAction->setIcon(QIcon::fromTheme(QStringLiteral("application-exit"), m_quitAction->icon()));
#endif
- Q_ASSERT(m_core != 0);
+ Q_ASSERT(m_core != nullptr);
qdesigner_internal::QDesignerFormWindowManager *ifwm = qobject_cast<qdesigner_internal::QDesignerFormWindowManager *>(m_core->formWindowManager());
Q_ASSERT(ifwm);
m_previewManager = ifwm->previewManager();
@@ -238,7 +238,7 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
m_saveFormAction->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
QDesignerFormWindowManagerInterface *formWindowManager = m_core->formWindowManager();
- Q_ASSERT(formWindowManager != 0);
+ Q_ASSERT(formWindowManager != nullptr);
//
// file actions
@@ -939,7 +939,7 @@ void QDesignerActions::shutdown()
void QDesignerActions::activeFormWindowChanged(QDesignerFormWindowInterface *formWindow)
{
- const bool enable = formWindow != 0;
+ const bool enable = formWindow != nullptr;
m_saveFormAction->setEnabled(enable);
m_saveFormAsAction->setEnabled(enable);
m_saveAllFormsAction->setEnabled(enable);
diff --git a/src/designer/src/designer/qdesigner_appearanceoptions.h b/src/designer/src/designer/qdesigner_appearanceoptions.h
index f6936252c..b0b87c796 100644
--- a/src/designer/src/designer/qdesigner_appearanceoptions.h
+++ b/src/designer/src/designer/qdesigner_appearanceoptions.h
@@ -72,7 +72,7 @@ class QDesignerAppearanceOptionsWidget : public QWidget
{
Q_OBJECT
public:
- explicit QDesignerAppearanceOptionsWidget(QWidget *parent = 0);
+ explicit QDesignerAppearanceOptionsWidget(QWidget *parent = nullptr);
~QDesignerAppearanceOptionsWidget();
AppearanceOptions appearanceOptions() const;
diff --git a/src/designer/src/designer/qdesigner_formwindow.cpp b/src/designer/src/designer/qdesigner_formwindow.cpp
index da2324eca..77223e416 100644
--- a/src/designer/src/designer/qdesigner_formwindow.cpp
+++ b/src/designer/src/designer/qdesigner_formwindow.cpp
@@ -267,7 +267,7 @@ void QDesignerFormWindow::slotGeometryChanged()
// so, do not do it for the main container only
const QDesignerFormEditorInterface *core = m_editor->core();
QObject *object = core->propertyEditor()->object();
- if (object == 0 || !object->isWidgetType())
+ if (object == nullptr || !object->isWidgetType())
return;
static const QString geometryProperty = QStringLiteral("geometry");
const QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(), object);
diff --git a/src/designer/src/designer/qdesigner_formwindow.h b/src/designer/src/designer/qdesigner_formwindow.h
index e5dfb13b7..da82f2495 100644
--- a/src/designer/src/designer/qdesigner_formwindow.h
+++ b/src/designer/src/designer/qdesigner_formwindow.h
@@ -42,7 +42,7 @@ class QDesignerFormWindow: public QWidget
Q_OBJECT
public:
QDesignerFormWindow(QDesignerFormWindowInterface *formWindow, QDesignerWorkbench *workbench,
- QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ QWidget *parent = nullptr, Qt::WindowFlags flags = {});
void firstShow();
diff --git a/src/designer/src/designer/qdesigner_server.cpp b/src/designer/src/designer/qdesigner_server.cpp
index 42026a5f0..e223f0b2c 100644
--- a/src/designer/src/designer/qdesigner_server.cpp
+++ b/src/designer/src/designer/qdesigner_server.cpp
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
QDesignerServer::QDesignerServer(QObject *parent)
: QObject(parent)
{
- m_socket = 0;
+ m_socket = nullptr;
m_server = new QTcpServer(this);
if (m_server->listen(QHostAddress::LocalHost, 0)) {
connect(m_server, &QTcpServer::newConnection,
@@ -90,13 +90,13 @@ void QDesignerServer::readFromClient()
void QDesignerServer::socketClosed()
{
- m_socket = 0;
+ m_socket = nullptr;
}
void QDesignerServer::handleNewConnection()
{
// no need for more than one connection
- if (m_socket == 0) {
+ if (m_socket == nullptr) {
m_socket = m_server->nextPendingConnection();
connect(m_socket, &QTcpSocket::readyRead,
this, &QDesignerServer::readFromClient);
diff --git a/src/designer/src/designer/qdesigner_server.h b/src/designer/src/designer/qdesigner_server.h
index 2ad451b50..28eec7887 100644
--- a/src/designer/src/designer/qdesigner_server.h
+++ b/src/designer/src/designer/qdesigner_server.h
@@ -40,7 +40,7 @@ class QDesignerServer: public QObject
{
Q_OBJECT
public:
- explicit QDesignerServer(QObject *parent = 0);
+ explicit QDesignerServer(QObject *parent = nullptr);
~QDesignerServer() override;
quint16 serverPort() const;
@@ -61,7 +61,7 @@ class QDesignerClient: public QObject
{
Q_OBJECT
public:
- explicit QDesignerClient(quint16 port, QObject *parent = 0);
+ explicit QDesignerClient(quint16 port, QObject *parent = nullptr);
~QDesignerClient() override;
private slots:
diff --git a/src/designer/src/designer/qdesigner_toolwindow.cpp b/src/designer/src/designer/qdesigner_toolwindow.cpp
index 0c77b1dbd..e71edcb0c 100644
--- a/src/designer/src/designer/qdesigner_toolwindow.cpp
+++ b/src/designer/src/designer/qdesigner_toolwindow.cpp
@@ -145,7 +145,7 @@ QRect QDesignerToolWindow::availableToolWindowGeometry() const
// ---------------------- PropertyEditorToolWindow
-static inline QWidget *createPropertyEditor(QDesignerFormEditorInterface *core, QWidget *parent = 0)
+static inline QWidget *createPropertyEditor(QDesignerFormEditorInterface *core, QWidget *parent = nullptr)
{
QDesignerPropertyEditorInterface *widget = QDesignerComponents::createPropertyEditor(core, parent);
core->setPropertyEditor(widget);
@@ -202,7 +202,7 @@ void PropertyEditorToolWindow::showEvent(QShowEvent *event)
// ---------------------- ActionEditorToolWindow
-static inline QWidget *createActionEditor(QDesignerFormEditorInterface *core, QWidget *parent = 0)
+static inline QWidget *createActionEditor(QDesignerFormEditorInterface *core, QWidget *parent = nullptr)
{
QDesignerActionEditorInterface *widget = QDesignerComponents::createActionEditor(core, parent);
core->setActionEditor(widget);
@@ -244,7 +244,7 @@ QRect ActionEditorToolWindow::geometryHint() const
// ---------------------- ObjectInspectorToolWindow
-static inline QWidget *createObjectInspector(QDesignerFormEditorInterface *core, QWidget *parent = 0)
+static inline QWidget *createObjectInspector(QDesignerFormEditorInterface *core, QWidget *parent = nullptr)
{
QDesignerObjectInspectorInterface *widget = QDesignerComponents::createObjectInspector(core, parent);
core->setObjectInspector(widget);
@@ -296,7 +296,7 @@ public:
ResourceEditorToolWindow::ResourceEditorToolWindow(QDesignerWorkbench *workbench) :
QDesignerToolWindow(workbench,
- QDesignerComponents::createResourceEditor(workbench->core(), 0),
+ QDesignerComponents::createResourceEditor(workbench->core(), nullptr),
QStringLiteral("qt_designer_resourceeditor"),
QDesignerToolWindow::tr("Resource Browser"),
QStringLiteral("__qt_resource_editor_tool_action"),
@@ -330,7 +330,7 @@ public:
SignalSlotEditorToolWindow::SignalSlotEditorToolWindow(QDesignerWorkbench *workbench) :
QDesignerToolWindow(workbench,
- QDesignerComponents::createSignalSlotEditor(workbench->core(), 0),
+ QDesignerComponents::createSignalSlotEditor(workbench->core(), nullptr),
QStringLiteral("qt_designer_signalsloteditor"),
QDesignerToolWindow::tr("Signal/Slot Editor"),
QStringLiteral("__qt_signal_slot_editor_tool_action"),
@@ -354,7 +354,7 @@ QRect SignalSlotEditorToolWindow::geometryHint() const
// ---------------------- WidgetBoxToolWindow
-static inline QWidget *createWidgetBox(QDesignerFormEditorInterface *core, QWidget *parent = 0)
+static inline QWidget *createWidgetBox(QDesignerFormEditorInterface *core, QWidget *parent = nullptr)
{
QDesignerWidgetBoxInterface *widget = QDesignerComponents::createWidgetBox(core, parent);
core->setWidgetBox(widget);
@@ -411,7 +411,7 @@ QDesignerToolWindow *QDesignerToolWindow::createStandardToolWindow(StandardToolW
default:
break;
}
- return 0;
+ return nullptr;
}
diff --git a/src/designer/src/designer/qdesigner_toolwindow.h b/src/designer/src/designer/qdesigner_toolwindow.h
index 1049d6dcc..88ea6bb00 100644
--- a/src/designer/src/designer/qdesigner_toolwindow.h
+++ b/src/designer/src/designer/qdesigner_toolwindow.h
@@ -71,7 +71,7 @@ protected:
const QString &title,
const QString &actionObjectName,
Qt::DockWidgetArea dockAreaHint,
- QWidget *parent = 0,
+ QWidget *parent = nullptr,
Qt::WindowFlags flags = Qt::Window);
public:
diff --git a/src/designer/src/designer/qdesigner_workbench.cpp b/src/designer/src/designer/qdesigner_workbench.cpp
index 7ca7155f9..2de61bea1 100644
--- a/src/designer/src/designer/qdesigner_workbench.cpp
+++ b/src/designer/src/designer/qdesigner_workbench.cpp
@@ -90,7 +90,7 @@ static QDockWidget *dockWidgetOf(const QWidget *w)
}
}
Q_ASSERT("Dock widget not found");
- return 0;
+ return nullptr;
}
// ------------ QDesignerWorkbench::Position
@@ -330,7 +330,7 @@ Qt::WindowFlags QDesignerWorkbench::magicalWindowFlags(const QWidget *widgetForF
return Qt::Window;
default:
Q_ASSERT(0);
- return 0;
+ return nullptr;
}
}
@@ -341,12 +341,12 @@ QWidget *QDesignerWorkbench::magicalParent(const QWidget *w) const
// Use widget box as parent for all windows except self. This will
// result in having just one entry in the MS Windows task bar.
QWidget *widgetBoxWrapper = widgetBoxToolWindow();
- return w == widgetBoxWrapper ? 0 : widgetBoxWrapper;
+ return w == widgetBoxWrapper ? nullptr : widgetBoxWrapper;
}
case DockedMode:
return m_dockedMainWindow->mdiArea();
case NeutralMode:
- return 0;
+ return nullptr;
default:
Q_ASSERT(0);
return 0;
@@ -361,7 +361,7 @@ void QDesignerWorkbench::switchToNeutralMode()
if (m_mode == TopLevelMode) {
delete m_topLevelData.toolbarManager;
- m_topLevelData.toolbarManager = 0;
+ m_topLevelData.toolbarManager = nullptr;
qDeleteAll(m_topLevelData.toolbars);
m_topLevelData.toolbars.clear();
}
@@ -370,23 +370,23 @@ void QDesignerWorkbench::switchToNeutralMode()
for (QDesignerToolWindow *tw : qAsConst(m_toolWindows)) {
tw->setCloseEventPolicy(MainWindowBase::AcceptCloseEvents);
- tw->setParent(0);
+ tw->setParent(nullptr);
}
for (QDesignerFormWindow *fw : qAsConst(m_formWindows)) {
- fw->setParent(0);
+ fw->setParent(nullptr);
fw->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
}
#ifndef Q_OS_MACOS
- m_globalMenuBar->setParent(0);
+ m_globalMenuBar->setParent(nullptr);
#endif
- m_core->setTopLevel(0);
- qDesigner->setMainWindow(0);
+ m_core->setTopLevel(nullptr);
+ qDesigner->setMainWindow(nullptr);
delete m_dockedMainWindow;
- m_dockedMainWindow = 0;
+ m_dockedMainWindow = nullptr;
}
void QDesignerWorkbench::switchToDockedMode()
@@ -558,7 +558,7 @@ QDesignerFormWindow *QDesignerWorkbench::formWindow(int index) const
QRect QDesignerWorkbench::desktopGeometry() const
{
// Return geometry of the desktop designer is running in.
- QWidget *widget = 0;
+ QWidget *widget = nullptr;
switch (m_mode) {
case DockedMode:
widget = m_dockedMainWindow;
@@ -683,7 +683,7 @@ QDesignerFormWindow *QDesignerWorkbench::findFormWindow(QWidget *widget) const
return formWindow;
}
- return 0;
+ return nullptr;
}
bool QDesignerWorkbench::handleClose()
@@ -750,7 +750,7 @@ void QDesignerWorkbench::updateWindowMenu(QDesignerFormWindowInterface *fwi)
{
bool minimizeChecked = false;
bool minimizeEnabled = false;
- QDesignerFormWindow *activeFormWindow = 0;
+ QDesignerFormWindow *activeFormWindow = nullptr;
do {
if (!fwi)
break;
@@ -800,7 +800,7 @@ bool QDesignerWorkbench::readInBackup()
return false;
const QMessageBox::StandardButton answer =
- QMessageBox::question(0, tr("Backup Information"),
+ QMessageBox::question(nullptr, tr("Backup Information"),
tr("The last session of Designer was not terminated correctly. "
"Backup files were left behind. Do you want to load them?"),
QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
@@ -908,13 +908,13 @@ QDesignerFormWindow * QDesignerWorkbench::loadForm(const QString &fileName,
if (!file.open(QFile::ReadOnly|QFile::Text)) {
*errorMessage = tr("The file <b>%1</b> could not be opened: %2").arg(file.fileName(), file.errorString());
- return 0;
+ return nullptr;
}
// Create a form
QDesignerFormWindowManagerInterface *formWindowManager = m_core->formWindowManager();
- QDesignerFormWindow *formWindow = new QDesignerFormWindow(/*formWindow=*/ 0, this);
+ QDesignerFormWindow *formWindow = new QDesignerFormWindow(/*formWindow=*/ nullptr, this);
addFormWindow(formWindow);
QDesignerFormWindowInterface *editor = formWindow->editor();
Q_ASSERT(editor);
@@ -927,7 +927,7 @@ QDesignerFormWindow * QDesignerWorkbench::loadForm(const QString &fileName,
removeFormWindow(formWindow);
formWindowManager->removeFormWindow(editor);
m_core->metaDataBase()->remove(editor);
- return 0;
+ return nullptr;
}
if (qdesigner_internal::FormWindowBase *fwb = qobject_cast<qdesigner_internal::FormWindowBase *>(editor))
@@ -967,7 +967,7 @@ QDesignerFormWindow * QDesignerWorkbench::openForm(const QString &fileName, QStr
{
QDesignerFormWindow *rc = loadForm(fileName, true, errorMessage);
if (!rc)
- return 0;
+ return nullptr;
rc->editor()->setFileName(fileName);
rc->firstShow();
return rc;
@@ -979,7 +979,7 @@ QDesignerFormWindow * QDesignerWorkbench::openTemplate(const QString &templateFi
{
QDesignerFormWindow *rc = loadForm(templateFileName, false, errorMessage);
if (!rc)
- return 0;
+ return nullptr;
rc->editor()->setFileName(editorFileName);
rc->firstShow();
diff --git a/src/designer/src/designer/saveformastemplate.h b/src/designer/src/designer/saveformastemplate.h
index 14bf4ecfa..7b8f8b8da 100644
--- a/src/designer/src/designer/saveformastemplate.h
+++ b/src/designer/src/designer/saveformastemplate.h
@@ -42,7 +42,7 @@ class SaveFormAsTemplate: public QDialog
public:
explicit SaveFormAsTemplate(QDesignerFormEditorInterface *m_core,
QDesignerFormWindowInterface *formWindow,
- QWidget *parent = 0);
+ QWidget *parent = nullptr);
~SaveFormAsTemplate() override;
private slots:
diff --git a/src/designer/src/designer/versiondialog.cpp b/src/designer/src/designer/versiondialog.cpp
index 7ae440664..9350fa397 100644
--- a/src/designer/src/designer/versiondialog.cpp
+++ b/src/designer/src/designer/versiondialog.cpp
@@ -43,7 +43,7 @@ class VersionLabel : public QLabel
{
Q_OBJECT
public:
- VersionLabel(QWidget *parent = 0);
+ VersionLabel(QWidget *parent = nullptr);
signals:
void triggered();