summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/QtUI/FreeDesktopNotifier.cpp4
-rw-r--r--Swift/QtUI/QtCachedImageScaler.cpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/FreeDesktopNotifier.cpp b/Swift/QtUI/FreeDesktopNotifier.cpp
index a51e482..1f1ccda 100644
--- a/Swift/QtUI/FreeDesktopNotifier.cpp
+++ b/Swift/QtUI/FreeDesktopNotifier.cpp
@@ -15,6 +15,8 @@
#include <algorithm>
#include <Swiften/Base/Path.h>
+#include <Swift/QtUI/QtSwiftUtil.h>
+
namespace Swift {
FreeDesktopNotifier::FreeDesktopNotifier(const std::string& name) : applicationName(name) {
@@ -44,7 +46,7 @@ void FreeDesktopNotifier::showMessage(Type type, const std::string& subject, con
hints["x-canonical-append"] = QString("allowed");
msg << applicationName.c_str();
msg << quint32(0); // ID of previous notification to replace
- msg << pathToString(imageScaler.getScaledImage(picture, 48)); // Icon to display
+ msg << P2QSTRING(pathToString(imageScaler.getScaledImage(picture, 48))); // Icon to display
msg << subject.c_str(); // Summary / Header of the message to display
msg << body; // Body of the message to display
msg << actions; // Actions from which the user may choose
diff --git a/Swift/QtUI/QtCachedImageScaler.cpp b/Swift/QtUI/QtCachedImageScaler.cpp
index 9b1709b..45375e7 100644
--- a/Swift/QtUI/QtCachedImageScaler.cpp
+++ b/Swift/QtUI/QtCachedImageScaler.cpp
@@ -18,7 +18,8 @@ QtCachedImageScaler::QtCachedImageScaler() {
boost::filesystem::path QtCachedImageScaler::getScaledImage(const boost::filesystem::path& imagePath, int size) {
boost::filesystem::path scaledImagePath(imagePath);
- scaledImagePath += "." + boost::lexical_cast<std::string>(size);
+ std::string suffix = "." + boost::lexical_cast<std::string>(size);
+ scaledImagePath = stringToPath(pathToString(scaledImagePath) + suffix);
if (!boost::filesystem::exists(scaledImagePath)) {
QImage image(P2QSTRING(pathToString(imagePath)));
if (!image.isNull()) {