mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Refactred settings to use settingscache & ini files
This commit is contained in:
parent
9c28cdd1f5
commit
c8d59eec5e
29 changed files with 780 additions and 241 deletions
|
|
@ -20,7 +20,6 @@
|
|||
#include "color.h"
|
||||
#include "deck_loader.h"
|
||||
#include "main.h"
|
||||
#include <QSettings>
|
||||
#include <QPainter>
|
||||
#include <QMenu>
|
||||
#include <QDebug>
|
||||
|
|
@ -832,12 +831,10 @@ void Player::initSayMenu()
|
|||
{
|
||||
sayMenu->clear();
|
||||
|
||||
QSettings settings;
|
||||
settings.beginGroup("messages");
|
||||
int count = settings.value("count", 0).toInt();
|
||||
int count = settingsCache->messages().getCount();
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
QAction *newAction = new QAction(settings.value(QString("msg%1").arg(i)).toString(), this);
|
||||
QAction *newAction = new QAction(settingsCache->messages().getMessageAt(i), this);
|
||||
if (i <= 10){
|
||||
newAction->setShortcut(QKeySequence("Ctrl+" + QString::number((i + 1) % 10)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue