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
|
class EditorData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EditorData() : formWindowEditor(0), widgetHost(0) {}
|
|
||||||
operator bool() const { return formWindowEditor != 0; }
|
operator bool() const { return formWindowEditor != 0; }
|
||||||
|
|
||||||
FormWindowEditor *formWindowEditor;
|
FormWindowEditor *formWindowEditor = nullptr;
|
||||||
SharedTools::WidgetHost *widgetHost;
|
SharedTools::WidgetHost *widgetHost = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -52,9 +52,7 @@ namespace Designer {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *parent)
|
FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *parent)
|
||||||
: m_shouldAutoSave(false),
|
: m_formWindow(form)
|
||||||
m_formWindow(form),
|
|
||||||
m_isModified(false)
|
|
||||||
{
|
{
|
||||||
setMimeType(QLatin1String(Designer::Constants::FORM_MIMETYPE));
|
setMimeType(QLatin1String(Designer::Constants::FORM_MIMETYPE));
|
||||||
setParent(parent);
|
setParent(parent);
|
||||||
|
|||||||
@@ -84,12 +84,12 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_suggestedName;
|
QString m_suggestedName;
|
||||||
bool m_shouldAutoSave;
|
bool m_shouldAutoSave = false;
|
||||||
// Might actually go out of scope before the IEditor due
|
// Might actually go out of scope before the IEditor due
|
||||||
// to deleting the WidgetHost which owns it.
|
// to deleting the WidgetHost which owns it.
|
||||||
QPointer<QDesignerFormWindowInterface> m_formWindow;
|
QPointer<QDesignerFormWindowInterface> m_formWindow;
|
||||||
bool m_isModified;
|
bool m_isModified = false;
|
||||||
ResourceHandler *m_resourceHandler;
|
ResourceHandler *m_resourceHandler = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -83,9 +83,7 @@ void QrcFilesVisitor::visitFolderNode(FolderNode *folderNode)
|
|||||||
// ------------ ResourceHandler
|
// ------------ ResourceHandler
|
||||||
ResourceHandler::ResourceHandler(QDesignerFormWindowInterface *fw) :
|
ResourceHandler::ResourceHandler(QDesignerFormWindowInterface *fw) :
|
||||||
QObject(fw),
|
QObject(fw),
|
||||||
m_form(fw),
|
m_form(fw)
|
||||||
m_initialized(false),
|
|
||||||
m_handlingResources(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ private:
|
|||||||
|
|
||||||
QDesignerFormWindowInterface * const m_form;
|
QDesignerFormWindowInterface * const m_form;
|
||||||
QStringList m_originalUiQrcPaths;
|
QStringList m_originalUiQrcPaths;
|
||||||
bool m_initialized;
|
bool m_initialized = false;
|
||||||
bool m_handlingResources;
|
bool m_handlingResources = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
using namespace Designer::Internal;
|
using namespace Designer::Internal;
|
||||||
|
|
||||||
SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
|
SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
|
||||||
m_designerPage(designerPage), m_initialized(false)
|
m_designerPage(designerPage)
|
||||||
{
|
{
|
||||||
setId(Core::Id::fromString(m_designerPage->name()));
|
setId(Core::Id::fromString(m_designerPage->name()));
|
||||||
setDisplayName(m_designerPage->name());
|
setDisplayName(m_designerPage->name());
|
||||||
@@ -72,7 +72,7 @@ void SettingsPage::finish()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingsPageProvider::SettingsPageProvider(QObject *parent)
|
SettingsPageProvider::SettingsPageProvider(QObject *parent)
|
||||||
: IOptionsPageProvider(parent), m_initialized(false)
|
: IOptionsPageProvider(parent)
|
||||||
{
|
{
|
||||||
setCategory(Designer::Constants::SETTINGS_CATEGORY);
|
setCategory(Designer::Constants::SETTINGS_CATEGORY);
|
||||||
setDisplayCategory(QCoreApplication::translate("Designer",
|
setDisplayCategory(QCoreApplication::translate("Designer",
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QDesignerOptionsPageInterface *m_designerPage;
|
QDesignerOptionsPageInterface *m_designerPage;
|
||||||
bool m_initialized;
|
bool m_initialized = false;
|
||||||
QPointer<QWidget> m_widget;
|
QPointer<QWidget> m_widget;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
bool matches(const QString &searchKeyWord) const override;
|
bool matches(const QString &searchKeyWord) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable bool m_initialized;
|
mutable bool m_initialized = false;
|
||||||
mutable QStringList m_keywords;
|
mutable QStringList m_keywords;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user