summaryrefslogtreecommitdiffstats
path: root/src/qphotorec.cpp
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-06-08 11:57:06 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-06-08 11:57:06 +0200
commitb9b3dda86005d9e6fbc57a40eed23fd4934ecfcd (patch)
treef59238622a714bb127e57a42b3a7088c33cddb70 /src/qphotorec.cpp
parent7ce34a8d4b666a89dd27ae8dbd17f0d46aa16c1a (diff)
QPhotoRec: open a file explorer when the destination folder is clicked
Diffstat (limited to 'src/qphotorec.cpp')
-rw-r--r--src/qphotorec.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qphotorec.cpp b/src/qphotorec.cpp
index 2e00b05..acb1cd3 100644
--- a/src/qphotorec.cpp
+++ b/src/qphotorec.cpp
@@ -49,6 +49,7 @@
#include <QComboBox>
#include <QTimer>
#include <QMessageBox>
+#include <QTextDocument>
#include "types.h"
#include "common.h"
#include "hdcache.h"
@@ -578,6 +579,9 @@ void QPhotorec::qphotorec_search_updateUI()
const partition_t *partition=params->partition;
const unsigned int sector_size=params->disk->sector_size;
QString tmp;
+ folder_txt->setText("Destination: <a href=\"file://" + Qt::escape(directoryLabel->text()) + "/" +
+ DEFAULT_RECUP_DIR + "." + QString::number(params->dir_num) + "\">" +
+ Qt::escape(directoryLabel->text()) + "</a>");
if(params->status==STATUS_QUIT)
{
tmp.sprintf("Recovery completed");
@@ -652,8 +656,10 @@ void QPhotorec::qphotorec_search_setupUI()
folder_img->setPixmap(*folder_pixmap);
folder_img->setSizePolicy(c_sizePolicy);
- QLabel *folder_txt=new QLabel();
- folder_txt->setText("Destination: " + directoryLabel->text());
+ folder_txt=new QLabel();
+ folder_txt->setTextFormat(Qt::RichText);
+ folder_txt->setTextInteractionFlags(Qt::TextBrowserInteraction);
+ folder_txt->setOpenExternalLinks(true);
QWidget *folderWidget = new QWidget();
QHBoxLayout *folderWidgetLayout = new QHBoxLayout(folderWidget);