1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'pr1739'

Fixes #1696
This commit is contained in:
tux3 2015-05-26 01:00:38 +02:00
commit d288f89870
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -873,11 +873,12 @@ void ChatForm::doScreenshot()
ScreenshotGrabber* screenshotGrabber = new ScreenshotGrabber(this);
connect(screenshotGrabber, &ScreenshotGrabber::screenshotTaken, this, &ChatForm::onScreenshotTaken);
screenshotGrabber->showGrabber();
// Create dir for screenshots
QDir(Settings::getSettingsDirPath()).mkdir("screenshots");
}
void ChatForm::onScreenshotTaken(const QPixmap &pixmap) {
QTemporaryFile file("qTox-Screenshot-XXXXXXXX.png");
QTemporaryFile file(QDir(Settings::getSettingsDirPath() + QDir::separator() + "screenshots" + QDir::separator()).filePath("qTox-Screenshot-XXXXXXXX.png"));
if (!file.open())
{
QMessageBox::warning(this, tr("Failed to open temporary file", "Temporary file for screenshot"),
@ -893,8 +894,7 @@ void ChatForm::onScreenshotTaken(const QPixmap &pixmap) {
file.close();
QFileInfo fi(file);
emit sendFile(f->getFriendID(), fi.fileName(), fi.filePath(), filesize);
emit sendFile(f->getFriendID(), fi.fileName(), fi.filePath(), filesize);
}
void ChatForm::onLoadHistory()