@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -72,6 +74,8 @@ QList<QUrl> FileViewList::UrlListFromSelection() const {
|
|||||||
if (index.column() == 0)
|
if (index.column() == 0)
|
||||||
urls << QUrl::fromLocalFile(static_cast<QFileSystemModel*>(model())->fileInfo(index).canonicalFilePath());
|
urls << QUrl::fromLocalFile(static_cast<QFileSystemModel*>(model())->fileInfo(index).canonicalFilePath());
|
||||||
}
|
}
|
||||||
|
std::sort(urls.begin(), urls.end());
|
||||||
|
|
||||||
return urls;
|
return urls;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -82,6 +86,7 @@ MimeData *FileViewList::MimeDataFromSelection() const {
|
|||||||
mimedata->setUrls(UrlListFromSelection());
|
mimedata->setUrls(UrlListFromSelection());
|
||||||
|
|
||||||
QList<QString> filenames = FilenamesFromSelection();
|
QList<QString> filenames = FilenamesFromSelection();
|
||||||
|
|
||||||
// if just one folder selected - use it's path as the new playlist's name
|
// if just one folder selected - use it's path as the new playlist's name
|
||||||
if (filenames.size() == 1 && QFileInfo(filenames.first()).isDir()) {
|
if (filenames.size() == 1 && QFileInfo(filenames.first()).isDir()) {
|
||||||
if (filenames.first().length() > 20) {
|
if (filenames.first().length() > 20) {
|
||||||
|
|||||||
Reference in New Issue
Block a user