mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 09:11:06 -04:00
Added a new button in the forums dialog to download all links in the selected forum message.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4202 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ddba6d35db
commit
650ef12af6
10 changed files with 234 additions and 100 deletions
|
@ -148,6 +148,7 @@ ForumsDialog::ForumsDialog(QWidget *parent)
|
|||
connect(ui.expandButton, SIGNAL(clicked()), this, SLOT(togglethreadview()));
|
||||
connect(ui.previousButton, SIGNAL(clicked()), this, SLOT(previousMessage()));
|
||||
connect(ui.nextButton, SIGNAL(clicked()), this, SLOT(nextMessage()));
|
||||
connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(downloadAllFiles()));
|
||||
|
||||
connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||
|
@ -1251,6 +1252,20 @@ void ForumsDialog::nextMessage ()
|
|||
}
|
||||
}
|
||||
|
||||
void ForumsDialog::downloadAllFiles()
|
||||
{
|
||||
QStringList urls;
|
||||
if (RsHtml::findAnchors(ui.postText->toHtml(), urls) == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (urls.count() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
RetroShareLink::process(urls, RetroShareLink::TYPE_FILE, true);
|
||||
}
|
||||
|
||||
// TODO
|
||||
#if 0
|
||||
void ForumsDialog::removemessage()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue