This commit is contained in:
John Preston 2016-09-03 10:19:15 -04:00
commit 3d3fc33253
6 changed files with 34 additions and 25 deletions

View File

@ -1355,7 +1355,7 @@ RevokePublicLinkBox::RevokePublicLinkBox(base::lambda_unique<void()> &&revokeCal
, _revokeWidth(st::normalFont->width(lang(lng_channels_too_much_public_revoke)))
, _aboutRevoke(this, lang(lng_channels_too_much_public_about), FlatLabel::InitType::Simple, st::aboutRevokePublicLabel)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton)
, _revokeCallback(std::move(revokeCallback)) {
, _revokeCallback(std_::move(revokeCallback)) {
setMouseTracking(true);
MTP::send(MTPchannels_GetAdminedPublicChannels(), rpcDone(&RevokePublicLinkBox::getPublicDone), rpcFail(&RevokePublicLinkBox::getPublicFail));

View File

@ -339,6 +339,13 @@ inline constexpr typename remove_reference<T>::type &&move(T &&value) noexcept {
return static_cast<typename remove_reference<T>::type&&>(value);
}
template <typename T>
void swap(T &a, T &b) {
T tmp = move(a);
a = move(b);
b = move(tmp);
}
template <typename T>
struct remove_const {
using type = T;
@ -510,7 +517,7 @@ struct is_base_of {
template <typename T>
T createAndSwap(T &value) {
T result = T();
std::swap(result, value);
std_::swap(result, value);
return std_::move(result);
}

View File

@ -417,7 +417,7 @@ private:
}
static void destroyNode(Subscription::Node *node) {
if (auto that = node->observable.lock()) {
if (auto that = node->observable.toStrongRef()) {
static_cast<CommonObservableData*>(that.data())->remove(node);
}
}

View File

@ -39,9 +39,9 @@ public:
, _plaindata(createAndSwap(other._plaindata)) {
}
vector_of_moveable &operator=(vector_of_moveable &&other) {
std::swap(_size, other._size);
std::swap(_capacity, other._capacity);
std::swap(_plaindata, other._plaindata);
std_::swap(_size, other._size);
std_::swap(_capacity, other._capacity);
std_::swap(_plaindata, other._plaindata);
return *this;
}
@ -165,7 +165,7 @@ private:
new (newLocation) T(std_::move(*oldLocation));
oldLocation->~T();
}
std::swap(_plaindata, newPlainData);
std_::swap(_plaindata, newPlainData);
_capacity = newCapacity;
operator delete[](newPlainData);
}

View File

@ -24,31 +24,31 @@ public:
PsMacWindowPrivate();
void setWindowBadge(const QString &str);
void startBounce();
void setWindowBadge(const QString &str);
void startBounce();
void updateDelegate();
void showNotify(uint64 peer, int32 msgId, const QPixmap &pix, const QString &title, const QString &subtitle, const QString &msg, bool withReply);
void clearNotifies(uint64 peer = 0);
void enableShadow(WId winId);
void showNotify(uint64 peer, int32 msgId, const QPixmap &pix, const QString &title, const QString &subtitle, const QString &msg, bool withReply);
void clearNotifies(uint64 peer = 0);
void enableShadow(WId winId);
bool filterNativeEvent(void *event);
virtual void activeSpaceChanged() {
}
virtual void activeSpaceChanged() {
}
virtual void darkModeChanged() {
}
virtual void notifyClicked(unsigned long long peer, int msgid) {
}
virtual void notifyReplied(unsigned long long peer, int msgid, const char *str) {
}
virtual void notifyClicked(unsigned long long peer, int msgid) {
}
virtual void notifyReplied(unsigned long long peer, int msgid, const char *str) {
}
~PsMacWindowPrivate();
PsMacWindowData *data;
PsMacWindowData *data;
};
void objc_holdOnTop(WId winId);
@ -89,7 +89,6 @@ QByteArray objc_downloadPathBookmark(const QString &path);
QByteArray objc_pathBookmark(const QString &path);
void objc_downloadPathEnableAccess(const QByteArray &bookmark);
class objc_FileBookmarkData;
class objc_FileBookmark {
public:
objc_FileBookmark(const QByteArray &bookmark);
@ -103,6 +102,9 @@ public:
~objc_FileBookmark();
private:
#ifdef OS_MAC_STORE
class objc_FileBookmarkData;
objc_FileBookmarkData *data = nullptr;
#endif // OS_MAC_STORE
};

View File

@ -1160,7 +1160,7 @@ namespace {
QMutex _bookmarksMutex;
}
class objc_FileBookmarkData {
class objc_FileBookmark::objc_FileBookmarkData {
public:
~objc_FileBookmarkData() {
if (url) [url release];