Fix build for old OS X.

This commit is contained in:
John Preston 2018-06-21 23:35:28 +01:00
parent 8c901d8f71
commit 23140b3d6a
3 changed files with 5 additions and 4 deletions

View File

@ -102,13 +102,12 @@ QString File::PrepareRelativePath(
// Not lastIndexOf('.') so that "file.tar.xz" won't be messed up.
const auto position = suggested.indexOf('.');
const auto base = suggested.midRef(0, position);
const auto base = suggested.midRef(0, position).toString();
const auto extension = (position >= 0)
? suggested.midRef(position)
: QStringRef();
const auto relativePart = [&](int attempt) {
auto result = QString(" (%1)").arg(attempt);
result.prepend(base);
auto result = base + QString(" (%1)").arg(attempt);
result.append(extension);
return result;
};

View File

@ -39,7 +39,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
#define OS_MAC_OLD
#define RANGES_CXX_THREAD_LOCAL 0
#endif // QT_VERSION < 5.5.0
#ifdef OS_MAC_STORE

View File

@ -85,6 +85,9 @@
'-w', # Suppress 'libstdc++ is deprecated' warning.
],
},
'defines': [
'RANGES_CXX_THREAD_LOCAL=0',
],
}, {
'xcode_settings': {
'CLANG_CXX_LIBRARY': 'libc++',