| 2543 | |
| 2544 | |
| 2545 | void NoteTable::getRecentlyUpdated(QList< QPair< qint32, QString > > &lids) { |
| 2546 | NSqlQuery query(db); |
| 2547 | lids.clear(); |
| 2548 | db->lockForRead(); |
| 2549 | query.prepare("select lid, title from notetable order by dateupdated desc limit 10"); |
| 2550 | query.exec(); |
| 2551 | while (query.next()) { |
| 2552 | QPair<qint32, QString> pair; |
| 2553 | pair.first = query.value(0).toInt(); |
| 2554 | pair.second = query.value(1).toString(); |
| 2555 | lids.append(pair); |
| 2556 | } |
| 2557 | query.finish(); |
| 2558 | db->unlock(); |
| 2559 | return; |
| 2560 | } |
| 2561 | |
| 2562 | |
| 2563 |
no test coverage detected