summaryrefslogtreecommitdiffstats
path: root/picfilesmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'picfilesmodel.cpp')
-rw-r--r--picfilesmodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/picfilesmodel.cpp b/picfilesmodel.cpp
index 313c5a5..36d37c5 100644
--- a/picfilesmodel.cpp
+++ b/picfilesmodel.cpp
@@ -29,7 +29,7 @@ PicFilesModel::PicFilesModel(const QStringList &headers, QObject *parent) : SmTr
void PicFilesModel::setMapping(int pMapId){
QList<QVariant> ids = mMappingTreeModel->childList(pMapId, MappingTreeModel::MappingId);
mMappingIds.clear();
- for(QVariant i : ids){
+ for(const auto &i : ids){
mMappingIds << i.toInt();
}
}
@@ -89,7 +89,7 @@ QList<QVariant> PicFilesModel::dataList(const QModelIndex &idx){
}
QList<MappingData> mapData = mappingDataFromFile(idx.data(PicFilesModel::IdRole).toInt());
QList<QStringList> mappings;
- for(MappingData d : mapData){
+ for(const auto &d : mapData){
mappings << d.path;
}
@@ -145,7 +145,7 @@ bool PicFilesModel::changeMappings(const QList<int> &fileIds, const QList<QVaria
if(!deleteMappingsQ.exec()){
goto error;
}
- for(QVariant pid : parentIds){
+ for(const auto &pid : parentIds){
addMappingsQ.bindValue(":pid", fid);
addMappingsQ.bindValue(":id", pid);
if(!addMappingsQ.exec()){
@@ -329,7 +329,7 @@ void PicFilesModel::selectFromRecent(int days){
void PicFilesModel::selectFromSelection(QList<QVariant> ids){
mAllPics.clear();
QStringList idQS;
- for(QVariant i : ids){
+ for(const auto &i: ids){
idQS << QString::number(i.toInt());
}
QString inPart = idQS.join(',');