[vlc-commits] Qt: move getDirectoryDialog to a static helper
Jean-Baptiste Kempf
git at videolan.org
Sun May 18 23:39:18 CEST 2014
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 18 23:34:16 2014 +0200| [7f2ce08ccc01c331ee679ebe26589bcaaf0ddfdf] | committer: Jean-Baptiste Kempf
Qt: move getDirectoryDialog to a static helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f2ce08ccc01c331ee679ebe26589bcaaf0ddfdf
---
modules/gui/qt4/components/playlist/standardpanel.cpp | 2 +-
modules/gui/qt4/dialogs_provider.cpp | 5 +++--
modules/gui/qt4/dialogs_provider.hpp | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 6ad0ef4..19c67dc 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -358,7 +358,7 @@ void StandardPLPanel::popupAction( QAction *action )
break;
case VLCModelSubInterface::ACTION_ENQUEUEDIR:
- temp = THEDP->getDirectoryDialog();
+ temp = DialogsProvider::getDirectoryDialog( p_intf );
if ( temp.isEmpty() ) return;
a.uris << temp;
action->setData( QVariant::fromValue( a ) );
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 6ba7479..ec6966f 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -514,9 +514,10 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
Open::openMRL( p_intf, uri, go, pl );
}
-QString DialogsProvider::getDirectoryDialog()
+QString DialogsProvider::getDirectoryDialog( intf_thread_t *p_intf )
{
- QString dir = QFileDialog::getExistingDirectory( NULL, qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath );
+ QString dir = QFileDialog::getExistingDirectory( NULL,
+ qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath );
if( dir.isEmpty() ) return QString();
diff --git a/modules/gui/qt4/dialogs_provider.hpp b/modules/gui/qt4/dialogs_provider.hpp
index e8d3d16..990590b 100644
--- a/modules/gui/qt4/dialogs_provider.hpp
+++ b/modules/gui/qt4/dialogs_provider.hpp
@@ -90,6 +90,8 @@ public:
EXT_FILTER_PLAYLIST,
const QString& path = QString() );
bool isDying() { return b_isDying; }
+ static QString getDirectoryDialog( intf_thread_t *p_intf);
+
protected:
QSignalMapper *menusMapper;
QSignalMapper *menusUpdateMapper;
@@ -143,7 +145,6 @@ public slots:
void openNetDialog();
void openCaptureDialog();
- QString getDirectoryDialog();
void PLAppendDialog( int tab = OPEN_FILE_TAB );
void MLAppendDialog( int tab = OPEN_FILE_TAB );
More information about the vlc-commits
mailing list