Changeset View
Changeset View
Standalone View
Standalone View
shell/shell.cpp
Show First 20 Lines • Show All 436 Lines • ▼ Show 20 Line(s) | 422 | // button is clicked | |||
---|---|---|---|---|---|
437 | const KParts::ReadWritePart* const curPart = m_tabs[activeTab].part; | 437 | const KParts::ReadWritePart* const curPart = m_tabs[activeTab].part; | ||
438 | if ( curPart->url().isLocalFile() ) | 438 | if ( curPart->url().isLocalFile() ) | ||
439 | startDir = KIO::upUrl(curPart->url()); | 439 | startDir = KIO::upUrl(curPart->url()); | ||
440 | 440 | | |||
441 | QPointer<QFileDialog> dlg( new QFileDialog( this )); | 441 | QPointer<QFileDialog> dlg( new QFileDialog( this )); | ||
442 | dlg->setDirectoryUrl( startDir ); | 442 | dlg->setDirectoryUrl( startDir ); | ||
443 | dlg->setAcceptMode( QFileDialog::AcceptOpen ); | 443 | dlg->setAcceptMode( QFileDialog::AcceptOpen ); | ||
444 | dlg->setOption( QFileDialog::HideNameFilterDetails, true ); | 444 | dlg->setOption( QFileDialog::HideNameFilterDetails, true ); | ||
445 | dlg->setFileMode( QFileDialog::ExistingFiles ); // Allow selection of more than one file | ||||
445 | 446 | | |||
446 | QMimeDatabase mimeDatabase; | 447 | QMimeDatabase mimeDatabase; | ||
447 | QSet<QString> globPatterns; | 448 | QSet<QString> globPatterns; | ||
448 | QMap<QString, QStringList> namedGlobs; | 449 | QMap<QString, QStringList> namedGlobs; | ||
449 | foreach ( const QString &mimeName, m_fileformats ) { | 450 | foreach ( const QString &mimeName, m_fileformats ) { | ||
450 | QMimeType mimeType = mimeDatabase.mimeTypeForName( mimeName ); | 451 | QMimeType mimeType = mimeDatabase.mimeTypeForName( mimeName ); | ||
451 | const QStringList globs( mimeType.globPatterns() ); | 452 | const QStringList globs( mimeType.globPatterns() ); | ||
452 | if ( globs.isEmpty() ) { | 453 | if ( globs.isEmpty() ) { | ||
▲ Show 20 Lines • Show All 341 Lines • Show Last 20 Lines |