Skip to content

Commit

Permalink
Refactor setList initialization in SetHandler
Browse files Browse the repository at this point in the history
The static initialization of setList has been moved from the header file (sethandler.h) to the implementation file (sethandler.cpp). This change adheres more closely to standard programming practices. Other minor adjustments include the reordering of functions and the removal of unnecessary white space.
  • Loading branch information
BitsAndDroids committed Dec 2, 2023
1 parent 467452e commit c8d44b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion outputmenu/handlers/sethandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <QFile>
#include <QTextStream>
#include <QInputDialog>

QList<Set> *SetHandler::setList = new QList<Set>();
SetHandler::SetHandler() { setList = loadSets(); }

Set *SetHandler::saveSet(Set *setToSave) {
Expand Down
2 changes: 1 addition & 1 deletion outputmenu/handlers/sethandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SetHandler {
SettingsHandler settingsHandler;
OutputHandler *outputHandler = new class OutputHandler();
// QList<Set*> *savedSets = new QList<Set*>();
QList<Set> *setList = new QList<Set>();
static QList<Set> *setList;

void removeOutputFromSet(int setId, int outputId);

Expand Down

0 comments on commit c8d44b5

Please sign in to comment.