From 36ad4fdc83022c17c7f296623a8bf753a0670d1c Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Wed, 13 Jun 2012 17:34:20 +0200 Subject: [PATCH] More encoding fixes to make win32 with special chars work. --- src/mirall/csyncthread.cpp | 6 +++--- src/mirall/owncloudfolder.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mirall/csyncthread.cpp b/src/mirall/csyncthread.cpp index e6ecec642..69846bf80 100644 --- a/src/mirall/csyncthread.cpp +++ b/src/mirall/csyncthread.cpp @@ -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(); diff --git a/src/mirall/owncloudfolder.cpp b/src/mirall/owncloudfolder.cpp index fde4e70d6..db678c121 100644 --- a/src/mirall/owncloudfolder.cpp +++ b/src/mirall/owncloudfolder.cpp @@ -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()));