More encoding fixes to make win32 with special chars work.

This commit is contained in:
Klaas Freitag 2012-06-13 17:34:20 +02:00
parent a39fb310e1
commit 36ad4fdc83
2 changed files with 5 additions and 5 deletions

View file

@ -141,12 +141,12 @@ void CSyncThread::run()
_mutex.lock();
if( csync_create(&csync,
_source.toLocal8Bit().data(),
_target.toLocal8Bit().data()) < 0 ) {
_source.toUtf8().data(),
_target.toUtf8().data()) < 0 ) {
emit csyncError( tr("CSync create failed.") );
}
// FIXME: Check if we really need this stringcopy!
wStats->sourcePath = qstrdup( _source.toLocal8Bit().constData() );
wStats->sourcePath = qstrdup( _source.toUtf8().constData() );
_csyncConfigDir = QString::fromUtf8( csync_get_config_dir( csync ));
_mutex.unlock();

View file

@ -116,7 +116,7 @@ void ownCloudFolder::startSync(const QStringList &pathList)
MirallConfigFile cfgFile;
QUrl url( _secondPath );
if( url.scheme() == QString::fromLocal8Bit("http") ) {
if( url.scheme() == QLatin1String("http") ) {
url.setScheme( "owncloud" );
} else {
// connect SSL!
@ -139,7 +139,7 @@ void ownCloudFolder::startSync(const QStringList &pathList)
qDebug() << "*** Start syncing url to ownCloud: " << url.toString() << ", with localOnly: " << _localCheckOnly;
_csync = new CSyncThread( path(), url.toString().toLocal8Bit(), _localCheckOnly );
_csync = new CSyncThread( path(), url.toString(), _localCheckOnly );
_csync->setUserPwd( cfgFile.ownCloudUser(), cfgFile.ownCloudPasswd() );
QObject::connect(_csync, SIGNAL(started()), SLOT(slotCSyncStarted()));
QObject::connect(_csync, SIGNAL(finished()), SLOT(slotCSyncFinished()));