mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 17:45:34 +00:00
Avoid trailing line breaks
This commit is contained in:
parent
f0543c5500
commit
bd59247270
2 changed files with 6 additions and 6 deletions
|
@ -252,17 +252,17 @@ void Launcher::DataFilesPage::buildView()
|
|||
void Launcher::DataFilesPage::slotCopySelectedItemsPaths()
|
||||
{
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
QString filepaths;
|
||||
QStringList filepaths;
|
||||
|
||||
for (QListWidgetItem* item : ui.directoryListWidget->selectedItems())
|
||||
{
|
||||
QString path = qvariant_cast<Config::SettingValue>(item->data(Qt::UserRole)).originalRepresentation;
|
||||
filepaths += path + "\n";
|
||||
filepaths.push_back(path);
|
||||
}
|
||||
|
||||
if (!filepaths.isEmpty())
|
||||
{
|
||||
clipboard->setText(filepaths);
|
||||
clipboard->setText(filepaths.join("\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -320,17 +320,17 @@ void ContentSelectorView::ContentSelector::slotCheckMultiSelectedItems()
|
|||
void ContentSelectorView::ContentSelector::slotCopySelectedItemsPaths()
|
||||
{
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
QString filepaths;
|
||||
QStringList filepaths;
|
||||
for (const QModelIndex& index : ui->addonView->selectionModel()->selectedIndexes())
|
||||
{
|
||||
int row = mAddonProxyModel->mapToSource(index).row();
|
||||
const ContentSelectorModel::EsmFile* file = mContentModel->item(row);
|
||||
filepaths += file->filePath() + "\n";
|
||||
filepaths.push_back(file->filePath());
|
||||
}
|
||||
|
||||
if (!filepaths.isEmpty())
|
||||
{
|
||||
clipboard->setText(filepaths);
|
||||
clipboard->setText(filepaths.join("\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue