Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings manager: Create a class to manage all shared settings #206

Merged

Conversation

patrickelectric
Copy link
Member

@patrickelectric patrickelectric commented Jul 3, 2018

Fix #205
Will help #199
Fix #42

src/logger.cpp Outdated
@@ -42,7 +34,7 @@ void Logger::installHandler()
originalHandler = qInstallMessageHandler(handleMessage); // This function returns the previous message handler

if (qEnvironmentVariableIsEmpty("QT_MESSAGE_PATTERN")) {
qSetMessagePattern(QStringLiteral("%{time [hh:mm:ss.zzz]} %{message}"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was adding this hunk intentional? What does this do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops, my bad, I was using a personal pattern while debugging.

@@ -115,7 +114,6 @@ class Logger : public QObject
QFile _file;
QTextStream _fileStream;
QStringList _registeredCategories;
QSettings _settings;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we assign SettingsManager::self()->settings() to a member _settings, and use that everywhere for better readability?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, Will do that

Copy link
Member

@jaxxzer jaxxzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @patrickelectric!

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@patrickelectric patrickelectric force-pushed the settings_manager branch 3 times, most recently from ebb708c to b3487f7 Compare July 5, 2018 17:44
@patrickelectric patrickelectric merged commit 1205b37 into bluerobotics:master Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants