Removed unused field from preferences.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-08-19 20:17:51 +03:00
parent 464a54c7ee
commit 03e1256952
5 changed files with 1 additions and 48 deletions

View File

@ -58,7 +58,6 @@ PreferencesPatternPage::PreferencesPatternPage(QWidget *parent)
ui(new Ui::PreferencesPatternPage)
{
ui->setupUi(this);
ui->userName->setText(qApp->ValentinaSettings()->GetUser());
ui->graphOutputCheck->setChecked(qApp->ValentinaSettings()->GetGraphicalOutput());
ui->undoCount->setValue(qApp->ValentinaSettings()->GetUndoCount());
@ -81,7 +80,6 @@ PreferencesPatternPage::~PreferencesPatternPage()
void PreferencesPatternPage::Apply()
{
VSettings *settings = qApp->ValentinaSettings();
settings->SetUser(ui->userName->text());
// Scene antialiasing
settings->SetGraphicalOutput(ui->graphOutputCheck->isChecked());

View File

@ -14,29 +14,6 @@
<string notr="true">Pattern</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>User</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>User name:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="userName">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">

View File

@ -21,7 +21,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">

View File

@ -63,7 +63,6 @@ const QString settingConfigurationConfirmItemDeletion = QStringLiteral("confi
const QString settingConfigurationConfirmFormatRewriting = QStringLiteral("configuration/confirm_format_rewriting");
const QString settingConfigurationToolBarStyle = QStringLiteral("configuration/tool_bar_style");
const QString settingPatternUser = QStringLiteral("pattern/user");
const QString settingPatternUndo = QStringLiteral("pattern/undo");
const QString settingPatternForbidFlipping = QStringLiteral("pattern/forbidFlipping");
const QString settingPatternHideMainPath = QStringLiteral("pattern/hideMainPath");
@ -479,24 +478,6 @@ void VCommonSettings::SetToolBarStyle(const bool &value)
setValue(settingConfigurationToolBarStyle, value);
}
//---------------------------------------------------------------------------------------------------------------------
QString VCommonSettings::GetUser() const
{
QString user;
#ifdef Q_OS_WIN
user = value(settingPatternUser, QString::fromLocal8Bit(qgetenv("USERNAME").constData())).toString();
#else
user = value(settingPatternUser, QString::fromLocal8Bit(qgetenv("USER").constData())).toString();
#endif
return user;
}
//---------------------------------------------------------------------------------------------------------------------
void VCommonSettings::SetUser(const QString &value)
{
setValue(settingPatternUser, value);
}
//---------------------------------------------------------------------------------------------------------------------
int VCommonSettings::GetUndoCount() const
{

View File

@ -100,9 +100,6 @@ public:
bool GetToolBarStyle() const;
void SetToolBarStyle(const bool &value);
QString GetUser() const;
void SetUser(const QString &value);
int GetUndoCount() const;
void SetUndoCount(const int &value);