From 92c0ab74e931ba8846de50cb0572df94472a40ce Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 14 May 2010 13:52:30 +0200 Subject: Added "Play selected" and "Open with" to ArchiveViewWidget Implemented "Play selected movies" and "Open with" functions in ArchiveViewWidget. Also fixed a potential crash when re-creating the "Open with"-submenus. It's not possible to remove actions from an ActionGroup while iterating over the group with foreach. The ActionGroup is modified when calling removeAction() thus throwing the iterator of the loop off. Solution: First remove the actions from the ActionGroup and then delete the ActionGroup itself. The QObject destructor will take care of the contained Actions. --- archiveviewwidget.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'archiveviewwidget.h') diff --git a/archiveviewwidget.h b/archiveviewwidget.h index 6a9823b..4f56af5 100644 --- a/archiveviewwidget.h +++ b/archiveviewwidget.h @@ -9,6 +9,7 @@ #define ARCHIVEVIEWWIDGET_H #include +#include #include "archivefileview.h" @@ -46,6 +47,7 @@ class ArchiveViewWidget : public QWidget { void moveBurn(); void setDvdNo(); void deleteFromArchive(); + void playSelected(const QString &player = QString()); signals: void statusbarMessage(const QString &message); @@ -58,6 +60,8 @@ class ArchiveViewWidget : public QWidget { private: const QModelIndex getSourceColumnZero(); + QPair playerData(const QString &preferred); + QStringList selectedFiles(); QComboBox *mGenre; QComboBox *mActors; QLineEdit *mName; -- cgit v1.2.3-70-g09d2