Allow to open file directly
Fix #506 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
committed by
Tobias Fella
parent
3e5421604b
commit
ffa8fbf365
@@ -6,6 +6,7 @@
|
||||
#include <QFileInfo>
|
||||
#include <QMetaObject>
|
||||
#include <QMimeDatabase>
|
||||
#include <QTemporaryFile>
|
||||
#include <QTextDocument>
|
||||
#include <functional>
|
||||
|
||||
@@ -1241,3 +1242,15 @@ PollHandler *NeoChatRoom::poll(const QString &eventId)
|
||||
return m_polls[eventId];
|
||||
}
|
||||
#endif
|
||||
|
||||
bool NeoChatRoom::downloadTempFile(const QString &eventId)
|
||||
{
|
||||
QTemporaryFile file;
|
||||
file.setAutoRemove(false);
|
||||
if (!file.open()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
downloadFile(eventId, file.fileName());
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user