summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtCachedImageScaler.cpp')
-rw-r--r--Swift/QtUI/QtCachedImageScaler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/QtCachedImageScaler.cpp b/Swift/QtUI/QtCachedImageScaler.cpp
index e1f540b..445d113 100644
--- a/Swift/QtUI/QtCachedImageScaler.cpp
+++ b/Swift/QtUI/QtCachedImageScaler.cpp
@@ -15,19 +15,19 @@
#include <Swift/QtUI/QtSwiftUtil.h>
namespace Swift {
QtCachedImageScaler::QtCachedImageScaler() {
}
boost::filesystem::path QtCachedImageScaler::getScaledImage(const boost::filesystem::path& imagePath, int size) {
boost::filesystem::path scaledImagePath(imagePath);
- std::string suffix = "." + boost::lexical_cast<std::string>(size);
+ std::string suffix = "." + std::to_string(size);
scaledImagePath = stringToPath(pathToString(scaledImagePath) + suffix);
if (!boost::filesystem::exists(scaledImagePath)) {
QImage image(P2QSTRING(pathToString(imagePath)));
if (!image.isNull()) {
if (image.width() > size || image.height() > size) {
QImage scaledImage = image.scaled(size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
scaledImage.save(P2QSTRING(pathToString(scaledImagePath)), "PNG");
}
else {