diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-31 22:34:24 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-07-02 10:38:58 +0000 |
commit | 341554e34393199d8f6ba401df1fab0bfbb10188 (patch) | |
tree | d8ec48060434e6a4e2b249be647800335adf3475 /src/widgets/dialogs/qfiledialog.cpp | |
parent | 379179df9d172fd350f869c9f87391c05090187d (diff) |
Convert features.fscompleter to QT_[REQUIRE_]CONFIG
Fix one #include as only QCompleter is used and not QFSCompleter.
Change-Id: Ia1e722122f7e322c678d2db6962c6086c684ddd9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.cpp')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 0c609dc5f7..b638adeaec 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -841,7 +841,7 @@ void QFileDialog::setVisible(bool visible) // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below // updates the state correctly, but skips showing the non-native version: setAttribute(Qt::WA_DontShowOnScreen); -#ifndef QT_NO_FSCOMPLETER +#if QT_CONFIG(fscompleter) // So the completer doesn't try to complete and therefore show a popup if (!d->nativeDialogInUse) d->completer->setModel(0); @@ -849,7 +849,7 @@ void QFileDialog::setVisible(bool visible) } else { d->createWidgets(); setAttribute(Qt::WA_DontShowOnScreen, false); -#ifndef QT_NO_FSCOMPLETER +#if QT_CONFIG(fscompleter) if (!d->nativeDialogInUse) { if (d->proxyModel != 0) d->completer->setModel(d->proxyModel); @@ -922,7 +922,7 @@ void QFileDialog::setDirectory(const QString &directory) if (!d->nativeDialogInUse) { d->qFileDialogUi->newFolderButton->setEnabled(d->model->flags(root) & Qt::ItemIsDropEnabled); if (root != d->rootIndex()) { -#ifndef QT_NO_FSCOMPLETER +#if QT_CONFIG(fscompleter) if (directory.endsWith(QLatin1Char('/'))) d->completer->setCompletionPrefix(newDirectory); else @@ -2909,10 +2909,10 @@ void QFileDialogPrivate::createWidgets() #ifndef QT_NO_SHORTCUT qFileDialogUi->fileNameLabel->setBuddy(qFileDialogUi->fileNameEdit); #endif -#ifndef QT_NO_FSCOMPLETER +#if QT_CONFIG(fscompleter) completer = new QFSCompleter(model, q); qFileDialogUi->fileNameEdit->setCompleter(completer); -#endif // QT_NO_FSCOMPLETER +#endif // QT_CONFIG(fscompleter) qFileDialogUi->fileNameEdit->setInputMethodHints(Qt::ImhNoPredictiveText); @@ -3078,7 +3078,7 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) proxyModel->setSourceModel(d->model); d->qFileDialogUi->listView->setModel(d->proxyModel); d->qFileDialogUi->treeView->setModel(d->proxyModel); -#ifndef QT_NO_FSCOMPLETER +#if QT_CONFIG(fscompleter) d->completer->setModel(d->proxyModel); d->completer->proxyModel = d->proxyModel; #endif @@ -3088,7 +3088,7 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) d->proxyModel = 0; d->qFileDialogUi->listView->setModel(d->model); d->qFileDialogUi->treeView->setModel(d->model); -#ifndef QT_NO_FSCOMPLETER +#if QT_CONFIG(fscompleter) d->completer->setModel(d->model); d->completer->sourceModel = d->model; d->completer->proxyModel = 0; @@ -4028,7 +4028,7 @@ void QFileDialogLineEdit::keyPressEvent(QKeyEvent *e) e->accept(); } -#ifndef QT_NO_FSCOMPLETER +#if QT_CONFIG(fscompleter) QString QFSCompleter::pathFromIndex(const QModelIndex &index) const { |