Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/sql/mymoneystoragesql.cpp
Show First 20 Lines • Show All 2525 Lines • ▼ Show 20 Line(s) | 2518 | { | |||
---|---|---|---|---|---|
2526 | int xmlCol = t.fieldNumber("XML"); | 2526 | int xmlCol = t.fieldNumber("XML"); | ||
2527 | QMap<QString, MyMoneyReport> rList; | 2527 | QMap<QString, MyMoneyReport> rList; | ||
2528 | while (query.next()) { | 2528 | while (query.next()) { | ||
2529 | QDomDocument dom; | 2529 | QDomDocument dom; | ||
2530 | dom.setContent(GETSTRING(xmlCol), false); | 2530 | dom.setContent(GETSTRING(xmlCol), false); | ||
2531 | 2531 | | |||
2532 | QDomNode child = dom.firstChild(); | 2532 | QDomNode child = dom.firstChild(); | ||
2533 | child = child.firstChild(); | 2533 | child = child.firstChild(); | ||
2534 | MyMoneyReport report; | 2534 | auto report = MyMoneyXmlContentHandler2::readReport(child.toElement()); | ||
2535 | | ||||
2536 | if (report.read(child.toElement())) | | |||
2537 | rList[report.id()] = report; | 2535 | rList[report.id()] = report; | ||
2538 | 2536 | | |||
2539 | d->signalProgress(++progress, 0); | 2537 | d->signalProgress(++progress, 0); | ||
2540 | } | 2538 | } | ||
2541 | return rList; | 2539 | return rList; | ||
2542 | } | 2540 | } | ||
2543 | 2541 | | |||
2544 | QMap<QString, MyMoneyReport> MyMoneyStorageSql::fetchReports() const | 2542 | QMap<QString, MyMoneyReport> MyMoneyStorageSql::fetchReports() const | ||
Show All 23 Lines | 2548 | { | |||
2568 | QMap<QString, MyMoneyBudget> budgets; | 2566 | QMap<QString, MyMoneyBudget> budgets; | ||
2569 | int xmlCol = t.fieldNumber("XML"); | 2567 | int xmlCol = t.fieldNumber("XML"); | ||
2570 | while (query.next()) { | 2568 | while (query.next()) { | ||
2571 | QDomDocument dom; | 2569 | QDomDocument dom; | ||
2572 | dom.setContent(GETSTRING(xmlCol), false); | 2570 | dom.setContent(GETSTRING(xmlCol), false); | ||
2573 | 2571 | | |||
2574 | QDomNode child = dom.firstChild(); | 2572 | QDomNode child = dom.firstChild(); | ||
2575 | child = child.firstChild(); | 2573 | child = child.firstChild(); | ||
2576 | MyMoneyBudget budget(child.toElement()); | 2574 | auto budget = MyMoneyXmlContentHandler2::readBudget(child.toElement()); | ||
2577 | budgets.insert(budget.id(), budget); | 2575 | budgets.insert(budget.id(), budget); | ||
2578 | d->signalProgress(++progress, 0); | 2576 | d->signalProgress(++progress, 0); | ||
2579 | } | 2577 | } | ||
2580 | return budgets; | 2578 | return budgets; | ||
2581 | } | 2579 | } | ||
2582 | 2580 | | |||
2583 | QMap<QString, MyMoneyBudget> MyMoneyStorageSql::fetchBudgets() const | 2581 | QMap<QString, MyMoneyBudget> MyMoneyStorageSql::fetchBudgets() const | ||
2584 | { | 2582 | { | ||
▲ Show 20 Lines • Show All 315 Lines • Show Last 20 Lines |