From 216300dc1ae252ed517a5d9c2879cf94321a5b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= Date: Sat, 1 Oct 2016 16:21:25 -0400 Subject: Actually iterate over rows in UserProfileForm::get_number_conversions() --- src/gui/userprofileform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/userprofileform.cpp b/src/gui/userprofileform.cpp index 788d87b..c172415 100644 --- a/src/gui/userprofileform.cpp +++ b/src/gui/userprofileform.cpp @@ -707,9 +707,9 @@ list UserProfileForm::get_number_conversions() t_number_conversion c; try { - item = conversionListView->item(0, 0); + item = conversionListView->item(i, 0); c.re.assign(item->text().toStdString()); - item = conversionListView->item(0, 1); + item = conversionListView->item(i, 1); c.fmt = item->text().toStdString(); conversions.push_back(c); } catch (std::regex_error) { -- cgit v1.2.3 From 52c818202c3ad252ef29a7f2706ad374e03be3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= Date: Sat, 1 Oct 2016 16:21:43 -0400 Subject: Display number conversions in forward order for UserProfileForm --- src/gui/userprofileform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/userprofileform.cpp b/src/gui/userprofileform.cpp index c172415..c5d6b41 100644 --- a/src/gui/userprofileform.cpp +++ b/src/gui/userprofileform.cpp @@ -596,7 +596,7 @@ void UserProfileForm::populate() conversionListView->setRowCount(conversions.size()); int j = 0; - for (list::reverse_iterator i = conversions.rbegin(); i != conversions.rend(); i++, j++) + for (list::iterator i = conversions.begin(); i != conversions.end(); i++, j++) { QTableWidgetItem* item = new QTableWidgetItem(QString::fromStdString(i->re)); conversionListView->setItem(j, 0, item); -- cgit v1.2.3