Profile update
ClosedPublic

Authored by rizzitello on Jun 3 2018, 8:12 PM.

Details

Summary

Update instance when profile changes. update temps if that changes
Signed-off-by: Chris Rizzitello <rizzitello@kde.org>

Diff Detail

Repository
R231 Atelier
Branch
updateProfiles
Lint
No Linters Available
Unit
No Unit Test Coverage
rizzitello requested review of this revision.Jun 3 2018, 8:12 PM
rizzitello created this revision.
laysrodrigues requested changes to this revision.Jun 3 2018, 8:31 PM
laysrodrigues added inline comments.
src/widgets/atcoreinstancewidget.cpp
214–215

use that directly to profileData

This revision now requires changes to proceed.Jun 3 2018, 8:31 PM
rizzitello added inline comments.Jun 3 2018, 8:59 PM
src/widgets/atcoreinstancewidget.cpp
214–215

we need the bps value for our connection attempt.
Its not our loaded profile at this point.

Its just a wait of time use data var.

src/widgets/atcoreinstancewidget.cpp
214–215

profileData = readProfile();

216–217

profileData["bps"].toInt()

rizzitello marked 4 inline comments as done.Jun 3 2018, 9:39 PM
rizzitello updated this revision to Diff 35490.Jun 3 2018, 9:40 PM
  • Lays' suggestions
laysrodrigues accepted this revision.Jun 3 2018, 10:13 PM
This revision is now accepted and ready to land.Jun 3 2018, 10:13 PM
tcanabrava accepted this revision.Jun 5 2018, 12:08 PM
tcanabrava added inline comments.
src/widgets/atcoreinstancewidget.cpp
558–559

Uneeded, the groups will be closed on return.

I don't like how the map is being created in runtime, we can create a QMap in buildtime:

return QMap<QString, QVariant>{

{"bps" , m_settings.value(QStringLiteral("bps"), QStringLiteral("115200")},
{"bedTemp", blah},

};

rizzitello updated this revision to Diff 35617.Jun 5 2018, 1:49 PM
  • Tomaz suggestion
rizzitello marked an inline comment as done.Jun 5 2018, 1:49 PM
rizzitello updated this revision to Diff 35618.Jun 5 2018, 1:50 PM
  • rm closeGroups
tcanabrava added inline comments.Jun 5 2018, 2:10 PM
src/widgets/atcoreinstancewidget.cpp
550

why static?
if it's static you are only creating it once, but if I change the profile, the new values are the ones that matter.

rizzitello updated this revision to Diff 35620.Jun 5 2018, 2:14 PM
  • not static
rizzitello marked an inline comment as done.Jun 5 2018, 2:19 PM
rizzitello updated this revision to Diff 35621.Jun 5 2018, 2:20 PM
  • remove new empty line
rizzitello closed this revision.Jun 5 2018, 3:52 PM