♻️ Moved extern QSettings unique_ptr into its own header.

main
Isabell Pflug 1 year ago
parent d1c389e761
commit 830cc707fa

@ -13,7 +13,8 @@ SOURCES += \
HEADERS += \
mainwindow.hpp \
samegame.hpp
samegame.hpp \
settings.hpp
FORMS += \
mainwindow.ui

@ -1,8 +1,6 @@
#include "mainwindow.hpp"
#include "ui_mainwindow.h"
extern std::unique_ptr<QSettings> settings;
void MainWindow::clearConnected(std::set<std::vector<int>> *connected) {
QString text = "\u2605";
int n = connected->size();

@ -17,6 +17,7 @@
#include <QTextStream>
#include "samegame.hpp"
#include "settings.hpp"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }

@ -1,7 +1,5 @@
#include "samegame.hpp"
extern std::unique_ptr<QSettings> settings;
void SameGame::initialiseGameMatrix(int rows, int columns) {
gameMatrix = std::vector<std::vector<QString>>();

@ -6,6 +6,8 @@
#include <QSettings>
#include <QString>
#include "settings.hpp"
/**
* \brief The SameGame class. Stores the underlying informations of the game grid and its colors. Provides the base game functionality of checking the neighbours of clicked cells.
* The update of the grid though gets triggered from the #MainWindow.

@ -0,0 +1,8 @@
#ifndef SETTINGS_HPP
#define SETTINGS_HPP
#include <QSettings>
extern std::unique_ptr<QSettings> settings;
#endif // SETTINGS_HPP
Loading…
Cancel
Save