Use new QFileDialog::DontUseCustomDirectoryIcons flag for faster file dialogs
In Qt 4.8.6 there's a new option QFileDialog::DontUseCustomDirectoryIcons promising much better performance when there are many folders. Closes #511.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* patman.cpp - a GUS-compatible patch instrument plugin
|
||||
*
|
||||
* Copyright (c) 2007-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -511,6 +511,9 @@ PatmanView::~PatmanView()
|
||||
void PatmanView::openFile( void )
|
||||
{
|
||||
QFileDialog ofd( NULL, tr( "Open patch file" ) );
|
||||
#if QT_VERSION >= 0x040806
|
||||
ofd.setOption( QFileDialog::DontUseCustomDirectoryIcons );
|
||||
#endif
|
||||
ofd.setFileMode( QFileDialog::ExistingFiles );
|
||||
|
||||
QStringList types;
|
||||
|
||||
@@ -1046,6 +1046,9 @@ void sf2InstrumentView::showFileDialog()
|
||||
sf2Instrument * k = castModel<sf2Instrument>();
|
||||
|
||||
QFileDialog ofd( NULL, tr( "Open SoundFont file" ) );
|
||||
#if QT_VERSION >= 0x040806
|
||||
ofd.setOption( QFileDialog::DontUseCustomDirectoryIcons );
|
||||
#endif
|
||||
ofd.setFileMode( QFileDialog::ExistingFiles );
|
||||
|
||||
QStringList types;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* vestige.cpp - instrument-plugin for hosting VST-instruments
|
||||
*
|
||||
* Copyright (c) 2005-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -607,6 +607,9 @@ void VestigeInstrumentView::modelChanged()
|
||||
void VestigeInstrumentView::openPlugin()
|
||||
{
|
||||
QFileDialog ofd( NULL, tr( "Open VST-plugin" ) );
|
||||
#if QT_VERSION >= 0x040806
|
||||
ofd.setOption( QFileDialog::DontUseCustomDirectoryIcons );
|
||||
#endif
|
||||
|
||||
QString dir;
|
||||
if( m_vi->m_pluginDLL != "" )
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* VstPlugin.cpp - implementation of VstPlugin class
|
||||
*
|
||||
* Copyright (c) 2005-2012 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -512,6 +512,9 @@ void VstPlugin::openPreset( )
|
||||
|
||||
QFileDialog ofd( NULL, tr( "Open Preset" ), "",
|
||||
tr( "Vst Plugin Preset (*.fxp *.fxb)" ) );
|
||||
#if QT_VERSION >= 0x040806
|
||||
ofd.setOption( QFileDialog::DontUseCustomDirectoryIcons );
|
||||
#endif
|
||||
ofd.setFileMode( QFileDialog::ExistingFiles );
|
||||
if( ofd.exec () == QDialog::Accepted &&
|
||||
!ofd.selectedFiles().isEmpty() )
|
||||
@@ -571,6 +574,9 @@ void VstPlugin::savePreset( )
|
||||
QFileDialog sfd( NULL, tr( "Save Preset" ), presName.section(": ", 1, 1) + tr(".fxp"),
|
||||
tr( "Vst Plugin Preset (*.fxp *.fxb)" ) );
|
||||
|
||||
#if QT_VERSION >= 0x040806
|
||||
sfd.setOption( QFileDialog::DontUseCustomDirectoryIcons );
|
||||
#endif
|
||||
if( p_name != "" ) // remember last directory
|
||||
{
|
||||
sfd.setDirectory( QFileInfo( p_name ).absolutePath() );
|
||||
|
||||
Reference in New Issue
Block a user