File indexing completed on 2024-05-05 17:42:25
0001 /* 0002 SPDX-FileCopyrightText: 2001, 2002 Carsten Pfeiffer <pfeiffer@kde.org> 0003 SPDX-FileCopyrightText: 2001 Michael Jarrett <michaelj@corel.com> 0004 SPDX-FileCopyrightText: 2009 Shaun Reich <shaun.reich@kdemail.net> 0005 0006 SPDX-License-Identifier: LGPL-2.0-only 0007 */ 0008 0009 #include "kdirselectdialog_p.h" 0010 0011 #include <QDebug> 0012 #include <QDialogButtonBox> 0013 #include <QDir> 0014 #include <QFileDialog> 0015 #include <QInputDialog> 0016 #include <QLayout> 0017 #include <QMenu> 0018 #include <QPushButton> 0019 #include <QStandardPaths> 0020 #include <QStringList> 0021 #include <QUrl> 0022 0023 #include <KActionCollection> 0024 #include <KAuthorized> 0025 #include <KConfig> 0026 #include <KConfigGroup> 0027 #include <KFileItemDelegate> 0028 #include <KFileUtils> 0029 #include <KFileWidget> 0030 #include <KHistoryComboBox> 0031 #include <KIO/CopyJob> 0032 #include <KIO/DeleteJob> 0033 #include <KIO/DeleteOrTrashJob> 0034 #include <KIO/Job> 0035 #include <KIO/JobUiDelegate> 0036 #include <KIO/MkdirJob> 0037 #include <KJobWidgets> 0038 #include <KLocalizedString> 0039 #include <KMessageBox> 0040 #include <KPropertiesDialog> 0041 #include <KRecentDirs> 0042 #include <KService> 0043 #include <KSharedConfig> 0044 #include <KStandardShortcut> 0045 #include <KToggleAction> 0046 #include <KUrlCompletion> 0047 0048 #include "kfiletreeview_p.h" 0049 #include <KFilePlacesModel> 0050 #include <KFilePlacesView> 0051 // ### add mutator for treeview! 0052 0053 class KDirSelectDialog::Private 0054 { 0055 public: 0056 Private(bool localOnly, KDirSelectDialog *parent) 0057 : m_parent(parent) 0058 , m_localOnly(localOnly) 0059 , m_comboLocked(false) 0060 { 0061 } 0062 0063 void readConfig(const KSharedConfigPtr &config, const QString &group); 0064 void saveConfig(KSharedConfigPtr config, const QString &group); 0065 void slotMkdir(); 0066 0067 void slotCurrentChanged(const QUrl &url); 0068 void slotExpand(const QModelIndex &); 0069 void slotUrlActivated(const QString &); 0070 void slotComboTextChanged(const QString &); 0071 void slotContextMenuRequested(const QPoint &); 0072 void slotMoveToTrash(); 0073 void slotDelete(); 0074 void slotProperties(); 0075 0076 KDirSelectDialog *const m_parent; 0077 bool m_localOnly : 1; 0078 bool m_comboLocked : 1; 0079 QUrl m_rootUrl; 0080 QUrl m_startDir; 0081 KFileTreeView *m_treeView = nullptr; 0082 QMenu *m_contextMenu = nullptr; 0083 KActionCollection *m_actions = nullptr; 0084 KFilePlacesView *m_placesView = nullptr; 0085 KHistoryComboBox *m_urlCombo = nullptr; 0086 QString m_recentDirClass; 0087 QUrl m_startURL; 0088 QAction *moveToTrash = nullptr; 0089 QAction *deleteAction = nullptr; 0090 QAction *showHiddenFoldersAction = nullptr; 0091 }; 0092 0093 void KDirSelectDialog::Private::readConfig(const KSharedConfig::Ptr &config, const QString &group) 0094 { 0095 m_urlCombo->clear(); 0096 0097 KConfigGroup conf(config, group); 0098 m_urlCombo->setHistoryItems(conf.readPathEntry("History Items", QStringList())); 0099 0100 const QSize size = conf.readEntry("DirSelectDialog Size", QSize()); 0101 if (size.isValid()) { 0102 m_parent->resize(size); 0103 } 0104 } 0105 0106 void KDirSelectDialog::Private::saveConfig(KSharedConfig::Ptr config, const QString &group) 0107 { 0108 KConfigGroup conf(config, group); 0109 KConfigGroup::WriteConfigFlags flags(KConfigGroup::Persistent | KConfigGroup::Global); 0110 conf.writePathEntry("History Items", m_urlCombo->historyItems(), flags); 0111 conf.writeEntry("DirSelectDialog Size", m_parent->size(), flags); 0112 0113 config->sync(); 0114 } 0115 0116 void KDirSelectDialog::Private::slotMkdir() 0117 { 0118 bool ok; 0119 QString where = m_parent->url().toDisplayString(QUrl::PreferLocalFile); 0120 QString name = i18nc("folder name", "New Folder"); 0121 if (m_parent->url().isLocalFile() && QFileInfo::exists(m_parent->url().toLocalFile() + QLatin1Char('/') + name)) { 0122 name = KFileUtils::suggestName(m_parent->url(), name); 0123 } 0124 0125 const QString directory = QInputDialog::getText(m_parent, 0126 i18nc("@title:window", "New Folder"), 0127 i18nc("@label:textbox", "Create new folder in:\n%1", where), 0128 QLineEdit::Normal, 0129 name, 0130 &ok); 0131 if (!ok) { 0132 return; 0133 } 0134 0135 bool writeOk = false; 0136 bool exists = false; 0137 QUrl folderurl(m_parent->url()); 0138 0139 const QStringList dirs = directory.split(QLatin1Char('/'), Qt::SkipEmptyParts); 0140 QStringList::ConstIterator it = dirs.begin(); 0141 0142 for (; it != dirs.end(); ++it) { 0143 folderurl.setPath(folderurl.path() + QLatin1Char('/') + *it); 0144 KIO::StatJob *job = KIO::stat(folderurl); 0145 KJobWidgets::setWindow(job, m_parent); 0146 job->setDetails(KIO::StatNoDetails); // We only want to know if it exists 0147 job->setSide(KIO::StatJob::DestinationSide); 0148 exists = job->exec(); 0149 if (!exists) { 0150 KIO::MkdirJob *job = KIO::mkdir(folderurl); 0151 KJobWidgets::setWindow(job, m_parent); 0152 writeOk = job->exec(); 0153 } 0154 } 0155 0156 if (exists) { // url was already existent 0157 QString which = folderurl.toDisplayString(QUrl::PreferLocalFile); 0158 KMessageBox::error(m_parent, i18n("A file or folder named %1 already exists.", which)); 0159 // Select the existing dir (if a file with that name exists, it won't be selected since 0160 // we only show dirs here, this is cheaper than checking if the existing item is a file 0161 // or folder). 0162 m_parent->setCurrentUrl(folderurl); 0163 return; 0164 } 0165 0166 if (!writeOk) { 0167 KMessageBox::error(m_parent, i18n("You do not have permission to create that folder.")); 0168 return; 0169 } 0170 0171 // Select the newly created dir 0172 m_parent->setCurrentUrl(folderurl); 0173 } 0174 0175 void KDirSelectDialog::Private::slotCurrentChanged(const QUrl &url) 0176 { 0177 if (m_comboLocked) { 0178 return; 0179 } 0180 0181 if (url.isValid()) { 0182 m_urlCombo->setEditText(url.toDisplayString(QUrl::PreferLocalFile)); 0183 } else { 0184 m_urlCombo->setEditText(QString()); 0185 } 0186 } 0187 0188 void KDirSelectDialog::Private::slotUrlActivated(const QString &text) 0189 { 0190 if (text.isEmpty()) { 0191 return; 0192 } 0193 0194 const QUrl url = QUrl::fromUserInput(text); 0195 m_urlCombo->addToHistory(url.toDisplayString()); 0196 0197 if (m_parent->localOnly() && !url.isLocalFile()) { 0198 return; // FIXME: messagebox for the user 0199 } 0200 0201 QUrl oldUrl = m_treeView->currentUrl(); 0202 if (oldUrl.isEmpty()) { 0203 oldUrl = m_startDir; 0204 } 0205 0206 m_parent->setCurrentUrl(oldUrl); 0207 } 0208 0209 void KDirSelectDialog::Private::slotComboTextChanged(const QString &text) 0210 { 0211 m_treeView->blockSignals(true); 0212 QUrl url = QUrl::fromUserInput(text); 0213 #ifdef Q_OS_WIN 0214 QUrl rootUrl(m_treeView->rootUrl()); 0215 if (url.isLocalFile() && !rootUrl.isParentOf(url) && !rootUrl.matches(url, QUrl::StripTrailingSlash)) { 0216 QUrl tmp = KIO::upUrl(url); 0217 while (tmp.path().length() > 1) { 0218 url = tmp; 0219 tmp = KIO::upUrl(url); 0220 } 0221 m_treeView->setRootUrl(url); 0222 } 0223 #endif 0224 m_treeView->setCurrentUrl(url); 0225 m_treeView->blockSignals(false); 0226 } 0227 0228 void KDirSelectDialog::Private::slotContextMenuRequested(const QPoint &pos) 0229 { 0230 m_contextMenu->popup(m_treeView->viewport()->mapToGlobal(pos)); 0231 } 0232 0233 void KDirSelectDialog::Private::slotExpand(const QModelIndex &index) 0234 { 0235 m_treeView->setExpanded(index, !m_treeView->isExpanded(index)); 0236 } 0237 0238 void KDirSelectDialog::Private::slotMoveToTrash() 0239 { 0240 const QUrl url = m_treeView->selectedUrl(); 0241 using Iface = KIO::AskUserActionInterface; 0242 auto *trashJob = new KIO::DeleteOrTrashJob({url}, Iface::Trash, Iface::DefaultConfirmation, m_parent); 0243 trashJob->start(); 0244 } 0245 0246 void KDirSelectDialog::Private::slotDelete() 0247 { 0248 const QUrl url = m_treeView->selectedUrl(); 0249 using Iface = KIO::AskUserActionInterface; 0250 auto *deleteJob = new KIO::DeleteOrTrashJob({url}, Iface::Delete, Iface::DefaultConfirmation, m_parent); 0251 deleteJob->start(); 0252 } 0253 0254 void KDirSelectDialog::Private::slotProperties() 0255 { 0256 KPropertiesDialog *dialog = new KPropertiesDialog(m_treeView->selectedUrl(), this->m_parent); 0257 dialog->setAttribute(Qt::WA_DeleteOnClose); 0258 dialog->show(); 0259 } 0260 0261 KDirSelectDialog::KDirSelectDialog(const QUrl &startDir, bool localOnly, QWidget *parent) 0262 // #ifdef Q_OS_WIN 0263 // : QDialog(parent, Qt::WindowMinMaxButtonsHint), 0264 // #else 0265 // : QDialog(parent), 0266 // #endif 0267 : d(new Private(localOnly, this)) 0268 { 0269 setWindowTitle(i18nc("@title:window", "Select Folder")); 0270 0271 QVBoxLayout *topLayout = new QVBoxLayout; 0272 setLayout(topLayout); 0273 0274 QFrame *page = new QFrame(this); 0275 topLayout->addWidget(page); 0276 0277 QPushButton *folderButton = new QPushButton(this); 0278 KGuiItem::assign(folderButton, KGuiItem(i18nc("@action:button", "New Folder..."), QStringLiteral("folder-new"))); 0279 connect(folderButton, &QPushButton::clicked, this, [this]() { 0280 d->slotMkdir(); 0281 }); 0282 0283 m_buttons = new QDialogButtonBox(this); 0284 m_buttons->addButton(folderButton, QDialogButtonBox::ActionRole); 0285 m_buttons->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); 0286 connect(m_buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); 0287 connect(m_buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); 0288 topLayout->addWidget(m_buttons); 0289 0290 QHBoxLayout *hlay = new QHBoxLayout(page); 0291 hlay->setContentsMargins(0, 0, 0, 0); 0292 QVBoxLayout *mainLayout = new QVBoxLayout(); 0293 d->m_actions = new KActionCollection(this); 0294 d->m_actions->addAssociatedWidget(this); 0295 d->m_placesView = new KFilePlacesView(page); 0296 d->m_placesView->setModel(new KFilePlacesModel(d->m_placesView)); 0297 d->m_placesView->setObjectName(QStringLiteral("speedbar")); 0298 d->m_placesView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 0299 d->m_placesView->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 0300 connect(d->m_placesView, &KFilePlacesView::urlChanged, this, &KDirSelectDialog::setCurrentUrl); 0301 hlay->addWidget(d->m_placesView); 0302 hlay->addLayout(mainLayout); 0303 0304 d->m_treeView = new KFileTreeView(page); 0305 d->m_treeView->setDirOnlyMode(true); 0306 d->m_treeView->setContextMenuPolicy(Qt::CustomContextMenu); 0307 0308 for (int i = 1; i < d->m_treeView->model()->columnCount(); ++i) { 0309 d->m_treeView->hideColumn(i); 0310 } 0311 0312 d->m_urlCombo = new KHistoryComboBox(page); 0313 d->m_urlCombo->setLayoutDirection(Qt::LeftToRight); 0314 d->m_urlCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents); 0315 d->m_urlCombo->setTrapReturnKey(true); 0316 d->m_urlCombo->setIconProvider([](const QString &name) { 0317 return QIcon::fromTheme(KIO::iconNameForUrl(QUrl::fromUserInput(name))); 0318 }); 0319 KUrlCompletion *comp = new KUrlCompletion(); 0320 comp->setMode(KUrlCompletion::DirCompletion); 0321 d->m_urlCombo->setCompletionObject(comp, true); 0322 d->m_urlCombo->setAutoDeleteCompletionObject(true); 0323 d->m_urlCombo->setDuplicatesEnabled(false); 0324 0325 d->m_contextMenu = new QMenu(this); 0326 0327 QAction *newFolder = new QAction(i18nc("@action:inmenu", "New Folder..."), this); 0328 d->m_actions->addAction(newFolder->objectName(), newFolder); 0329 newFolder->setIcon(QIcon::fromTheme(QStringLiteral("folder-new"))); 0330 newFolder->setShortcuts(KStandardShortcut::createFolder()); 0331 connect(newFolder, &QAction::triggered, this, [this]() { 0332 d->slotMkdir(); 0333 }); 0334 d->m_contextMenu->addAction(newFolder); 0335 0336 d->moveToTrash = new QAction(i18nc("@action:inmenu", "Move to Trash"), this); 0337 d->m_actions->addAction(d->moveToTrash->objectName(), d->moveToTrash); 0338 d->moveToTrash->setIcon(QIcon::fromTheme(QStringLiteral("user-trash"))); 0339 d->moveToTrash->setShortcut(Qt::Key_Delete); 0340 connect(d->moveToTrash, &QAction::triggered, this, [this]() { 0341 d->slotMoveToTrash(); 0342 }); 0343 d->m_contextMenu->addAction(d->moveToTrash); 0344 0345 d->deleteAction = new QAction(i18nc("@action:inmenu", "Delete"), this); 0346 d->m_actions->addAction(d->deleteAction->objectName(), d->deleteAction); 0347 d->deleteAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); 0348 d->deleteAction->setShortcut(Qt::SHIFT | Qt::Key_Delete); 0349 connect(d->deleteAction, &QAction::triggered, this, [this]() { 0350 d->slotDelete(); 0351 }); 0352 d->m_contextMenu->addAction(d->deleteAction); 0353 0354 d->m_contextMenu->addSeparator(); 0355 0356 d->showHiddenFoldersAction = new KToggleAction(i18nc("@option:check", "Show Hidden Folders"), this); 0357 d->m_actions->addAction(d->showHiddenFoldersAction->objectName(), d->showHiddenFoldersAction); 0358 d->showHiddenFoldersAction->setShortcuts(KStandardShortcut::showHideHiddenFiles()); 0359 connect(d->showHiddenFoldersAction, &QAction::triggered, d->m_treeView, &KFileTreeView::setShowHiddenFiles); 0360 d->m_contextMenu->addAction(d->showHiddenFoldersAction); 0361 d->m_contextMenu->addSeparator(); 0362 0363 QAction *propertiesAction = new QAction(i18nc("@action:inmenu", "Properties"), this); 0364 d->m_actions->addAction(propertiesAction->objectName(), propertiesAction); 0365 propertiesAction->setIcon(QIcon::fromTheme(QStringLiteral("document-properties"))); 0366 propertiesAction->setShortcut(Qt::ALT | Qt::Key_Return); 0367 connect(propertiesAction, &QAction::triggered, this, [this]() { 0368 d->slotProperties(); 0369 }); 0370 d->m_contextMenu->addAction(propertiesAction); 0371 0372 d->m_startURL = KFileWidget::getStartUrl(startDir, d->m_recentDirClass); 0373 if (localOnly && !d->m_startURL.isLocalFile()) { 0374 QString docPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); 0375 if (QDir(docPath).exists()) { 0376 d->m_startURL = QUrl::fromLocalFile(docPath); 0377 } else { 0378 d->m_startURL = QUrl::fromLocalFile(QDir::homePath()); 0379 } 0380 } 0381 0382 d->m_startDir = d->m_startURL; 0383 d->m_rootUrl = d->m_treeView->rootUrl(); 0384 0385 d->readConfig(KSharedConfig::openConfig(), QStringLiteral("DirSelect Dialog")); 0386 0387 mainLayout->addWidget(d->m_treeView, 1); 0388 mainLayout->addWidget(d->m_urlCombo, 0); 0389 0390 connect(d->m_treeView, &KFileTreeView::currentUrlChanged, this, [this](const QUrl &url) { 0391 d->slotCurrentChanged(url); 0392 }); 0393 0394 connect(d->m_treeView, &QAbstractItemView::activated, this, [this](const QModelIndex &index) { 0395 d->slotExpand(index); 0396 }); 0397 0398 connect(d->m_treeView, &QWidget::customContextMenuRequested, this, [this](const QPoint &pos) { 0399 d->slotContextMenuRequested(pos); 0400 }); 0401 0402 connect(d->m_urlCombo, &QComboBox::editTextChanged, this, [this](const QString &text) { 0403 d->slotComboTextChanged(text); 0404 }); 0405 0406 connect(d->m_urlCombo, &QComboBox::textActivated, this, [this](const QString &text) { 0407 d->slotUrlActivated(text); 0408 }); 0409 0410 connect(d->m_urlCombo, QOverload<const QString &>::of(&KComboBox::returnPressed), this, [this](const QString &text) { 0411 d->slotUrlActivated(text); 0412 }); 0413 0414 setCurrentUrl(d->m_startURL); 0415 } 0416 0417 KDirSelectDialog::~KDirSelectDialog() 0418 { 0419 delete d; 0420 } 0421 0422 QUrl KDirSelectDialog::url() const 0423 { 0424 QUrl comboUrl = QUrl::fromUserInput(d->m_urlCombo->currentText()); 0425 0426 if (comboUrl.isValid()) { 0427 KIO::StatJob *statJob = KIO::stat(comboUrl, KIO::HideProgressInfo); 0428 KJobWidgets::setWindow(statJob, d->m_parent); 0429 const bool ok = statJob->exec(); 0430 if (ok && statJob->statResult().isDir()) { 0431 return comboUrl; 0432 } 0433 } 0434 0435 // qDebug() << comboUrl.path() << " is not an accessible directory"; 0436 return d->m_treeView->currentUrl(); 0437 } 0438 0439 QUrl KDirSelectDialog::rootUrl() const 0440 { 0441 return d->m_rootUrl; 0442 } 0443 0444 QAbstractItemView *KDirSelectDialog::view() const 0445 { 0446 return d->m_treeView; 0447 } 0448 0449 bool KDirSelectDialog::localOnly() const 0450 { 0451 return d->m_localOnly; 0452 } 0453 0454 QUrl KDirSelectDialog::startDir() const 0455 { 0456 return d->m_startDir; 0457 } 0458 0459 void KDirSelectDialog::setCurrentUrl(const QUrl &url) 0460 { 0461 if (!url.isValid()) { 0462 return; 0463 } 0464 0465 if (url.scheme() != d->m_rootUrl.scheme()) { 0466 QUrl u(url); 0467 // We need the url to end with / because some code ahead (kdirmodel) is expecting 0468 // to find the / separator. It can happen that a valid url like smb: does not have 0469 // one so we should add it. 0470 if (!u.toString().endsWith(QLatin1Char('/'))) { 0471 u.setPath(QStringLiteral("/")); 0472 } 0473 0474 d->m_treeView->setRootUrl(u); 0475 d->m_rootUrl = u; 0476 } 0477 0478 // Check if url represents a hidden folder and enable showing them 0479 QString fileName = url.fileName(); 0480 // TODO a better hidden file check? 0481 bool isHidden = fileName.length() > 1 && fileName[0] == QLatin1Char('.') && (fileName.length() > 2 ? fileName[1] != QLatin1Char('.') : true); 0482 bool showHiddenFiles = isHidden && !d->m_treeView->showHiddenFiles(); 0483 if (showHiddenFiles) { 0484 d->showHiddenFoldersAction->setChecked(true); 0485 d->m_treeView->setShowHiddenFiles(true); 0486 } 0487 0488 d->m_treeView->setCurrentUrl(url); 0489 } 0490 0491 void KDirSelectDialog::accept() 0492 { 0493 QUrl selectedUrl = url(); 0494 if (!selectedUrl.isValid()) { 0495 return; 0496 } 0497 0498 if (!d->m_recentDirClass.isEmpty()) { 0499 KRecentDirs::add(d->m_recentDirClass, selectedUrl.toString()); 0500 } 0501 0502 d->m_urlCombo->addToHistory(selectedUrl.toDisplayString()); 0503 KFileWidget::setStartDir(url()); 0504 0505 QDialog::accept(); 0506 } 0507 0508 void KDirSelectDialog::hideEvent(QHideEvent *event) 0509 { 0510 d->saveConfig(KSharedConfig::openConfig(), QStringLiteral("DirSelect Dialog")); 0511 0512 QDialog::hideEvent(event); 0513 } 0514 0515 // static 0516 QUrl KDirSelectDialog::selectDirectory(const QUrl &startDir, bool localOnly, QWidget *parent, const QString &caption) 0517 { 0518 KDirSelectDialog myDialog(startDir, localOnly, parent); 0519 0520 if (!caption.isNull()) { 0521 myDialog.setWindowTitle(caption); 0522 } 0523 0524 if (myDialog.exec() == QDialog::Accepted) { 0525 QUrl url = myDialog.url(); 0526 0527 // Returning the most local url 0528 if (url.isLocalFile()) { 0529 return url; 0530 } 0531 0532 KIO::StatJob *job = KIO::stat(url); 0533 KJobWidgets::setWindow(job, parent); 0534 0535 if (!job->exec()) { 0536 return url; 0537 } 0538 0539 KIO::UDSEntry entry = job->statResult(); 0540 const QString path = entry.stringValue(KIO::UDSEntry::UDS_LOCAL_PATH); 0541 0542 return path.isEmpty() ? url : QUrl::fromLocalFile(path); 0543 } else { 0544 return QUrl(); 0545 } 0546 } 0547 0548 QUrl KDirSelectDialog::directory() 0549 { 0550 return url(); 0551 } 0552 0553 QList<QUrl> KDirSelectDialog::selectedFiles() 0554 { 0555 return QList<QUrl>() << url(); 0556 } 0557 0558 void KDirSelectDialog::setOkButtonText(const QString &text) 0559 { 0560 m_buttons->button(QDialogButtonBox::Ok)->setText(text); 0561 } 0562 0563 void KDirSelectDialog::setCancelButtonText(const QString &text) 0564 { 0565 m_buttons->button(QDialogButtonBox::Cancel)->setText(text); 0566 } 0567 0568 void KDirSelectDialog::setDirectory(const QUrl &directory) 0569 { 0570 setCurrentUrl(directory); 0571 } 0572 0573 QString KDirSelectDialog::selectedMimeTypeFilter() 0574 { 0575 return QString(); 0576 } 0577 0578 QString KDirSelectDialog::selectedNameFilter() 0579 { 0580 return QString(); 0581 } 0582 0583 QString KDirSelectDialog::currentFilterText() 0584 { 0585 return QString(); 0586 } 0587 0588 void KDirSelectDialog::selectFile(const QUrl &filename) 0589 { 0590 Q_UNUSED(filename) 0591 } 0592 0593 void KDirSelectDialog::selectMimeTypeFilter(const QString &filter) 0594 { 0595 Q_UNUSED(filter) 0596 } 0597 0598 void KDirSelectDialog::selectNameFilter(const QString &filter) 0599 { 0600 Q_UNUSED(filter) 0601 } 0602 0603 #include "moc_kdirselectdialog_p.cpp"