diff options
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.cpp')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index add8e6db91..882ad8a5a6 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -49,7 +49,9 @@ #include <qfontmetrics.h> #include <qaction.h> #include <qheaderview.h> -#include <qshortcut.h> +#if QT_CONFIG(shortcut) +# include <qshortcut.h> +#endif #include <qgridlayout.h> #if QT_CONFIG(menu) #include <qmenu.h> @@ -344,7 +346,9 @@ Q_GLOBAL_STATIC(QUrl, lastVisitedDir) QT_BEGIN_INCLUDE_NAMESPACE #include <QMetaEnum> -#include <qshortcut.h> +#if QT_CONFIG(shortcut) +# include <qshortcut.h> +#endif QT_END_INCLUDE_NAMESPACE /*! @@ -2015,6 +2019,9 @@ QStringList QFileDialog::history() const Sets the item delegate used to render items in the views in the file dialog to the given \a delegate. + Any existing delegate will be removed, but not deleted. QFileDialog + does not take ownership of \a delegate. + \warning You should not share the same instance of a delegate between views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the \l{QAbstractItemDelegate::}{closeEditor()} @@ -3122,7 +3129,7 @@ void QFileDialogPrivate::createWidgets() QObject::connect(qFileDialogUi->buttonBox, SIGNAL(rejected()), q, SLOT(reject())); qFileDialogUi->lookInCombo->setFileDialogPrivate(this); - QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(activated(QString)), q, SLOT(_q_goToDirectory(QString))); + QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(textActivated(QString)), q, SLOT(_q_goToDirectory(QString))); qFileDialogUi->lookInCombo->setInsertPolicy(QComboBox::NoInsert); qFileDialogUi->lookInCombo->setDuplicatesEnabled(false); @@ -3152,7 +3159,7 @@ void QFileDialogPrivate::createWidgets() qFileDialogUi->fileTypeCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(int)), q, SLOT(_q_useNameFilter(int))); - QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(QString)), + QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(textActivated(QString)), q, SIGNAL(filterSelected(QString))); qFileDialogUi->listView->setFileDialogPrivate(this); |