Commit d59e1f13 authored by Matt Lowe's avatar Matt Lowe
Browse files

Refactored Chat Settings tab

- removed heap alloc
parent d02d3ed5
......@@ -572,11 +572,10 @@ void DeckEditorSettingsPage::radioPriceTagSourceClicked(bool checked)
MessagesSettingsPage::MessagesSettingsPage()
{
chatMentionCheckBox = new QCheckBox;
chatMentionCheckBox->setChecked(settingsCache->getChatMention());
connect(chatMentionCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setChatMention(int)));
chatMentionCheckBox.setChecked(settingsCache->getChatMention());
connect(&chatMentionCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setChatMention(int)));
QGridLayout *chatGrid = new QGridLayout;
chatGrid->addWidget(chatMentionCheckBox, 0, 0);
chatGrid->addWidget(&chatMentionCheckBox, 0, 0);
chatGroupBox = new QGroupBox;
chatGroupBox->setLayout(chatGrid);
......@@ -646,7 +645,7 @@ void MessagesSettingsPage::retranslateUi()
aAdd->setText(tr("&Add"));
aRemove->setText(tr("&Remove"));
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"));
}
......
......@@ -158,8 +158,9 @@ private slots:
void actRemove();
private:
QListWidget *messageList;
QAction *aAdd, *aRemove;
QCheckBox *chatMentionCheckBox;
QAction *aAdd;
QAction *aRemove;
QCheckBox chatMentionCheckBox;
QGroupBox *chatGroupBox;
QGroupBox *messageShortcuts;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment