Fix some problems with recent file list
This commit is contained in:
@@ -36,10 +36,11 @@ QDataStream& operator<<( QDataStream& out, const PlaYUVerStreamInfoVector& array
|
||||
for( Int i = 0; i < array.size(); i++ )
|
||||
{
|
||||
d = array.at( i );
|
||||
out << d.m_cFilename << d.m_uiWidth
|
||||
<< d.m_uiHeight
|
||||
<< d.m_iPelFormat
|
||||
<< d.m_uiFrameRate;
|
||||
out << d.m_cFilename
|
||||
<< d.m_uiWidth
|
||||
<< d.m_uiHeight
|
||||
<< d.m_iPelFormat
|
||||
<< d.m_uiFrameRate;
|
||||
|
||||
}
|
||||
return out;
|
||||
|
||||
+8
-6
@@ -157,7 +157,7 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* streamInfo )
|
||||
Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
{
|
||||
SubWindowHandle *interfaceChild = plaYUVerApp::findSubWindow( mdiArea, fileName );
|
||||
if( interfaceChild )
|
||||
@@ -166,18 +166,18 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* streamInfo )
|
||||
return;
|
||||
}
|
||||
interfaceChild = new SubWindowHandle( this ); //createSubWindow();
|
||||
if( !streamInfo )
|
||||
if( !pStreamInfo )
|
||||
{
|
||||
Int idx = findPlaYUVerStreamInfo( m_aRecentFileStreamInfo, fileName );
|
||||
streamInfo = ( PlaYUVerStreamInfo* )( idx >= 0 ? &m_aRecentFileStreamInfo.at( idx ) : NULL );
|
||||
pStreamInfo = ( PlaYUVerStreamInfo* )( idx >= 0 ? &m_aRecentFileStreamInfo.at( idx ) : NULL );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if( !streamInfo )
|
||||
if( !pStreamInfo )
|
||||
interfaceChild->loadFile( fileName );
|
||||
else
|
||||
interfaceChild->loadFile( streamInfo );
|
||||
interfaceChild->loadFile( pStreamInfo );
|
||||
|
||||
statusBar()->showMessage( tr( "Loading file..." ) );
|
||||
mdiArea->addSubWindow( interfaceChild );
|
||||
@@ -194,7 +194,9 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* streamInfo )
|
||||
Int idx = findPlaYUVerStreamInfo( m_aRecentFileStreamInfo, fileName );
|
||||
if( idx >= 0 )
|
||||
m_aRecentFileStreamInfo.remove( idx );
|
||||
m_aRecentFileStreamInfo.prepend( interfaceChild->getStreamInfo() );
|
||||
PlaYUVerStreamInfo streamInfo = interfaceChild->getStreamInfo();
|
||||
qDebug() << streamInfo.m_cFilename;
|
||||
m_aRecentFileStreamInfo.prepend( streamInfo );
|
||||
while( m_aRecentFileStreamInfo.size() > MAX_RECENT_FILES )
|
||||
m_aRecentFileStreamInfo.remove( m_aRecentFileStreamInfo.size() - 1 );
|
||||
updateRecentFileActions();
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ private:
|
||||
QTime m_cTimer;
|
||||
UInt m_uiAveragePlayInterval;
|
||||
|
||||
Void loadFile( QString fileName, PlaYUVerStreamInfo* streamInfo = NULL );
|
||||
Void loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo = NULL );
|
||||
|
||||
Void readRecentFileList();
|
||||
Void writeRecentFileList();
|
||||
|
||||
Reference in New Issue
Block a user