Update code to use FileInfo instead of QFileInfo

Also removed all blocks similar to
```
#if QT_VERSION >= 0x040806
	filedialog.setOption( QFileDialog::DontUseCustomDirectoryIcons );
#endif
```
as this now takes place in the new subclass's constructor.
This commit is contained in:
Lukas W
2014-01-22 22:24:24 +01:00
parent 0bbfd907ae
commit 2e7bfe17e6
9 changed files with 42 additions and 70 deletions

View File

@@ -30,7 +30,6 @@
#include <QtCore/QBuffer>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtGui/QFileDialog>
#include <QtGui/QMessageBox>
#include <QtGui/QPainter>
@@ -61,6 +60,8 @@
#include "interpolation.h"
#include "templates.h"
#include "FileDialog.h"
SampleBuffer::SampleBuffer( const QString & _audio_file,
bool _is_base64_data ) :
@@ -829,10 +830,7 @@ void SampleBuffer::visualize( QPainter & _p, const QRect & _dr,
QString SampleBuffer::openAudioFile() const
{
QFileDialog ofd( NULL, tr( "Open audio file" ) );
#if QT_VERSION >= 0x040806
ofd.setOption( QFileDialog::DontUseCustomDirectoryIcons );
#endif
FileDialog ofd( NULL, tr( "Open audio file" ) );
QString dir;
if( !m_audioFile.isEmpty() )
@@ -855,7 +853,7 @@ QString SampleBuffer::openAudioFile() const
}
// change dir to position of previously opened file
ofd.setDirectory( dir );
ofd.setFileMode( QFileDialog::ExistingFiles );
ofd.setFileMode( FileDialog::ExistingFiles );
// set filters
QStringList types;