Skip to content

Commit

Permalink
Fix build for old OS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jun 21, 2018
1 parent 8c901d8 commit 23140b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Telegram/SourceFiles/export/output/export_output_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ For license and copyright information please follow this link:

#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
Expand Down
3 changes: 3 additions & 0 deletions Telegram/gyp/settings_mac.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
'-w', # Suppress 'libstdc++ is deprecated' warning.
],
},
'defines': [
'RANGES_CXX_THREAD_LOCAL=0',
],
}, {
'xcode_settings': {
'CLANG_CXX_LIBRARY': 'libc++',
Expand Down

0 comments on commit 23140b3

Please sign in to comment.