forked from qt-creator/qt-creator
Qt Designer plugin: Use C++ 11 member initialization.
Simplify/obsolete constructors accordingly. Change-Id: Id7b974317f2be81a89ff3a279eed95171d34991f Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -42,11 +42,10 @@ namespace Internal {
|
||||
class EditorData
|
||||
{
|
||||
public:
|
||||
EditorData() : formWindowEditor(0), widgetHost(0) {}
|
||||
operator bool() const { return formWindowEditor != 0; }
|
||||
|
||||
FormWindowEditor *formWindowEditor;
|
||||
SharedTools::WidgetHost *widgetHost;
|
||||
FormWindowEditor *formWindowEditor = nullptr;
|
||||
SharedTools::WidgetHost *widgetHost = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -52,9 +52,7 @@ namespace Designer {
|
||||
namespace Internal {
|
||||
|
||||
FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *parent)
|
||||
: m_shouldAutoSave(false),
|
||||
m_formWindow(form),
|
||||
m_isModified(false)
|
||||
: m_formWindow(form)
|
||||
{
|
||||
setMimeType(QLatin1String(Designer::Constants::FORM_MIMETYPE));
|
||||
setParent(parent);
|
||||
|
||||
@@ -84,12 +84,12 @@ private slots:
|
||||
|
||||
private:
|
||||
QString m_suggestedName;
|
||||
bool m_shouldAutoSave;
|
||||
bool m_shouldAutoSave = false;
|
||||
// Might actually go out of scope before the IEditor due
|
||||
// to deleting the WidgetHost which owns it.
|
||||
QPointer<QDesignerFormWindowInterface> m_formWindow;
|
||||
bool m_isModified;
|
||||
ResourceHandler *m_resourceHandler;
|
||||
bool m_isModified = false;
|
||||
ResourceHandler *m_resourceHandler = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -83,9 +83,7 @@ void QrcFilesVisitor::visitFolderNode(FolderNode *folderNode)
|
||||
// ------------ ResourceHandler
|
||||
ResourceHandler::ResourceHandler(QDesignerFormWindowInterface *fw) :
|
||||
QObject(fw),
|
||||
m_form(fw),
|
||||
m_initialized(false),
|
||||
m_handlingResources(false)
|
||||
m_form(fw)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ private:
|
||||
|
||||
QDesignerFormWindowInterface * const m_form;
|
||||
QStringList m_originalUiQrcPaths;
|
||||
bool m_initialized;
|
||||
bool m_handlingResources;
|
||||
bool m_initialized = false;
|
||||
bool m_handlingResources = false;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
using namespace Designer::Internal;
|
||||
|
||||
SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
|
||||
m_designerPage(designerPage), m_initialized(false)
|
||||
m_designerPage(designerPage)
|
||||
{
|
||||
setId(Core::Id::fromString(m_designerPage->name()));
|
||||
setDisplayName(m_designerPage->name());
|
||||
@@ -72,7 +72,7 @@ void SettingsPage::finish()
|
||||
}
|
||||
|
||||
SettingsPageProvider::SettingsPageProvider(QObject *parent)
|
||||
: IOptionsPageProvider(parent), m_initialized(false)
|
||||
: IOptionsPageProvider(parent)
|
||||
{
|
||||
setCategory(Designer::Constants::SETTINGS_CATEGORY);
|
||||
setDisplayCategory(QCoreApplication::translate("Designer",
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
private:
|
||||
QDesignerOptionsPageInterface *m_designerPage;
|
||||
bool m_initialized;
|
||||
bool m_initialized = false;
|
||||
QPointer<QWidget> m_widget;
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
bool matches(const QString &searchKeyWord) const override;
|
||||
|
||||
private:
|
||||
mutable bool m_initialized;
|
||||
mutable bool m_initialized = false;
|
||||
mutable QStringList m_keywords;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user