Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b9549351 authored by Nate Graham's avatar Nate Graham 🔩

[Wallpaper] Allow adding multiple images at once from the file picker dialog

Summary:
BUG: 402223
FIXED-IN: 5.15.0

Test Plan: Added multiple images from the file dialog. They all showed up in the wallpaper grid.

Reviewers: #konsole, broulik, davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D17815
parent d2654a50
......@@ -661,7 +661,7 @@ void Image::showFileDialog()
i18n("Image Files") + " ("+imageGlobPatterns.join(' ') + ')');
//i18n people, this isn't a "word puzzle". there is a specific string format for QFileDialog::setNameFilters
m_dialog->setFileMode(QFileDialog::ExistingFile);
m_dialog->setFileMode(QFileDialog::ExistingFiles);
connect(m_dialog, &QDialog::accepted, this, &Image::wallpaperBrowseCompleted);
}
......@@ -679,7 +679,9 @@ void Image::wallpaperBrowseCompleted()
{
Q_ASSERT(m_model);
if (m_dialog && m_dialog->selectedFiles().count() > 0) {
addUsersWallpaper(m_dialog->selectedFiles().first());
for (const QString image : m_dialog->selectedFiles()) {
addUsersWallpaper(image);
}
emit customWallpaperPicked(m_dialog->selectedFiles().first());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment