mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-19 04:44:21 -05:00
update the CommentsModel
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1980 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
088abd243c
commit
238b2773bf
@ -96,12 +96,32 @@ DetailsDialog::show()
|
||||
|
||||
void DetailsDialog::closeEvent (QCloseEvent * event)
|
||||
{
|
||||
QWidget::closeEvent(event);
|
||||
QWidget::closeEvent(event);
|
||||
|
||||
int c;
|
||||
c = CommentsModel->rowCount();
|
||||
CommentsModel->removeRows(0,c);
|
||||
}
|
||||
|
||||
void DetailsDialog::setFileName(const QString & filename)
|
||||
{
|
||||
ui.name_label_2->setText(filename);
|
||||
int c;
|
||||
QModelIndex index;
|
||||
|
||||
c = CommentsModel->rowCount();
|
||||
CommentsModel->insertRow(c);
|
||||
|
||||
index = CommentsModel->index(c, 0);
|
||||
CommentsModel->setData(index, tr("Not Rated"));
|
||||
|
||||
index = CommentsModel->index(c, 1);
|
||||
CommentsModel->setData(index, tr("No Comments"));
|
||||
|
||||
index = CommentsModel->index(c, 2);
|
||||
CommentsModel->setData(index, filename);
|
||||
|
||||
ui.name_label_2->setText(filename);
|
||||
|
||||
}
|
||||
|
||||
void DetailsDialog::setHash(const QString & hash)
|
||||
|
Loading…
Reference in New Issue
Block a user