mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
actually auto accept
This commit is contained in:
parent
43ac1dfd0d
commit
6e15bcb8d8
|
@ -204,8 +204,8 @@ bool isFileWritable(QString& path)
|
||||||
|
|
||||||
void FileTransferInstance::acceptRecvRequest()
|
void FileTransferInstance::acceptRecvRequest()
|
||||||
{
|
{
|
||||||
QString path;
|
QString path = Settings::getInstance().getAutoAcceptDir(Core::getInstance()->getFriendAddress(friendId));
|
||||||
if (!(path = Settings::getInstance().getAutoAcceptDir(Core::getInstance()->getFriendAddress(friendId))).isEmpty())
|
if (!path.isEmpty())
|
||||||
{
|
{
|
||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
path = dir.filePath(filename);
|
path = dir.filePath(filename);
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "src/widget/maskablepixmapwidget.h"
|
#include "src/widget/maskablepixmapwidget.h"
|
||||||
#include "src/widget/croppinglabel.h"
|
#include "src/widget/croppinglabel.h"
|
||||||
#include "src/misc/style.h"
|
#include "src/misc/style.h"
|
||||||
|
#include "src/misc/settings.h"
|
||||||
|
|
||||||
ChatForm::ChatForm(Friend* chatFriend)
|
ChatForm::ChatForm(Friend* chatFriend)
|
||||||
: f(chatFriend)
|
: f(chatFriend)
|
||||||
|
@ -178,6 +179,9 @@ void ChatForm::onFileRecvRequest(ToxFile file)
|
||||||
previousName = f->getName();
|
previousName = f->getName();
|
||||||
|
|
||||||
chatWidget->insertMessage(new FileTransferAction(fileTrans, getElidedName(name), QTime::currentTime().toString("hh:mm"), false));
|
chatWidget->insertMessage(new FileTransferAction(fileTrans, getElidedName(name), QTime::currentTime().toString("hh:mm"), false));
|
||||||
|
|
||||||
|
if (!Settings::getInstance().getAutoAcceptDir(Core::getInstance()->getFriendAddress(f->friendId)).isEmpty())
|
||||||
|
fileTrans->pressFromHtml("btnB");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::onAvInvite(int FriendId, int CallId, bool video)
|
void ChatForm::onAvInvite(int FriendId, int CallId, bool video)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user