Use make_unique in qtsettings.cpp
This commit is contained in:
parent
6d0d15bec2
commit
9908190722
|
@ -14,8 +14,6 @@
|
||||||
#include "ui_qtenvoptionpage.h"
|
#include "ui_qtenvoptionpage.h"
|
||||||
#include "ui_qtlanguageoptionpage.h"
|
#include "ui_qtlanguageoptionpage.h"
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFontDialog>
|
#include <QFontDialog>
|
||||||
|
@ -25,6 +23,7 @@
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -70,7 +69,7 @@ inline QtSettingsData::QtSettingsData()
|
||||||
* system-default.
|
* system-default.
|
||||||
*/
|
*/
|
||||||
QtSettings::QtSettings()
|
QtSettings::QtSettings()
|
||||||
: m_d(new QtSettingsData())
|
: m_d(make_unique<QtSettingsData>())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +213,7 @@ OptionCategory *QtSettings::category()
|
||||||
auto *category = new OptionCategory;
|
auto *category = new OptionCategory;
|
||||||
category->setDisplayName(QCoreApplication::translate("QtGui::QtOptionCategory", "Qt"));
|
category->setDisplayName(QCoreApplication::translate("QtGui::QtOptionCategory", "Qt"));
|
||||||
category->setIcon(QIcon::fromTheme(QStringLiteral("qtcreator"), QIcon(QStringLiteral(":/qtutilities/icons/hicolor/48x48/apps/qtcreator.svg"))));
|
category->setIcon(QIcon::fromTheme(QStringLiteral("qtcreator"), QIcon(QStringLiteral(":/qtutilities/icons/hicolor/48x48/apps/qtcreator.svg"))));
|
||||||
category->assignPages(QList<OptionPage *>() << new QtAppearanceOptionPage(*m_d) << new QtLanguageOptionPage(*m_d) << new QtEnvOptionPage(*m_d));
|
category->assignPages({ new QtAppearanceOptionPage(*m_d), new QtLanguageOptionPage(*m_d), new QtEnvOptionPage(*m_d) });
|
||||||
return category;
|
return category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue