Mercurial > minori
diff src/gui/dialog/settings/library.cc @ 236:4d461ef7d424
HUGE UPDATE: convert build system to autotools
why? because cmake sucks :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 19 Jan 2024 00:24:02 -0500 |
parents | ff0061e75f0f |
children | 862d0d8619f6 |
line wrap: on
line diff
--- a/src/gui/dialog/settings/library.cc Tue Jan 16 15:22:29 2024 -0500 +++ b/src/gui/dialog/settings/library.cc Fri Jan 19 00:24:02 2024 -0500 @@ -19,21 +19,6 @@ #include <algorithm> #include <iostream> -class DroppableListWidget : public QListWidget { - Q_OBJECT - -public: - explicit DroppableListWidget(QWidget* parent); - -signals: - void FilesDropped(QStringList list); - -protected: - void dragEnterEvent(QDragEnterEvent* event) override; - void dragMoveEvent(QDragMoveEvent* event) override; - void dropEvent(QDropEvent* event) override; -}; - DroppableListWidget::DroppableListWidget(QWidget* parent) : QListWidget(parent) { setAcceptDrops(true); } @@ -129,9 +114,11 @@ QDir::homePath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); - if (dir.isEmpty()) + const std::string s_dir = Strings::ToUtf8String(dir); + if (dir.isEmpty() || paths.count(s_dir)) return; - paths.insert(Strings::ToUtf8String(dir)); + + paths.insert(s_dir); QListWidgetItem* item = new QListWidgetItem(listwidget); item->setText(dir); }); @@ -202,5 +189,3 @@ real_time_monitor = session.config.library.real_time_monitor; AddTab(CreateFoldersWidget(), tr("Folder")); } - -#include "gui/dialog/settings/library.moc"