diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index 45518b4fe4..9bb54fdb8e 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -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(item->data(Qt::UserRole)).originalRepresentation; - filepaths += path + "\n"; + filepaths.push_back(path); } if (!filepaths.isEmpty()) { - clipboard->setText(filepaths); + clipboard->setText(filepaths.join("\n")); } } diff --git a/components/contentselector/view/contentselector.cpp b/components/contentselector/view/contentselector.cpp index 2bcb73689e..bce136b335 100644 --- a/components/contentselector/view/contentselector.cpp +++ b/components/contentselector/view/contentselector.cpp @@ -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")); } }