mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Fix the 'copy button' in the protocol log
Fix #863 Also added more padding for the filename because it might be big, and in case it's not enough, always add at least a space.
This commit is contained in:
parent
04d3e282fb
commit
d3a333e03c
1 changed files with 16 additions and 22 deletions
|
@ -203,28 +203,22 @@ void ItemProgressDialog::copyToClipboard()
|
|||
|
||||
int topLevelItems = _ui->_treeWidget->topLevelItemCount();
|
||||
for (int i = 0; i < topLevelItems; i++) {
|
||||
QTreeWidgetItem *item = _ui->_treeWidget->topLevelItem(i);
|
||||
ts << left << qSetFieldWidth(0)
|
||||
<< item->data(0, Qt::DisplayRole).toString()
|
||||
<< endl;
|
||||
int childItems = item->childCount();
|
||||
for (int j = 0; j < childItems; j++) {
|
||||
QTreeWidgetItem *child =item->child(j);
|
||||
// time stamp
|
||||
ts << left << qSetFieldWidth(10)
|
||||
<< child->data(0,Qt::DisplayRole).toString()
|
||||
// file name
|
||||
<< qSetFieldWidth(50)
|
||||
<< child->data(1,Qt::DisplayRole).toString()
|
||||
// action
|
||||
<< qSetFieldWidth(15)
|
||||
<< child->data(2, Qt::DisplayRole).toString()
|
||||
// size
|
||||
<< qSetFieldWidth(10)
|
||||
<< child->data(3, Qt::DisplayRole).toString()
|
||||
<< qSetFieldWidth(0)
|
||||
<< endl;
|
||||
}
|
||||
QTreeWidgetItem *child = _ui->_treeWidget->topLevelItem(i);
|
||||
// time stamp
|
||||
ts << left << qSetFieldWidth(10)
|
||||
<< child->data(0,Qt::DisplayRole).toString()
|
||||
// file name
|
||||
<< qSetFieldWidth(64)
|
||||
<< child->data(1,Qt::DisplayRole).toString()
|
||||
<< qSetFieldWidth(0) << ' '
|
||||
// action
|
||||
<< qSetFieldWidth(15)
|
||||
<< child->data(3, Qt::DisplayRole).toString()
|
||||
// size
|
||||
<< qSetFieldWidth(10)
|
||||
<< child->data(4, Qt::DisplayRole).toString()
|
||||
<< qSetFieldWidth(0)
|
||||
<< endl;
|
||||
}
|
||||
|
||||
QApplication::clipboard()->setText(text);
|
||||
|
|
Loading…
Reference in a new issue