From 74438ef7c14f19cecda0910a122eb8887dab649d Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 26 Jun 2013 15:38:11 +0200 Subject: QtQuick.Dialogs: sync the docs with the implementation We've been using URLs instead of strings for some time now, just forgot to change the docs until now. Task-number: QTBUG-31847 Change-Id: I49a42282aeefb95e4d367397e2f290f4af65687e Reviewed-by: Jerome Pasion Reviewed-by: Venugopal Shivashankar --- src/imports/dialogs/qquickcolordialog.cpp | 10 ++-------- src/imports/dialogs/qquickfiledialog.cpp | 10 +++++----- src/imports/dialogs/qquickplatformcolordialog.cpp | 6 +++--- src/imports/dialogs/qquickplatformfiledialog.cpp | 20 ++++++++++---------- src/imports/widgets/qquickqfiledialog.cpp | 4 ++-- 5 files changed, 22 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/imports/dialogs/qquickcolordialog.cpp b/src/imports/dialogs/qquickcolordialog.cpp index 39af99770e..d0e0e11b07 100644 --- a/src/imports/dialogs/qquickcolordialog.cpp +++ b/src/imports/dialogs/qquickcolordialog.cpp @@ -64,13 +64,13 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::AbstractColorDialog::accepted - The \a accepted signal is emitted by \l accept(). + This signal is emitted by \l accept(). */ /*! \qmlsignal QtQuick::Dialogs::AbstractColorDialog::rejected - The \a accepted signal is emitted by \l reject(). + This signal is emitted by \l reject(). */ /*! @@ -109,12 +109,6 @@ QQuickColorDialog::~QQuickColorDialog() This property holds whether the dialog is visible. By default this is false. */ -/*! - \qmlproperty bool AbstractColorDialog::filePaths - - A list of files to be populated as the user chooses. -*/ - /*! \qmlproperty QObject AbstractColorDialog::implementation diff --git a/src/imports/dialogs/qquickfiledialog.cpp b/src/imports/dialogs/qquickfiledialog.cpp index f78e8a6f8d..f5d1a06d04 100644 --- a/src/imports/dialogs/qquickfiledialog.cpp +++ b/src/imports/dialogs/qquickfiledialog.cpp @@ -64,13 +64,13 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::AbstractFileDialog::accepted - The \a accepted signal is emitted by \l accept(). + This signal is emitted by \l accept(). */ /*! \qmlsignal QtQuick::Dialogs::AbstractFileDialog::rejected - The \a accepted signal is emitted by \l reject(). + This signal is emitted by \l reject(). */ /*! @@ -118,13 +118,13 @@ QList QQuickFileDialog::fileUrls() */ /*! - \qmlproperty bool AbstractFileDialog::filePaths + \qmlproperty bool AbstractFileDialog::fileUrls A list of files to be populated as the user chooses. */ /*! - \brief Clears \l filePaths + \brief Clears \l fileUrls */ void QQuickFileDialog::clearSelection() { @@ -132,7 +132,7 @@ void QQuickFileDialog::clearSelection() } /*! - \brief Adds one file to \l filePaths + \brief Adds one file to \l fileUrls \l path should be given as an absolute file system path. If it is given as a file:// URL, it will be converted to a path. Returns true on success, diff --git a/src/imports/dialogs/qquickplatformcolordialog.cpp b/src/imports/dialogs/qquickplatformcolordialog.cpp index ea3114c86e..8dc6d09f2c 100644 --- a/src/imports/dialogs/qquickplatformcolordialog.cpp +++ b/src/imports/dialogs/qquickplatformcolordialog.cpp @@ -102,8 +102,8 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::ColorDialog::accepted - The \a accepted signal is emitted when the user has finished using the - dialog. You can then inspect the \a color property to get the selection. + This handler is called when the user has finished using the + dialog. You can then inspect the \l color property to get the selection. Example: @@ -117,7 +117,7 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::ColorDialog::rejected - The \a rejected signal is emitted when the user has dismissed the dialog, + This handler is called when the user has dismissed the dialog, either by closing the dialog window or by pressing the Cancel button. */ diff --git a/src/imports/dialogs/qquickplatformfiledialog.cpp b/src/imports/dialogs/qquickplatformfiledialog.cpp index 5ae7fd0067..ec9f935738 100644 --- a/src/imports/dialogs/qquickplatformfiledialog.cpp +++ b/src/imports/dialogs/qquickplatformfiledialog.cpp @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE id: fileDialog title: "Please choose a file" onAccepted: { - console.log("You chose: " + fileDialog.filePaths) + console.log("You chose: " + fileDialog.fileUrls) Qt.quit() } onRejected: { @@ -103,15 +103,15 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::FileDialog::accepted - The \a accepted signal is emitted when the user has finished using the - dialog. You can then inspect the \a filePath or \a filePaths properties to + This handler is called when the user has finished using the + dialog. You can then inspect the \l fileUrl or \l fileUrls properties to get the selection. Example: \qml FileDialog { - onAccepted: { console.log("Selected file: " + filePath) } + onAccepted: { console.log("Selected file: " + fileUrl) } } \endqml */ @@ -119,7 +119,7 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal QtQuick::Dialogs::FileDialog::rejected - The \a rejected signal is emitted when the user has dismissed the dialog, + This handler is called when the user has dismissed the dialog, either by closing the dialog window or by pressing the Cancel button. */ @@ -191,7 +191,7 @@ QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper() containing the dialog's parent Item, modal with respect to the whole application, or non-modal. - By default it is \l WindowModal. + By default it is \c Qt.WindowModal. Modality does not mean that there are any blocking calls to wait for the dialog to be accepted or rejected; it's only that the user will be @@ -295,18 +295,18 @@ QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper() */ /*! - \qmlproperty string FileDialog::filePath + \qmlproperty url FileDialog::fileUrl The path of the file which was selected by the user. \note This property is set only if exactly one file was selected. In all - other cases, it will return an empty string. + other cases, it will be empty. - \sa filePaths + \sa fileUrls */ /*! - \qmlproperty list FileDialog::filePaths + \qmlproperty list FileDialog::fileUrls The list of file paths which were selected by the user. */ diff --git a/src/imports/widgets/qquickqfiledialog.cpp b/src/imports/widgets/qquickqfiledialog.cpp index afb150b509..498e34a24c 100644 --- a/src/imports/widgets/qquickqfiledialog.cpp +++ b/src/imports/widgets/qquickqfiledialog.cpp @@ -135,14 +135,14 @@ private: \qmlsignal QtQuick::Dialogs::FileDialog::accepted The \a accepted signal is emitted when the user has finished using the - dialog. You can then inspect the \a filePath or \a filePaths properties to + dialog. You can then inspect the \a fileUrl or \a fileUrls properties to get the selection. Example: \qml FileDialog { - onAccepted: { console.log("Selected file: " + filePath) } + onAccepted: { console.log("Selected file: " + fileUrl) } } \endqml */ -- cgit v1.2.3