fix for profile picture
We do not have the right to write in install dir so
save the profile picture in temp dir as we only need it
once
Change-Id: Idb9dc0d2aef1e72f75c80f3a97bbf84bade28ac2
Tuleap: #657
diff --git a/photoboothdialog.cpp b/photoboothdialog.cpp
index 156af53..826144f 100644
--- a/photoboothdialog.cpp
+++ b/photoboothdialog.cpp
@@ -20,12 +20,14 @@
#include "ui_photoboothdialog.h"
#include <QFileDialog>
+#include <QStandardPaths>
#include "video/previewmanager.h"
PhotoBoothDialog::PhotoBoothDialog(QWidget* parent) :
QDialog(parent),
- fileName_("profile.png"),
+ fileName_(QStandardPaths::standardLocations(QStandardPaths::TempLocation).first()
+ + QStringLiteral("profile.png")),
ui(new Ui::PhotoBoothDialog)
{
ui->setupUi(this);
@@ -58,7 +60,9 @@
"",
tr("Files (*)"));
if (fileName_.isEmpty())
- fileName_ = QStringLiteral("profile.png");
+ fileName_ = QStandardPaths::standardLocations(
+ QStandardPaths::TempLocation).first()
+ + QStringLiteral("profile.png");
else {
Video::PreviewManager::instance().stopPreview();
accept();