void RecentFiles::_updateWindowTitle() { if( !_adjustTitle ) return; QString title = _titleBase; const QString currentName = getCurrentName(); if( currentName.size() != 0 ) title += QString(" - ") + strippedName( currentName ); setWindowTitle( title ); }
/** * Open file dialog */ void MainWindow::_open() { QFileDialog dialog( this ); dialog.setFileMode( QFileDialog::ExistingFile ); dialog.setDirectory( getCurrentName( )); if( !dialog.exec( )) return; QStringList files = dialog.selectedFiles(); if( files.isEmpty( ) || files.first().isEmpty( )) return; _loadFile( files.first( )); }