forked from qt-creator/qt-creator
CMake: Some cosmetics to move closer to default style
Change-Id: If2c36eda6157e5dd78abf4f25029ecfd153e228a Reviewed-by: pawelrutka <prutka13@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -29,9 +29,7 @@
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
const char PROJECT_TYPE_ICON[] = ":/cmakeproject/images/project_type_settings_icon.png";
|
||||
}
|
||||
|
||||
CMakeSpecificSettingWidget::CMakeSpecificSettingWidget(QWidget *parent):
|
||||
QWidget(parent)
|
||||
@@ -55,10 +53,9 @@ CMakeSpecificSettings CMakeSpecificSettingWidget::settings() const
|
||||
CMakeSpecificSettings set;
|
||||
|
||||
int popupSetting = m_ui.newFileAddedCopyToCpliSettingGroup->checkedId();
|
||||
set.setAfterAddFileSetting( (popupSetting == -1) ? AfterAddFileAction::ASK_USER :
|
||||
static_cast<AfterAddFileAction>(popupSetting));
|
||||
set.setAfterAddFileSetting(popupSetting == -1 ? AfterAddFileAction::ASK_USER
|
||||
: static_cast<AfterAddFileAction>(popupSetting));
|
||||
return set;
|
||||
|
||||
}
|
||||
|
||||
void CMakeSpecificSettingWidget::setProjectPopupSetting(AfterAddFileAction mode)
|
||||
@@ -78,7 +75,7 @@ void CMakeSpecificSettingWidget::setProjectPopupSetting(AfterAddFileAction mode)
|
||||
|
||||
CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *settings,
|
||||
QObject *parent):
|
||||
Core::IOptionsPage{parent}, m_settings{settings}
|
||||
Core::IOptionsPage(parent), m_settings(settings)
|
||||
{
|
||||
setCategory("ProjectTypeSettingsPage");
|
||||
setDisplayName("Project-Type Settings");
|
||||
@@ -103,8 +100,7 @@ void CMakeSpecificSettingsPage::apply()
|
||||
const CMakeSpecificSettings newSettings = m_widget->settings();
|
||||
*m_settings = newSettings;
|
||||
m_settings->toSettings(Core::ICore::settings());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // Internal
|
||||
} // CMakeProjectManager
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include "cmakespecificsettings.h"
|
||||
#include "ui_cmakespecificsettingspage.h"
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
class CMakeSpecificSettingWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -50,7 +50,6 @@ private:
|
||||
void setProjectPopupSetting(AfterAddFileAction mode);
|
||||
};
|
||||
|
||||
|
||||
class CMakeSpecificSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
@@ -65,7 +64,5 @@ private:
|
||||
QPointer<CMakeSpecificSettingWidget> m_widget;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // Internal
|
||||
} // CMakeProjectManager
|
||||
|
||||
Reference in New Issue
Block a user