These changes allow compilation of gwenview using the KDE craft building system
Details
Diff Detail
- Repository
- R260 Gwenview
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 3667 Build 3685: arc lint + arc unit
Just hijacking this Diff b/c I see several places where this can be improved :)
importer/fileutils.cpp | ||
---|---|---|
147 | This whole function can probably replaced by some usage of QTemporaryDir. | |
lib/mpris2/mpris2service.cpp | ||
88 | QProcess::processId()? | |
lib/slideshow.cpp | ||
73 | Probably the more modern (and cross-platform way to do this) is to use this instead of the RandomNumberGenerator and std::random_shuffle in initShuffledUrls() file: auto generator = std::default_random_engine{}; generator.seed(time(0)); std::shuffle(v.begin(), v.end(), generator); See: https://stackoverflow.com/questions/6926433/how-to-shuffle-a-stdvector (seed() is needed so the random numbers generated by generator are not the same on consecutive runs of the program) | |
73 | Note that rand() without srand() before will generate the same series of random numbers each program run (cf. https://www.geeksforgeeks.org/rand-and-srand-in-ccpp/) -- not what the Unix version here does! | |
tests/auto/timeutilstest.cpp | ||
47 | There's http://doc.qt.io/qt-5/qfiledevice.html#setFileTime since Qt 5.10 -- but this is too recent... So you can probably leave it like that. |