Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:misc
libqtelegram-ae
libqtelegram-aseman-edition-10.0.0-git.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libqtelegram-aseman-edition-10.0.0-git.patch of Package libqtelegram-ae
diff --git a/core/eventtimer.cpp b/core/eventtimer.cpp index c5ab69b..ff5dfc1 100644 --- a/core/eventtimer.cpp +++ b/core/eventtimer.cpp @@ -24,6 +24,10 @@ EventTimer::EventTimer(qint64 msgId, qint32 timeout, QObject *parent) : connect(this, &QTimer::timeout, this, &EventTimer::onTimeout); } +EventTimer::~EventTimer() +{ +} + void EventTimer::onTimeout() { Q_EMIT timerTimeout(mMsgId); } diff --git a/core/eventtimer.h b/core/eventtimer.h index cbe0c19..b20eb16 100644 --- a/core/eventtimer.h +++ b/core/eventtimer.h @@ -24,6 +24,7 @@ class EventTimer : public QTimer Q_OBJECT public: explicit EventTimer(qint64 msgId, qint32 timeout, QObject *parent = 0); + ~EventTimer(); Q_SIGNALS: void timerTimeout(qint64 msgId); diff --git a/libqtelegram-ae.pri b/libqtelegram-ae.pri index eddf67c..ccb5b5f 100644 --- a/libqtelegram-ae.pri +++ b/libqtelegram-ae.pri @@ -6,8 +6,14 @@ win32 { isEmpty(OPENSSL_LIB_DIR): OPENSSL_LIB_DIR = $${DESTDIR} isEmpty(OPENSSL_INCLUDE_PATH): OPENSSL_INCLUDE_PATH = $${DESTDIR}/include - LIBS += -L$${OPENSSL_LIB_DIR} -lssleay32 -lcrypto -lz + LIBS += -L$${OPENSSL_LIB_DIR} -lssleay32 INCLUDEPATH += $${OPENSSL_INCLUDE_PATH} + + win32-msvc* { + LIBS += -llibeay32 -lzlibstat -lUser32 -lAdvapi32 -lGdi32 + } else { + LIBS += -lcrypto -lz + } } else { isEmpty(OPENSSL_INCLUDE_PATH): OPENSSL_INCLUDE_PATH = /usr/include/ /usr/local/include/ isEmpty(OPENSSL_LIB_DIR) { diff --git a/telegram/objects/telegramtypeqobject.cpp b/telegram/objects/telegramtypeqobject.cpp index 19b82ec..1d080d2 100644 --- a/telegram/objects/telegramtypeqobject.cpp +++ b/telegram/objects/telegramtypeqobject.cpp @@ -4,12 +4,16 @@ #include "telegramtypeqobject.h" +qint64 TelegramTypeQObject::mConstructedCount = 0; + TelegramTypeQObject::TelegramTypeQObject(QObject *parent) : QObject(parent) { + mConstructedCount++; } TelegramTypeQObject::~TelegramTypeQObject() { + mConstructedCount--; } diff --git a/telegram/objects/telegramtypeqobject.h b/telegram/objects/telegramtypeqobject.h index 35f0160..2f7a6a2 100644 --- a/telegram/objects/telegramtypeqobject.h +++ b/telegram/objects/telegramtypeqobject.h @@ -14,6 +14,13 @@ class LIBQTELEGRAMSHARED_EXPORT TelegramTypeQObject: public QObject public: TelegramTypeQObject(QObject *parent = 0); virtual ~TelegramTypeQObject(); + + static qint64 constructedCount() { + return mConstructedCount; + } + +private: + static qint64 mConstructedCount; }; #endif // TELEGRAMTYPEQOBJECT_H diff --git a/telegram/telegramcore.cpp b/telegram/telegramcore.cpp index 50fb47a..46ca35d 100644 --- a/telegram/telegramcore.cpp +++ b/telegram/telegramcore.cpp @@ -7958,7 +7958,11 @@ qint64 TelegramCore::retry(qint64 mid) result = messagesSendEncryptedService(args["peer"].value<InputEncryptedChat>(), args["random_id"].value<qint64>(), args["data"].value<QByteArray>(), [this, mid](TG_CALLBACK_SIGNATURE(MessagesSentEncryptedMessage)){ Q_UNUSED(msgId); callBackCall<MessagesSentEncryptedMessage>(mid, result, error); } ); } else if(functionName == "messagesReceivedQueue") { result = messagesReceivedQueue(args["max_qts"].value<qint32>(), [this, mid](TG_CALLBACK_SIGNATURE(QList<qint64>)){ Q_UNUSED(msgId); callBackCall<QList<qint64>>(mid, result, error); } ); - } else if(functionName == "messagesReadMessageContents") { + } + #ifndef Q_CC_MSVC // break if-else chain on Microsoft compilers with nesting limits + else + #endif + if(functionName == "messagesReadMessageContents") { result = messagesReadMessageContents(args["id"].value<QList<qint32>>(), [this, mid](TG_CALLBACK_SIGNATURE(MessagesAffectedMessages)){ Q_UNUSED(msgId); callBackCall<MessagesAffectedMessages>(mid, result, error); } ); } else if(functionName == "messagesGetStickers") { result = messagesGetStickers(args["emoticon"].value<QString>(), args["hash"].value<QString>(), [this, mid](TG_CALLBACK_SIGNATURE(MessagesStickers)){ Q_UNUSED(msgId); callBackCall<MessagesStickers>(mid, result, error); } ); diff --git a/telegram/types/telegramtypeobject.cpp b/telegram/types/telegramtypeobject.cpp index 355c883..e02d787 100644 --- a/telegram/types/telegramtypeobject.cpp +++ b/telegram/types/telegramtypeobject.cpp @@ -5,11 +5,13 @@ #include "telegramtypeobject.h" const TelegramTypeObject::Null TelegramTypeObject::null = TelegramTypeObject::Null(); +qint64 TelegramTypeObject::mConstructedCount = 0; TelegramTypeObject::TelegramTypeObject() : mError(false), mNull(false) { + mConstructedCount++; } TelegramTypeObject::TelegramTypeObject(const Null&) : @@ -20,5 +22,6 @@ TelegramTypeObject::TelegramTypeObject(const Null&) : TelegramTypeObject::~TelegramTypeObject() { + mConstructedCount--; } diff --git a/telegram/types/telegramtypeobject.h b/telegram/types/telegramtypeobject.h index 69b7f8e..668471f 100644 --- a/telegram/types/telegramtypeobject.h +++ b/telegram/types/telegramtypeobject.h @@ -41,6 +41,10 @@ public: bool operator==(bool stt) { return mNull != stt; } bool operator!=(bool stt) { return !operator ==(stt); } + static qint64 constructedCount() { + return mConstructedCount; + } + protected: void setError(bool stt) { mError = stt; } void setNull(bool stt) { mNull = stt; } @@ -48,6 +52,7 @@ protected: private: bool mError; bool mNull; + static qint64 mConstructedCount; }; #endif // TELEGRAMTYPEOBJECT_H diff --git a/util/utils.cpp b/util/utils.cpp index 6483de2..d9862f0 100644 --- a/util/utils.cpp +++ b/util/utils.cpp @@ -268,7 +268,12 @@ RSA *Utils::rsaLoadPublicKey(const QString &publicKeyName) { QByteArray fileData = file.readAll(); BIO *bufio = BIO_new_mem_buf((void*)fileData.data(), fileData.length()); pubKey = PEM_read_bio_RSAPublicKey (bufio, NULL, NULL, NULL); - delete bufio; + + BUF_MEM *bptr; + BIO_get_mem_ptr(bufio, &bptr); + BIO_set_close(bufio, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */ + BIO_free(bufio); + if (pubKey == NULL) { qCWarning(TG_UTIL_UTILS) << "PEM_read_RSAPublicKey returns NULL"; return NULL;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor