# HG changeset patch
# User koma...@a05-0904a
# Date 1239485334 -7200
# Node ID d2fd2e1fcbb281bae0a5f29c82df676c90388e56
# Parent 6327dab55e1f92ff83d80b0f8c059ec25a3e147d
this patch should solve this
with windows login like etc. "Marek Mièulka" qutecom does not save profile
error message
"Your profile could not be loaded. Choose another profile or create a new one"
the problem is in
- characters like "è"
feedback welcomed
diff -r 6327dab55e1f -r d2fd2e1fcbb2 wengophone/src/presentation/main.cpp
--- a/wengophone/src/presentation/main.cpp Wed Apr 08 18:32:58 2009 +0200
+++ b/wengophone/src/presentation/main.cpp Sat Apr 11 23:28:54 2009 +0200
@@ -28,7 +28,7 @@
#include <model/config/StartupSettingListener.h>
#include <model/classic/ClassicExterminator.h>
#include <model/commandserver/CommandClient.h>
-
+#include <locale>
#include <control/CWengoPhone.h>
@@ -229,6 +229,7 @@
//Init presentation factories before parsing the command line so that
Qt or
//Gtk get a chance to parse their command line options ('-style' for Qt
for
//example)
+ std::locale::global(std::locale(""));
PFactory * pFactory = NULL;
#if defined(OS_LINUX)
XInitThreads();
diff -r 6327dab55e1f -r d2fd2e1fcbb2
wengophone/src/presentation/qt/login/QtAddSIPAccount.cpp
--- a/wengophone/src/presentation/qt/login/QtAddSIPAccount.cpp Wed Apr 08
18:32:58 2009 +0200
+++ b/wengophone/src/presentation/qt/login/QtAddSIPAccount.cpp Sat Apr 11
23:28:54 2009 +0200
@@ -85,13 +85,13 @@
return;
}
- std::string login = _ui->login->text().trimmed().toStdString();
- std::string password = _ui->password->text().trimmed().toStdString();
- std::string realm = _ui->realm->text().trimmed().toStdString();
+ std::string login = _ui->login->text().trimmed().toLocal8Bit();
+ std::string password = _ui->password->text().trimmed().toLocal8Bit();
+ std::string realm = _ui->realm->text().trimmed().toLocal8Bit();
std::string displayname (_ui->displayname->text().toLocal8Bit());
- std::string registerServer =
_ui->registerServer->text().trimmed().toStdString();
+ std::string registerServer =
_ui->registerServer->text().trimmed().toLocal8Bit();
int registerPort = config.getSipRegisterPort();
- std::string proxyServer =
_ui->proxyServer->text().trimmed().toStdString();
+ std::string proxyServer =
_ui->proxyServer->text().trimmed().toLocal8Bit();
int proxyPort = _ui->proxyPort->text().toInt();
//fill ampty lines
@@ -172,12 +172,12 @@
void QtAddSIPAccount::load(const SipAccount & sipAccount) {
if (sipAccount.getType() == SipAccount::SipAccountTypeBasic) {
//loads the sip acccount
-
_ui->login->setText(QString::fromStdString(sipAccount.getIdentity()));
-
_ui->password->setText(QString::fromStdString(sipAccount.getPassword()));
-
_ui->realm->setText(QString::fromStdString(sipAccount.getRealm()));
+
_ui->login->setText(QString::fromLocal8Bit(sipAccount.getIdentity().c_str()));
+
_ui->password->setText(QString::fromLocal8Bit(sipAccount.getPassword().c_str()));
+
_ui->realm->setText(QString::fromLocal8Bit(sipAccount.getRealm().c_str()));
_ui->displayname->setText(QString::fromLocal8Bit(sipAccount.getDisplayName().c_str()));
-
_ui->registerServer->setText(QString::fromStdString(sipAccount.getRegisterServerHostname()));
-
_ui->proxyServer->setText(QString::fromStdString(sipAccount.getSIPProxyServerHostname()));
+
_ui->registerServer->setText(QString::fromLocal8Bit(sipAccount.getRegisterServerHostname().c_str()));
+
_ui->proxyServer->setText(QString::fromLocal8Bit(sipAccount.getSIPProxyServerHostname().c_str()));
//_ui->registerPort->setText(QString::number(sipAccount.getRegisterServerPort()));
_ui->proxyPort->setText(QString::number(sipAccount.getSIPProxyServerPort()));
_ui->accountname->setText(QString::fromLocal8Bit(sipAccount.getVisibleName().c_str()));
@@ -201,12 +201,12 @@
if (!userProfile->hasWengoAccount()) {
SipAccount * sipAccount = userProfile->getSipAccount();
//loads the sip acccount
-
_ui->login->setText(QString::fromStdString(sipAccount->getIdentity()));
-
_ui->password->setText(QString::fromStdString(sipAccount->getPassword()));
-
_ui->realm->setText(QString::fromStdString(sipAccount->getRealm()));
+
_ui->login->setText(QString::fromLocal8Bit(sipAccount->getIdentity().c_str()));
+
_ui->password->setText(QString::fromLocal8Bit(sipAccount->getPassword().c_str()));
+
_ui->realm->setText(QString::fromLocal8Bit(sipAccount->getRealm().c_str()));
_ui->displayname->setText(QString::fromLocal8Bit(sipAccount->getDisplayName().c_str()));
-
_ui->registerServer->setText(QString::fromStdString(sipAccount->getRegisterServerHostname()));
-
_ui->proxyServer->setText(QString::fromStdString(sipAccount->getSIPProxyServerHostname()));
+
_ui->registerServer->setText(QString::fromLocal8Bit(sipAccount->getRegisterServerHostname().c_str()));
+
_ui->proxyServer->setText(QString::fromLocal8Bit(sipAccount->getSIPProxyServerHostname().c_str()));
//_ui->registerPort->setText(QString::number(sipAccount->getRegisterServerPort()));
_ui->proxyPort->setText(QString::number(sipAccount->getSIPProxyServerPort()));
_ui->accountname->setText(QString::fromLocal8Bit(sipAccount->getVisibleName().c_str()));
@@ -233,17 +233,17 @@
_accountName = "";
_visibleName = "";
Config & config = ConfigManager::getInstance().getCurrentConfig();
- _ui->realm->setText(QString::fromStdString(config.getSipRealm()));
-
_ui->registerServer->setText(QString::fromStdString(config.getSipRegisterServer()));
-
_ui->proxyServer->setText(QString::fromStdString(config.getSipProxyServer()));
+
_ui->realm->setText(QString::fromLocal8Bit(config.getSipRealm().c_str()));
+
_ui->registerServer->setText(QString::fromLocal8Bit(config.getSipRegisterServer().c_str()));
+
_ui->proxyServer->setText(QString::fromLocal8Bit(config.getSipProxyServer().c_str()));
_ui->proxyPort->setText(QString::number(config.getSipProxyPort()));
_ui->activateSIMPLE->setChecked(config.getSipSimpleSupport());
}
void QtAddSIPAccount::aMandatoryLineHasChanged() {
- std::string login = _ui->login->text().toStdString();
- std::string realm = _ui->realm->text().toStdString();
+ std::string login = _ui->login->text().toLocal8Bit();
+ std::string realm = _ui->realm->text().toLocal8Bit();
if ( !login.empty() &&
!realm.empty()
_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev