Browse Source

Fix a bug of missing the additional row added at run-time.

AOYAMA Kazuharu 11 years ago
parent
commit
d963c19ad4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      treefrog/controllers/fortunecontroller.cpp

+ 3 - 0
treefrog/controllers/fortunecontroller.cpp

@@ -13,6 +13,9 @@ FortuneController::FortuneController(const FortuneController &)
 void FortuneController::index()
 {
     QList<Fortune> fortuneList = Fortune::getAll();
+    Fortune fortune;
+    fortune.setMessage(QLatin1String("Additional fortune added at request time."));
+    fortuneList << fortune;
     // Sort
     qSort(fortuneList.begin(), fortuneList.end(), caseSensitiveLessThan);
     texport(fortuneList);