forked from qt-creator/qt-creator
CppTools: Move CppFilesSettingsPage closer to new setup
Including some drive-by cosmetics. Change-Id: Id9cdba68545907b099a70944c83fe17ad3c0b2a0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -27,10 +27,6 @@
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
#include <QPointer>
|
||||
#include <QSharedPointer>
|
||||
#include <QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSettings;
|
||||
QT_END_NAMESPACE
|
||||
@@ -38,8 +34,6 @@ QT_END_NAMESPACE
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
|
||||
namespace Ui { class CppFileSettingsPage; }
|
||||
|
||||
struct CppFileSettings
|
||||
{
|
||||
QStringList headerPrefixes;
|
||||
@@ -65,37 +59,10 @@ struct CppFileSettings
|
||||
bool operator!=(const CppFileSettings &s) const { return !equals(s); }
|
||||
};
|
||||
|
||||
class CppFileSettingsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CppFileSettingsWidget();
|
||||
~CppFileSettingsWidget() override;
|
||||
|
||||
CppFileSettings settings() const;
|
||||
void setSettings(const CppFileSettings &s);
|
||||
|
||||
private:
|
||||
void slotEdit();
|
||||
QString licenseTemplatePath() const;
|
||||
void setLicenseTemplatePath(const QString &);
|
||||
|
||||
Ui::CppFileSettingsPage *m_ui;
|
||||
};
|
||||
|
||||
class CppFileSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
explicit CppFileSettingsPage(QSharedPointer<CppFileSettings> &settings);
|
||||
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
void finish() override;
|
||||
|
||||
private:
|
||||
const QSharedPointer<CppFileSettings> m_settings;
|
||||
QPointer<CppFileSettingsWidget> m_widget;
|
||||
explicit CppFileSettingsPage(CppFileSettings *settings);
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user