1
0
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:
dubslow 2014-10-17 23:53:29 -05:00
parent 43ac1dfd0d
commit 6e15bcb8d8
2 changed files with 6 additions and 2 deletions

View File

@ -204,8 +204,8 @@ bool isFileWritable(QString& path)
void FileTransferInstance::acceptRecvRequest()
{
QString path;
if (!(path = Settings::getInstance().getAutoAcceptDir(Core::getInstance()->getFriendAddress(friendId))).isEmpty())
QString path = Settings::getInstance().getAutoAcceptDir(Core::getInstance()->getFriendAddress(friendId));
if (!path.isEmpty())
{
QDir dir(path);
path = dir.filePath(filename);

View File

@ -36,6 +36,7 @@
#include "src/widget/maskablepixmapwidget.h"
#include "src/widget/croppinglabel.h"
#include "src/misc/style.h"
#include "src/misc/settings.h"
ChatForm::ChatForm(Friend* chatFriend)
: f(chatFriend)
@ -178,6 +179,9 @@ void ChatForm::onFileRecvRequest(ToxFile file)
previousName = f->getName();
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)