Commit e2a5bc7ee4bb4aba41c3559b0dd9ab35fb9ea3ea
1 parent
ee6f9bbc
s/p/progress/ also remove the key after it is read in ProgressCounter
Showing
2 changed files
with
8 additions
and
7 deletions
openbr/plugins/gallery.cpp
| ... | ... | @@ -128,7 +128,7 @@ class galGallery : public Gallery |
| 128 | 128 | Template m; |
| 129 | 129 | stream >> m; |
| 130 | 130 | templates.append(m); |
| 131 | - templates.last().file.set("p", totalSize()); | |
| 131 | + templates.last().file.set("progress", totalSize()); | |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | *done = stream.atEnd(); |
| ... | ... | @@ -365,7 +365,7 @@ class memGallery : public Gallery |
| 365 | 365 | |
| 366 | 366 | TemplateList templates = MemoryGalleries::galleries[file].mid(block*readBlockSize, readBlockSize); |
| 367 | 367 | for (qint64 i = 0; i < templates.size();i++) { |
| 368 | - templates[i].file.set("p", i + block * readBlockSize); | |
| 368 | + templates[i].file.set("progress", i + block * readBlockSize); | |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | *done = (templates.size() < readBlockSize); |
| ... | ... | @@ -556,7 +556,7 @@ class csvGallery : public FileGallery |
| 556 | 556 | else fi.set(headers[j], words[j]); |
| 557 | 557 | } |
| 558 | 558 | templates.append(fi); |
| 559 | - templates.last().file.set("p", f.pos()); | |
| 559 | + templates.last().file.set("progress", f.pos()); | |
| 560 | 560 | } |
| 561 | 561 | *done = f.atEnd(); |
| 562 | 562 | |
| ... | ... | @@ -635,7 +635,7 @@ class txtGallery : public FileGallery |
| 635 | 635 | int splitIndex = line.lastIndexOf(' '); |
| 636 | 636 | if (splitIndex == -1) templates.append(File(line)); |
| 637 | 637 | else templates.append(File(line.mid(0, splitIndex), line.mid(splitIndex+1))); |
| 638 | - templates.last().file.set("p", this->position()); | |
| 638 | + templates.last().file.set("progress", this->position()); | |
| 639 | 639 | } |
| 640 | 640 | |
| 641 | 641 | if (f.atEnd()) { |
| ... | ... | @@ -682,7 +682,7 @@ class flatGallery : public FileGallery |
| 682 | 682 | |
| 683 | 683 | if (!line.isEmpty()) { |
| 684 | 684 | templates.append(File(QString::fromLocal8Bit(line).trimmed())); |
| 685 | - templates.last().file.set("p", this->position()); | |
| 685 | + templates.last().file.set("progress", this->position()); | |
| 686 | 686 | } |
| 687 | 687 | |
| 688 | 688 | if (f.atEnd()) { |
| ... | ... | @@ -782,7 +782,7 @@ class xmlGallery : public FileGallery |
| 782 | 782 | } |
| 783 | 783 | } |
| 784 | 784 | templates.last().file.setRects(rects); |
| 785 | - templates.last().file.set("p", f.pos()); | |
| 785 | + templates.last().file.set("progress", f.pos()); | |
| 786 | 786 | |
| 787 | 787 | count++; |
| 788 | 788 | if (count >= this->readBlockSize) { | ... | ... |
openbr/plugins/misc.cpp
| ... | ... | @@ -518,7 +518,8 @@ class ProgressCounterTransform : public TimeVaryingTransform |
| 518 | 518 | qint64 elapsed = timer.elapsed(); |
| 519 | 519 | |
| 520 | 520 | if (!dst.empty()) { |
| 521 | - Globals->currentProgress = dst.last().file.get<qint64>("p",0); | |
| 521 | + Globals->currentProgress = dst.last().file.get<qint64>("progress",0); | |
| 522 | + dst.last().file.remove("progress"); | |
| 522 | 523 | Globals->currentStep++; |
| 523 | 524 | } |
| 524 | 525 | ... | ... |