Mercurial > dedupe
comparison DBCache.hpp @ 23:5d14d8c2c299
Fix to support other stringtypes than QString.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Wed, 05 Sep 2012 21:56:06 +0200 |
| parents | 06166d6c083b |
| children | bf3dce7fedcb |
comparison
equal
deleted
inserted
replaced
| 22:d62f708ad88b | 23:5d14d8c2c299 |
|---|---|
| 158 } | 158 } |
| 159 | 159 |
| 160 static void bindValues(QSqlQuery& query, const QList<UniqueString>& values, const QString& prefix = QString()) | 160 static void bindValues(QSqlQuery& query, const QList<UniqueString>& values, const QString& prefix = QString()) |
| 161 { | 161 { |
| 162 QVariantList list; | 162 QVariantList list; |
| 163 foreach(const QString& value, values) { | 163 foreach(const UniqueString& value, values) { |
| 164 list << value; | 164 list << static_cast<const QString>(value); |
| 165 } | 165 } |
| 166 bindValues(query, list, prefix); | 166 bindValues(query, list, prefix); |
| 167 } | 167 } |
| 168 | 168 |
| 169 static boost::optional<QString> extract(QSqlQuery& query, const QString& prefix = QString()) | 169 static boost::optional<QString> extract(QSqlQuery& query, const QString& prefix = QString()) |
