Fixed some more utf8 issues with umlauts in the Windows user name.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4636 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-10-12 23:36:25 +00:00
parent 7e3a342a9a
commit 7a98e83df1
4 changed files with 7 additions and 8 deletions

View File

@ -411,8 +411,7 @@ static bool getStyleInfo(QString stylePath, QString stylePathRelative, ChatStyle
static QString getBaseDir() static QString getBaseDir()
{ {
// application path // application path
std::string configDir = RsInit::RsConfigDirectory(); QString baseDir = QString::fromUtf8(RsInit::RsConfigDirectory().c_str());
QString baseDir = QString::fromStdString(configDir);
#ifdef WIN32 #ifdef WIN32
if (RsInit::isPortable ()) { if (RsInit::isPortable ()) {

View File

@ -34,7 +34,7 @@
#include "gui/style/RSStyle.h" #include "gui/style/RSStyle.h"
/** The file in which all settings of he peers will read and written. */ /** 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 */ /* clean dead gpg id's after these days */
#define DAYS_TO_CLEAN 7 #define DAYS_TO_CLEAN 7
@ -54,7 +54,7 @@ RsharePeerSettings *PeerSettings = NULL;
/** Default Constructor */ /** Default Constructor */
RsharePeerSettings::RsharePeerSettings() RsharePeerSettings::RsharePeerSettings()
: QSettings(QString::fromStdString(SETTINGS_FILE), QSettings::IniFormat) : QSettings(SETTINGS_FILE, QSettings::IniFormat)
{ {
cleanDeadGpgIds(); cleanDeadGpgIds();
} }

View File

@ -27,11 +27,11 @@
#include <retroshare/rsinit.h> #include <retroshare/rsinit.h>
/** The file in which all settings will read and written. */ /** 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 */ /** Constructor */
RSettings::RSettings(const QString settingsGroup) RSettings::RSettings(const QString settingsGroup)
: QSettings(QString::fromStdString(SETTINGS_FILE), QSettings::IniFormat) : QSettings(SETTINGS_FILE, QSettings::IniFormat)
{ {
std::string sPreferedId; std::string sPreferedId;
m_bValid = RsInit::getPreferedAccountId(sPreferedId); m_bValid = RsInit::getPreferedAccountId(sPreferedId);
@ -114,7 +114,7 @@ void
RSettings::reset() RSettings::reset()
{ {
/* Static method, so we have to create a QSettings object. */ /* 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(); settings.clear();
} }

View File

@ -107,7 +107,7 @@ int main(int argc, char *argv[])
/* Setup The GUI Stuff */ /* Setup The GUI Stuff */
Rshare rshare(args, argc, argv, Rshare rshare(args, argc, argv,
QString::fromStdString(RsInit::RsConfigDirectory())); QString::fromUtf8(RsInit::RsConfigDirectory().c_str()));
std::string url = RsInit::getRetroShareLink(); std::string url = RsInit::getRetroShareLink();
if (!url.empty()) { if (!url.empty()) {