diff --git a/retroshare-gui/src/gui/chat/ChatStyle.cpp b/retroshare-gui/src/gui/chat/ChatStyle.cpp index 6f9fa3a51..1ae88feed 100644 --- a/retroshare-gui/src/gui/chat/ChatStyle.cpp +++ b/retroshare-gui/src/gui/chat/ChatStyle.cpp @@ -411,8 +411,7 @@ static bool getStyleInfo(QString stylePath, QString stylePathRelative, ChatStyle static QString getBaseDir() { // application path - std::string configDir = RsInit::RsConfigDirectory(); - QString baseDir = QString::fromStdString(configDir); + QString baseDir = QString::fromUtf8(RsInit::RsConfigDirectory().c_str()); #ifdef WIN32 if (RsInit::isPortable ()) { diff --git a/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp b/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp index e111c81aa..95ed45666 100644 --- a/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp +++ b/retroshare-gui/src/gui/settings/RsharePeerSettings.cpp @@ -34,7 +34,7 @@ #include "gui/style/RSStyle.h" /** The file in which all settings of he peers will read and written. */ -#define SETTINGS_FILE (RsInit::RsProfileConfigDirectory() + "/RSPeers.conf") +#define SETTINGS_FILE (QString::fromUtf8(RsInit::RsProfileConfigDirectory().c_str()) + "/RSPeers.conf") /* clean dead gpg id's after these days */ #define DAYS_TO_CLEAN 7 @@ -54,7 +54,7 @@ RsharePeerSettings *PeerSettings = NULL; /** Default Constructor */ RsharePeerSettings::RsharePeerSettings() - : QSettings(QString::fromStdString(SETTINGS_FILE), QSettings::IniFormat) + : QSettings(SETTINGS_FILE, QSettings::IniFormat) { cleanDeadGpgIds(); } diff --git a/retroshare-gui/src/gui/settings/rsettings.cpp b/retroshare-gui/src/gui/settings/rsettings.cpp index 643dcaa8a..bec614976 100644 --- a/retroshare-gui/src/gui/settings/rsettings.cpp +++ b/retroshare-gui/src/gui/settings/rsettings.cpp @@ -27,11 +27,11 @@ #include /** The file in which all settings will read and written. */ -#define SETTINGS_FILE (RsInit::RsProfileConfigDirectory() + "/RetroShare.conf") +#define SETTINGS_FILE (QString::fromUtf8(RsInit::RsProfileConfigDirectory().c_str()) + "/RetroShare.conf") /** Constructor */ RSettings::RSettings(const QString settingsGroup) -: QSettings(QString::fromStdString(SETTINGS_FILE), QSettings::IniFormat) +: QSettings(SETTINGS_FILE, QSettings::IniFormat) { std::string sPreferedId; m_bValid = RsInit::getPreferedAccountId(sPreferedId); @@ -114,7 +114,7 @@ void RSettings::reset() { /* Static method, so we have to create a QSettings object. */ - QSettings settings(QString::fromStdString(SETTINGS_FILE), QSettings::IniFormat); + QSettings settings(SETTINGS_FILE, QSettings::IniFormat); settings.clear(); } diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index 93dfee507..0782254be 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) /* Setup The GUI Stuff */ Rshare rshare(args, argc, argv, - QString::fromStdString(RsInit::RsConfigDirectory())); + QString::fromUtf8(RsInit::RsConfigDirectory().c_str())); std::string url = RsInit::getRetroShareLink(); if (!url.empty()) {