Mercurial > hg > svgui
diff widgets/InteractiveFileFinder.cpp @ 842:8432d2551fb2 tonioni
Update subrepos and merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 02 Sep 2014 16:23:48 +0100 |
parents | 831188672987 |
children | c02c51ae5238 a429b2acb45d |
line wrap: on
line diff
--- a/widgets/InteractiveFileFinder.cpp Fri Jul 18 15:06:04 2014 +0100 +++ b/widgets/InteractiveFileFinder.cpp Tue Sep 02 16:23:48 2014 +0100 @@ -34,7 +34,8 @@ InteractiveFileFinder::InteractiveFileFinder() : m_sessionExtension("sv"), - m_lastLocatedLocation("") + m_lastLocatedLocation(""), + m_parent(0) { SVDEBUG << "Registering interactive file finder" << endl; FileFinder::registerFileFinder(this); @@ -45,6 +46,12 @@ } void +InteractiveFileFinder::setParentWidget(QWidget *parent) +{ + getInstance()->m_parent = parent; +} + +void InteractiveFileFinder::setApplicationSessionExtension(QString extension) { m_sessionExtension = extension; @@ -162,7 +169,7 @@ // Use our own QFileDialog just for symmetry with getSaveFileName below - QFileDialog dialog; + QFileDialog dialog(m_parent); dialog.setNameFilters(filter.split('\n')); dialog.setWindowTitle(title); dialog.setDirectory(lastPath); @@ -306,7 +313,7 @@ // Use our own QFileDialog instead of static functions, as we may // need to adjust the file extension based on the selected filter - QFileDialog dialog; + QFileDialog dialog(m_parent); QStringList filters = filter.split('\n');