mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 12:03:55 -07:00
[LayoutSettings] Don't return by const value (#6592)
* [LayoutSettings] Don't return by const value * fix compile failure
This commit is contained in:
parent
804a60f1ea
commit
edc8691731
4 changed files with 32 additions and 32 deletions
|
|
@ -136,7 +136,7 @@ void TabDeckEditor::loadLayout()
|
||||||
{
|
{
|
||||||
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
||||||
|
|
||||||
auto &layoutState = layouts.getDeckEditorLayoutState();
|
auto layoutState = layouts.getDeckEditorLayoutState();
|
||||||
if (layoutState.isNull())
|
if (layoutState.isNull())
|
||||||
restartLayout();
|
restartLayout();
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ void TabDeckEditorVisual::refreshShortcuts()
|
||||||
void TabDeckEditorVisual::loadLayout()
|
void TabDeckEditorVisual::loadLayout()
|
||||||
{
|
{
|
||||||
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
||||||
auto &layoutState = layouts.getDeckEditorLayoutState();
|
auto layoutState = layouts.getDeckEditorLayoutState();
|
||||||
if (layoutState.isNull()) {
|
if (layoutState.isNull()) {
|
||||||
restartLayout();
|
restartLayout();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ QByteArray LayoutsSettings::getMainWindowGeometry()
|
||||||
return getValue(GEOMETRY_PROP, GROUP_MAIN_WINDOW).toByteArray();
|
return getValue(GEOMETRY_PROP, GROUP_MAIN_WINDOW).toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getDeckEditorLayoutState()
|
QByteArray LayoutsSettings::getDeckEditorLayoutState()
|
||||||
{
|
{
|
||||||
return getValue(STATE_PROP, GROUP_DECK_EDITOR).toByteArray();
|
return getValue(STATE_PROP, GROUP_DECK_EDITOR).toByteArray();
|
||||||
}
|
}
|
||||||
|
|
@ -37,7 +37,7 @@ void LayoutsSettings::setDeckEditorLayoutState(const QByteArray &value)
|
||||||
setValue(value, STATE_PROP, GROUP_DECK_EDITOR);
|
setValue(value, STATE_PROP, GROUP_DECK_EDITOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getDeckEditorGeometry()
|
QByteArray LayoutsSettings::getDeckEditorGeometry()
|
||||||
{
|
{
|
||||||
return getValue(GEOMETRY_PROP, GROUP_DECK_EDITOR).toByteArray();
|
return getValue(GEOMETRY_PROP, GROUP_DECK_EDITOR).toByteArray();
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +102,7 @@ void LayoutsSettings::setDeckEditorFilterSize(const QSize &value)
|
||||||
setValue(value, "filter", GROUP_DECK_EDITOR, SIZE_PROP);
|
setValue(value, "filter", GROUP_DECK_EDITOR, SIZE_PROP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getDeckEditorDbHeaderState()
|
QByteArray LayoutsSettings::getDeckEditorDbHeaderState()
|
||||||
{
|
{
|
||||||
return getValue(STATE_PROP, GROUP_DECK_EDITOR_DB, "header").toByteArray();
|
return getValue(STATE_PROP, GROUP_DECK_EDITOR_DB, "header").toByteArray();
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +112,7 @@ void LayoutsSettings::setDeckEditorDbHeaderState(const QByteArray &value)
|
||||||
setValue(value, STATE_PROP, GROUP_DECK_EDITOR_DB, "header");
|
setValue(value, STATE_PROP, GROUP_DECK_EDITOR_DB, "header");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getSetsDialogHeaderState()
|
QByteArray LayoutsSettings::getSetsDialogHeaderState()
|
||||||
{
|
{
|
||||||
return getValue(STATE_PROP, GROUP_SETS_DIALOG, "header").toByteArray();
|
return getValue(STATE_PROP, GROUP_SETS_DIALOG, "header").toByteArray();
|
||||||
}
|
}
|
||||||
|
|
@ -152,17 +152,17 @@ void LayoutsSettings::setGamePlayAreaState(const QByteArray &value)
|
||||||
setValue(value, STATE_PROP, GROUP_GAME_PLAY_AREA);
|
setValue(value, STATE_PROP, GROUP_GAME_PLAY_AREA);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getGamePlayAreaLayoutState()
|
QByteArray LayoutsSettings::getGamePlayAreaLayoutState()
|
||||||
{
|
{
|
||||||
return getValue(STATE_PROP, GROUP_GAME_PLAY_AREA).toByteArray();
|
return getValue(STATE_PROP, GROUP_GAME_PLAY_AREA).toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getGamePlayAreaGeometry()
|
QByteArray LayoutsSettings::getGamePlayAreaGeometry()
|
||||||
{
|
{
|
||||||
return getValue(GEOMETRY_PROP, GROUP_GAME_PLAY_AREA).toByteArray();
|
return getValue(GEOMETRY_PROP, GROUP_GAME_PLAY_AREA).toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSize LayoutsSettings::getGameCardInfoSize()
|
QSize LayoutsSettings::getGameCardInfoSize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("cardInfo", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
QVariant previous = getValue("cardInfo", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
||||||
return previous == QVariant() ? QSize(250, 360) : previous.toSize();
|
return previous == QVariant() ? QSize(250, 360) : previous.toSize();
|
||||||
|
|
@ -173,7 +173,7 @@ void LayoutsSettings::setGameCardInfoSize(const QSize &value)
|
||||||
setValue(value, "cardInfo", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
setValue(value, "cardInfo", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSize LayoutsSettings::getGameMessageLayoutSize()
|
QSize LayoutsSettings::getGameMessageLayoutSize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("messageLayout", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
QVariant previous = getValue("messageLayout", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
||||||
return previous == QVariant() ? QSize(250, 250) : previous.toSize();
|
return previous == QVariant() ? QSize(250, 250) : previous.toSize();
|
||||||
|
|
@ -184,7 +184,7 @@ void LayoutsSettings::setGameMessageLayoutSize(const QSize &value)
|
||||||
setValue(value, "messageLayout", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
setValue(value, "messageLayout", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSize LayoutsSettings::getGamePlayerListSize()
|
QSize LayoutsSettings::getGamePlayerListSize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("playerList", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
QVariant previous = getValue("playerList", GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
||||||
return previous == QVariant() ? QSize(250, 50) : previous.toSize();
|
return previous == QVariant() ? QSize(250, 50) : previous.toSize();
|
||||||
|
|
@ -205,17 +205,17 @@ void LayoutsSettings::setReplayPlayAreaState(const QByteArray &value)
|
||||||
setValue(value, STATE_PROP, GROUP_REPLAY_PLAY_AREA);
|
setValue(value, STATE_PROP, GROUP_REPLAY_PLAY_AREA);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getReplayPlayAreaLayoutState()
|
QByteArray LayoutsSettings::getReplayPlayAreaLayoutState()
|
||||||
{
|
{
|
||||||
return getValue(STATE_PROP, GROUP_REPLAY_PLAY_AREA).toByteArray();
|
return getValue(STATE_PROP, GROUP_REPLAY_PLAY_AREA).toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray LayoutsSettings::getReplayPlayAreaGeometry()
|
QByteArray LayoutsSettings::getReplayPlayAreaGeometry()
|
||||||
{
|
{
|
||||||
return getValue(GEOMETRY_PROP, GROUP_REPLAY_PLAY_AREA).toByteArray();
|
return getValue(GEOMETRY_PROP, GROUP_REPLAY_PLAY_AREA).toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSize LayoutsSettings::getReplayCardInfoSize()
|
QSize LayoutsSettings::getReplayCardInfoSize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("cardInfo", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
QVariant previous = getValue("cardInfo", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||||
return previous == QVariant() ? QSize(250, 360) : previous.toSize();
|
return previous == QVariant() ? QSize(250, 360) : previous.toSize();
|
||||||
|
|
@ -226,7 +226,7 @@ void LayoutsSettings::setReplayCardInfoSize(const QSize &value)
|
||||||
setValue(value, "cardInfo", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
setValue(value, "cardInfo", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSize LayoutsSettings::getReplayMessageLayoutSize()
|
QSize LayoutsSettings::getReplayMessageLayoutSize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("messageLayout", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
QVariant previous = getValue("messageLayout", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||||
return previous == QVariant() ? QSize(250, 200) : previous.toSize();
|
return previous == QVariant() ? QSize(250, 200) : previous.toSize();
|
||||||
|
|
@ -237,7 +237,7 @@ void LayoutsSettings::setReplayMessageLayoutSize(const QSize &value)
|
||||||
setValue(value, "messageLayout", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
setValue(value, "messageLayout", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSize LayoutsSettings::getReplayPlayerListSize()
|
QSize LayoutsSettings::getReplayPlayerListSize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("playerList", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
QVariant previous = getValue("playerList", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||||
return previous == QVariant() ? QSize(250, 50) : previous.toSize();
|
return previous == QVariant() ? QSize(250, 50) : previous.toSize();
|
||||||
|
|
@ -248,7 +248,7 @@ void LayoutsSettings::setReplayPlayerListSize(const QSize &value)
|
||||||
setValue(value, "playerList", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
setValue(value, "playerList", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSize LayoutsSettings::getReplayReplaySize()
|
QSize LayoutsSettings::getReplayReplaySize()
|
||||||
{
|
{
|
||||||
QVariant previous = getValue("replay", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
QVariant previous = getValue("replay", GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||||
return previous == QVariant() ? QSize(900, 100) : previous.toSize();
|
return previous == QVariant() ? QSize(900, 100) : previous.toSize();
|
||||||
|
|
|
||||||
|
|
@ -46,30 +46,30 @@ public:
|
||||||
|
|
||||||
QByteArray getMainWindowGeometry();
|
QByteArray getMainWindowGeometry();
|
||||||
|
|
||||||
const QByteArray getDeckEditorLayoutState();
|
QByteArray getDeckEditorLayoutState();
|
||||||
const QByteArray getDeckEditorGeometry();
|
QByteArray getDeckEditorGeometry();
|
||||||
QSize getDeckEditorCardDatabaseSize();
|
QSize getDeckEditorCardDatabaseSize();
|
||||||
QSize getDeckEditorCardSize();
|
QSize getDeckEditorCardSize();
|
||||||
QSize getDeckEditorDeckSize();
|
QSize getDeckEditorDeckSize();
|
||||||
QSize getDeckEditorPrintingSelectorSize();
|
QSize getDeckEditorPrintingSelectorSize();
|
||||||
QSize getDeckEditorFilterSize();
|
QSize getDeckEditorFilterSize();
|
||||||
const QByteArray getDeckEditorDbHeaderState();
|
QByteArray getDeckEditorDbHeaderState();
|
||||||
const QByteArray getSetsDialogHeaderState();
|
QByteArray getSetsDialogHeaderState();
|
||||||
QByteArray getSetsDialogGeometry();
|
QByteArray getSetsDialogGeometry();
|
||||||
QByteArray getTokenDialogGeometry();
|
QByteArray getTokenDialogGeometry();
|
||||||
|
|
||||||
const QByteArray getGamePlayAreaLayoutState();
|
QByteArray getGamePlayAreaLayoutState();
|
||||||
const QByteArray getGamePlayAreaGeometry();
|
QByteArray getGamePlayAreaGeometry();
|
||||||
const QSize getGameCardInfoSize();
|
QSize getGameCardInfoSize();
|
||||||
const QSize getGameMessageLayoutSize();
|
QSize getGameMessageLayoutSize();
|
||||||
const QSize getGamePlayerListSize();
|
QSize getGamePlayerListSize();
|
||||||
|
|
||||||
const QByteArray getReplayPlayAreaLayoutState();
|
QByteArray getReplayPlayAreaLayoutState();
|
||||||
const QByteArray getReplayPlayAreaGeometry();
|
QByteArray getReplayPlayAreaGeometry();
|
||||||
const QSize getReplayCardInfoSize();
|
QSize getReplayCardInfoSize();
|
||||||
const QSize getReplayMessageLayoutSize();
|
QSize getReplayMessageLayoutSize();
|
||||||
const QSize getReplayPlayerListSize();
|
QSize getReplayPlayerListSize();
|
||||||
const QSize getReplayReplaySize();
|
QSize getReplayReplaySize();
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue