-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -677,7 +677,7 @@ void SyncEngine::handleSyncError(CSYNC *ctx, const char *state) { | |
} | ||
// Special handling CSYNC_STATUS_INVALID_CHARACTERS | ||
if (err == CSYNC_STATUS_INVALID_CHARACTERS) { | ||
errStr = tr("Invalid characters, please rename \"%1\"").arg(errMsg); | ||
errStr = tr("Invalid characters, please rename \"%1\"").arg(errMsg)); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
|
||
// if there is csyncs url modifier in the error message, replace it. | ||
|
@@ -697,6 +697,18 @@ void SyncEngine::handleSyncError(CSYNC *ctx, const char *state) { | |
finalize(false); | ||
} | ||
|
||
// Instead of using the buggy iconv version c_utf8_from_locale from ocsync | ||
char* qt_utf8_from_locale(const mbchar_t *wstr) | ||
{ | ||
QByteArray tmp = QString::fromUtf8(wstr).normalized(QString::NormalizationForm_C).toLocal8Bit(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ogoffart
Contributor
|
||
char *ret = tmp.data(); | ||
if (ret) { | ||
This comment has been minimized.
Sorry, something went wrong.
ogoffart
Contributor
|
||
ret = strdup(ret); | ||
} | ||
return ret; | ||
} | ||
|
||
|
||
void SyncEngine::startSync() | ||
{ | ||
if (_journal->exists()) { | ||
|
@@ -805,6 +817,9 @@ void SyncEngine::startSync() | |
_csync_ctx->callbacks.checksum_hook = &CSyncChecksumHook::hook; | ||
_csync_ctx->callbacks.checksum_userdata = &_checksum_hook; | ||
|
||
_csync_ctx->callbacks.qt_utf8_from_locale = &qt_utf8_from_locale; | ||
This comment has been minimized.
Sorry, something went wrong.
ckamm
Contributor
|
||
|
||
|
||
_stopWatch.start(); | ||
|
||
qDebug() << "#### Discovery start #################################################### >>"; | ||
|
Stray )