Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. diff --git a/src/listwidget.cpp b/src/listwidget.cpp
  2. index ac9353f..cf97ea5 100644
  3. --- a/src/listwidget.cpp
  4. +++ b/src/listwidget.cpp
  5. @@ -427,15 +427,7 @@ void ListWidget::dropEvent(QDropEvent *event)
  6.  
  7. void ListWidget::processFileInfo(const QFileInfo& info)
  8. {
  9. - if (info.isDir())
  10. - {
  11. - m_model->addDirectory(info.absoluteFilePath());
  12. - }
  13. - else
  14. - {
  15. - m_model->addFile(info.absoluteFilePath());
  16. - m_model->loadPlaylist(info.absoluteFilePath());
  17. - }
  18. + m_model->add(info.absoluteFilePath());
  19. }
  20.  
  21. const QString ListWidget::getExtraString(int i)
  22. diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
  23. index eef6bd4..b19917f 100644
  24. --- a/src/mainwindow.cpp
  25. +++ b/src/mainwindow.cpp
  26. @@ -276,7 +276,6 @@ void MainWindow::createHotkeys()
  27. hotkeysMap.clear();
  28. bool ok;
  29. QSettings settings("Qmmp-fooUI", "qmmpui");
  30. - settings.endGroup();
  31. settings.beginGroup("/Hotkeys");
  32. int hotkeysRowCount = settings.value("/hotkeysRowCount", 0).toInt(&ok);
  33. for(int i=0; i<hotkeysRowCount; i++)
  34. @@ -721,7 +720,7 @@ void MainWindow::closePlaylistRequest()
  35. void MainWindow::addDir()
  36. {
  37. FileDialog::popup(this, FileDialog::AddDirs, &m_lastDir,
  38. - m_pl_manager->selectedPlayList(), SLOT(addFileList(const QStringList&)),
  39. + m_pl_manager->selectedPlayList(), SLOT(add(const QStringList&)),
  40. tr("Choose a directory"));
  41. }
  42.  
  43. @@ -732,7 +731,7 @@ void MainWindow::addFiles()
  44. MetaDataManager::instance()->nameFilters().join (" ") +")";
  45. filters << MetaDataManager::instance()->filters();
  46. FileDialog::popup(this, FileDialog::AddDirsFiles, &m_lastDir,
  47. - m_pl_manager->selectedPlayList(), SLOT(addFileList(const QStringList&)),
  48. + m_pl_manager->selectedPlayList(), SLOT(add(const QStringList&)),
  49. tr("Select one or more files to open"), filters.join(";;"));
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement