recent files: do not add '-' (aka stdin) when reading a document from it

svn path=/trunk/KDE/kdegraphics/okular/; revision=882131
This commit is contained in:
Pino Toscano 2008-11-09 21:40:06 +00:00
parent f6828bab02
commit 8583cda513

View file

@ -134,8 +134,14 @@ void Shell::openUrl( const KUrl & url, uint page )
if ( m_doc && m_args && m_args->isSet( "presentation" ) )
m_doc->startPresentation();
bool openOk = page > 0 && m_doc ? m_doc->openDocument( url, page ) : m_part->openUrl( url );
if ( openOk ) m_recent->addUrl( url );
else m_recent->removeUrl( url );
const bool isstdin = url.fileName( KUrl::ObeyTrailingSlash ) == QLatin1String( "-" );
if ( !isstdin )
{
if ( openOk )
m_recent->addUrl( url );
else
m_recent->removeUrl( url );
}
}
}