mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 07:52:57 +02:00
Fix build for Mac App Store.
This commit is contained in:
parent
9d6e5f2a5b
commit
0089692b52
1 changed files with 8 additions and 2 deletions
|
@ -7,6 +7,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
*/
|
*/
|
||||||
#include "platform/mac/file_bookmark_mac.h"
|
#include "platform/mac/file_bookmark_mac.h"
|
||||||
|
|
||||||
|
#include "base/platform/mac/base_utilities_mac.h"
|
||||||
|
#include "logs.h"
|
||||||
|
|
||||||
|
#include <Cocoa/Cocoa.h>
|
||||||
|
#include <CoreFoundation/CFURL.h>
|
||||||
|
|
||||||
namespace Platform {
|
namespace Platform {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -61,7 +67,7 @@ bool FileBookmark::enable() const {
|
||||||
#else // OS_MAC_STORE
|
#else // OS_MAC_STORE
|
||||||
if (!data) return false;
|
if (!data) return false;
|
||||||
|
|
||||||
QMutexLocker lock(&_bookmarksMutex);
|
QMutexLocker lock(&BookmarksMutex);
|
||||||
if (data->counter > 0 || [data->url startAccessingSecurityScopedResource] == YES) {
|
if (data->counter > 0 || [data->url startAccessingSecurityScopedResource] == YES) {
|
||||||
++data->counter;
|
++data->counter;
|
||||||
return true;
|
return true;
|
||||||
|
@ -74,7 +80,7 @@ void FileBookmark::disable() const {
|
||||||
#ifdef OS_MAC_STORE
|
#ifdef OS_MAC_STORE
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
QMutexLocker lock(&_bookmarksMutex);
|
QMutexLocker lock(&BookmarksMutex);
|
||||||
if (data->counter > 0) {
|
if (data->counter > 0) {
|
||||||
--data->counter;
|
--data->counter;
|
||||||
if (!data->counter) {
|
if (!data->counter) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue