mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix qTox Android build
This commit is contained in:
parent
44c6b42c56
commit
66cb02d1c3
5
qtox.pro
5
qtox.pro
|
@ -345,6 +345,7 @@ contains(ENABLE_SYSTRAY_GTK_BACKEND, NO) {
|
|||
src/autoupdate.h \
|
||||
src/widget/callconfirmwidget.h \
|
||||
src/widget/systemtrayicon.h \
|
||||
src/misc/qrwidget.h \
|
||||
src/widget/systemtrayicon_private.h
|
||||
|
||||
SOURCES += \
|
||||
|
@ -404,7 +405,9 @@ contains(ENABLE_SYSTRAY_GTK_BACKEND, NO) {
|
|||
src/chatlog/documentcache.cpp \
|
||||
src/chatlog/pixmapcache.cpp \
|
||||
src/offlinemsgengine.cpp \
|
||||
src/misc/qrwidget.cpp \
|
||||
src/widget/genericchatroomwidget.cpp
|
||||
|
||||
}
|
||||
|
||||
SOURCES += \
|
||||
|
@ -424,7 +427,6 @@ SOURCES += \
|
|||
src/video/videoframe.cpp \
|
||||
src/widget/gui.cpp \
|
||||
src/toxme.cpp \
|
||||
src/misc/qrwidget.cpp \
|
||||
src/core/core.cpp \
|
||||
src/core/coreav.cpp \
|
||||
src/core/coreencryption.cpp \
|
||||
|
@ -455,6 +457,5 @@ HEADERS += \
|
|||
src/video/netvideosource.h \
|
||||
src/widget/gui.h \
|
||||
src/toxme.h \
|
||||
src/misc/qrwidget.h \
|
||||
src/profilelocker.h \
|
||||
src/avatarbroadcaster.h
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
#include <tox/tox.h>
|
||||
|
||||
#include <ctime>
|
||||
#include <limits>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
|
@ -546,7 +546,7 @@ void Core::onReadReceiptCallback(Tox*, uint32_t friendnumber, uint32_t receipt,
|
|||
void Core::acceptFriendRequest(const QString& userId)
|
||||
{
|
||||
uint32_t friendId = tox_friend_add_norequest(tox, CUserId(userId).data(), nullptr);
|
||||
if (friendId == UINT32_MAX)
|
||||
if (friendId == std::numeric_limits<uint32_t>::max())
|
||||
{
|
||||
emit failedToAddFriend(userId);
|
||||
}
|
||||
|
@ -580,7 +580,7 @@ void Core::requestFriendship(const QString& friendAddress, const QString& messag
|
|||
|
||||
uint32_t friendId = tox_friend_add(tox, CFriendAddress(friendAddress).data(),
|
||||
cMessage.data(), cMessage.size(), nullptr);
|
||||
if (friendId == UINT32_MAX)
|
||||
if (friendId == std::numeric_limits<uint32_t>::max())
|
||||
{
|
||||
emit failedToAddFriend(userId);
|
||||
}
|
||||
|
@ -1049,7 +1049,7 @@ void Core::loadFriends()
|
|||
|
||||
void Core::checkLastOnline(uint32_t friendId) {
|
||||
const uint64_t lastOnline = tox_friend_get_last_online(tox, friendId, nullptr);
|
||||
if (lastOnline != UINT64_MAX)
|
||||
if (lastOnline != std::numeric_limits<uint64_t>::max())
|
||||
emit friendLastSeenChanged(friendId, QDateTime::fromTime_t(lastOnline));
|
||||
}
|
||||
|
||||
|
@ -1287,7 +1287,7 @@ QString Core::getPeerName(const ToxID& id) const
|
|||
CUserId cid(id.toString());
|
||||
|
||||
uint32_t friendId = tox_friend_by_public_key(tox, (uint8_t*)cid.data(), nullptr);
|
||||
if (friendId == UINT32_MAX)
|
||||
if (friendId == std::numeric_limits<uint32_t>::max())
|
||||
{
|
||||
qWarning() << "Core::getPeerName: No such peer "+id.toString();
|
||||
return name;
|
||||
|
|
|
@ -22,7 +22,7 @@ void CoreFile::sendAvatarFile(Core* core, uint32_t friendId, const QByteArray& d
|
|||
uint64_t filesize = data.size();
|
||||
uint32_t fileNum = tox_file_send(core->tox, friendId, TOX_FILE_KIND_AVATAR, filesize,
|
||||
nullptr, filename, TOX_HASH_LENGTH, nullptr);
|
||||
if (fileNum == UINT32_MAX)
|
||||
if (fileNum == std::numeric_limits<uint32_t>::max())
|
||||
{
|
||||
qWarning() << "CoreFile::sendAvatarFile: Can't create the Tox file sender";
|
||||
return;
|
||||
|
@ -46,7 +46,7 @@ void CoreFile::sendFile(Core* core, uint32_t friendId, QString Filename, QString
|
|||
QByteArray fileName = Filename.toUtf8();
|
||||
uint32_t fileNum = tox_file_send(core->tox, friendId, TOX_FILE_KIND_DATA, filesize, nullptr,
|
||||
(uint8_t*)fileName.data(), fileName.size(), nullptr);
|
||||
if (fileNum == UINT32_MAX)
|
||||
if (fileNum == std::numeric_limits<uint32_t>::max())
|
||||
{
|
||||
qWarning() << "CoreFile::sendFile: Can't create the Tox file sender";
|
||||
emit core->fileSendFailed(friendId, Filename);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <QThread>
|
||||
#include <QDebug>
|
||||
#include <QImageReader>
|
||||
#include <QFile>
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
#include <src/widget/androidgui.h>
|
||||
|
|
Loading…
Reference in New Issue
Block a user