summaryrefslogtreecommitdiffstats
path: root/torrentwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'torrentwidget.cpp')
-rw-r--r--torrentwidget.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/torrentwidget.cpp b/torrentwidget.cpp
index ec83424..5279b88 100644
--- a/torrentwidget.cpp
+++ b/torrentwidget.cpp
@@ -176,7 +176,7 @@ void TorrentWidget::gatherData(){
mFileView->setSortingEnabled(false);
mModel->clear();
QStandardItem *root = mModel->invisibleRootItem();
- mModel->setHorizontalHeaderLabels(QStringList() << QChar(0x26A7) << tr("Name") << tr("Created"));
+ mModel->setHorizontalHeaderLabels(QStringList() << QChar(0x26A7) << tr("Name") << tr("Content") << tr("Created"));
QBrush redBrush(Qt::red);
QBrush greenBrush(Qt::darkGreen);
for(const auto &fi : fl){
@@ -189,6 +189,12 @@ void TorrentWidget::gatherData(){
}
fData << item;
}
+ TorrentParser p(fi.absoluteFilePath());
+ const auto tData = p.parse();
+ const auto tFiles = p.files(tData);
+ if(!tFiles.isEmpty()){
+ fData[ContentColumn]->setText(tFiles.at(0));
+ }
int result = 0;
q.bindValue(":fn", fi.fileName());
q.exec();