Refactored Chat Settings tab
- removed heap alloc
This commit is contained in:
parent
d02d3ed521
commit
d59e1f135d
2 changed files with 7 additions and 7 deletions
|
@ -572,11 +572,10 @@ void DeckEditorSettingsPage::radioPriceTagSourceClicked(bool checked)
|
||||||
MessagesSettingsPage::MessagesSettingsPage()
|
MessagesSettingsPage::MessagesSettingsPage()
|
||||||
{
|
{
|
||||||
|
|
||||||
chatMentionCheckBox = new QCheckBox;
|
chatMentionCheckBox.setChecked(settingsCache->getChatMention());
|
||||||
chatMentionCheckBox->setChecked(settingsCache->getChatMention());
|
connect(&chatMentionCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setChatMention(int)));
|
||||||
connect(chatMentionCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setChatMention(int)));
|
|
||||||
QGridLayout *chatGrid = new QGridLayout;
|
QGridLayout *chatGrid = new QGridLayout;
|
||||||
chatGrid->addWidget(chatMentionCheckBox, 0, 0);
|
chatGrid->addWidget(&chatMentionCheckBox, 0, 0);
|
||||||
chatGroupBox = new QGroupBox;
|
chatGroupBox = new QGroupBox;
|
||||||
chatGroupBox->setLayout(chatGrid);
|
chatGroupBox->setLayout(chatGrid);
|
||||||
|
|
||||||
|
@ -646,7 +645,7 @@ void MessagesSettingsPage::retranslateUi()
|
||||||
aAdd->setText(tr("&Add"));
|
aAdd->setText(tr("&Add"));
|
||||||
aRemove->setText(tr("&Remove"));
|
aRemove->setText(tr("&Remove"));
|
||||||
chatGroupBox->setTitle(tr("Chat settings"));
|
chatGroupBox->setTitle(tr("Chat settings"));
|
||||||
chatMentionCheckBox->setText(tr("Enable chat mentions ('@yourusername' in chat log will be highlighted)"));
|
chatMentionCheckBox.setText(tr("Enable chat mentions ('@yourusername' in chat log will be highlighted)"));
|
||||||
messageShortcuts->setTitle(tr("In-game message macros"));
|
messageShortcuts->setTitle(tr("In-game message macros"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,8 +158,9 @@ private slots:
|
||||||
void actRemove();
|
void actRemove();
|
||||||
private:
|
private:
|
||||||
QListWidget *messageList;
|
QListWidget *messageList;
|
||||||
QAction *aAdd, *aRemove;
|
QAction *aAdd;
|
||||||
QCheckBox *chatMentionCheckBox;
|
QAction *aRemove;
|
||||||
|
QCheckBox chatMentionCheckBox;
|
||||||
QGroupBox *chatGroupBox;
|
QGroupBox *chatGroupBox;
|
||||||
QGroupBox *messageShortcuts;
|
QGroupBox *messageShortcuts;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue