diff options
| author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2024-11-28 14:23:34 +0100 |
|---|---|---|
| committer | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2024-12-05 16:53:27 +0100 |
| commit | 9a6d405cd639f839752a41b8b95627a9627ab0c7 (patch) | |
| tree | f992a74fbfee0e79e43a4d087ffbfaa23cb84563 /src | |
| parent | 8ae5d081c5d81336fc15c5f8b3ac0bf579dca0d2 (diff) | |
Deprecate the dialogs in Qt.labs.platform
With recent improvements made to our dialogs in QtQuick.Dialogs, it
would make sense to deprecate our dialogs in labs platform.
As I've understood it, this has been the plan all along.
Our documentation should also become less confusing as a result.
In Qt 6.8, we made all dialogs in QtQuick.Dialogs use top-level popup
windows (18c4bf827dabea735435887f84ad1bea4136b1ea), which improves the
usability on desktop systems. This was the advantage that the
Qt.labs.platform dialogs had over QtQuick.Dialogs, due to the
Qt.labs.platform dialogs using our standard dialogs in QtWidgets as
fallback, which has always been top-level windows.
In Qt 6.9, we're also adding a sidebar to the QtQuick.Dialogs file and
font dialogs.
[ChangeLog][QtLabsPlatform] FileDialog, FontDialog, FolderDialog,
MessageDialog and ColorDialog are now deprecated. Use QtQuick.Dialogs
instead.
Task-number: QTBUG-130864
Change-Id: I38a5bd66d50a12973607777b4e40f2ae85c98b5d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
11 files changed, 54 insertions, 3 deletions
diff --git a/src/labs/platform/doc/qtlabsplatform.qdocconf b/src/labs/platform/doc/qtlabsplatform.qdocconf index 5ccd189f59..fc7bf8a8c0 100644 --- a/src/labs/platform/doc/qtlabsplatform.qdocconf +++ b/src/labs/platform/doc/qtlabsplatform.qdocconf @@ -23,7 +23,7 @@ qhp.QtLabsPlatform.subprojects.qmltypes.indexTitle = Qt Labs Platform QML Types qhp.QtLabsPlatform.subprojects.qmltypes.selectors = qmlclass qhp.QtLabsPlatform.subprojects.qmltypes.sortPages = true -depends = qtcore qtgui qtdoc qtqml qtqmlcore qtqmlmodels qtquick qtquickcontrols qtwidgets +depends = qtcore qtgui qtdoc qtqml qtqmlcore qtqmlmodels qtquick qtquickcontrols qtquickdialogs qtwidgets # This module has no documented C++ types, clear the module header moduleheader = diff --git a/src/labs/platform/qquicklabsplatformcolordialog.cpp b/src/labs/platform/qquicklabsplatformcolordialog.cpp index 4522e5ea82..df19cfc605 100644 --- a/src/labs/platform/qquicklabsplatformcolordialog.cpp +++ b/src/labs/platform/qquicklabsplatformcolordialog.cpp @@ -3,6 +3,8 @@ #include "qquicklabsplatformcolordialog_p.h" +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE /*! @@ -11,6 +13,7 @@ QT_BEGIN_NAMESPACE //! \nativetype QQuickLabsPlatformColorDialog \inqmlmodule Qt.labs.platform \since 5.8 + \deprecated [6.9] Use QtQuick.Dialogs::ColorDialog instead. \brief A native color dialog. The ColorDialog type provides a QML API for native platform color dialogs. @@ -53,6 +56,8 @@ QT_BEGIN_NAMESPACE \input includes/widgets.qdocinc 1 \labs + + \sa QtQuick.Dialogs::ColorDialog */ QQuickLabsPlatformColorDialog::QQuickLabsPlatformColorDialog(QObject *parent) @@ -174,3 +179,5 @@ void QQuickLabsPlatformColorDialog::accept() QT_END_NAMESPACE #include "moc_qquicklabsplatformcolordialog_p.cpp" + +#endif // QT_DEPRECATED_SINCE(6, 9) diff --git a/src/labs/platform/qquicklabsplatformcolordialog_p.h b/src/labs/platform/qquicklabsplatformcolordialog_p.h index b9f025731e..59b2125e0d 100644 --- a/src/labs/platform/qquicklabsplatformcolordialog_p.h +++ b/src/labs/platform/qquicklabsplatformcolordialog_p.h @@ -19,6 +19,8 @@ #include <QtGui/qcolor.h> #include <QtQml/qqml.h> +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE class QQuickLabsPlatformColorDialog : public QQuickLabsPlatformDialog @@ -61,4 +63,6 @@ private: QT_END_NAMESPACE +#endif // QT_DEPRECATED_SINCE(6, 9) + #endif // QQUICKLABSPLATFORMCOLORDIALOG_P_H diff --git a/src/labs/platform/qquicklabsplatformfiledialog.cpp b/src/labs/platform/qquicklabsplatformfiledialog.cpp index b267806c85..67021f3d8b 100644 --- a/src/labs/platform/qquicklabsplatformfiledialog.cpp +++ b/src/labs/platform/qquicklabsplatformfiledialog.cpp @@ -3,6 +3,8 @@ #include "qquicklabsplatformfiledialog_p.h" +#if QT_DEPRECATED_SINCE(6, 9) + #include <QtCore/qlist.h> QT_BEGIN_NAMESPACE @@ -15,6 +17,7 @@ using namespace Qt::StringLiterals; //! \nativetype QQuickLabsPlatformFileDialog \inqmlmodule Qt.labs.platform \since 5.8 + \deprecated [6.9] Use QtQuick.Dialogs::FileDialog instead. \brief A native file dialog. The FileDialog type provides a QML API for native platform file dialogs. @@ -62,7 +65,7 @@ using namespace Qt::StringLiterals; \labs - \sa FolderDialog, StandardPaths + \sa QtQuick.Dialogs::FileDialog, FolderDialog, StandardPaths */ QQuickLabsPlatformFileDialog::QQuickLabsPlatformFileDialog(QObject *parent) @@ -637,3 +640,5 @@ QString QQuickLabsPlatformFileNameFilter::nameFilter(int index) const QT_END_NAMESPACE #include "moc_qquicklabsplatformfiledialog_p.cpp" + +#endif // QT_DEPRECATED_SINCE(6, 9) diff --git a/src/labs/platform/qquicklabsplatformfiledialog_p.h b/src/labs/platform/qquicklabsplatformfiledialog_p.h index 9bfd8906e7..879e6ed0b2 100644 --- a/src/labs/platform/qquicklabsplatformfiledialog_p.h +++ b/src/labs/platform/qquicklabsplatformfiledialog_p.h @@ -19,6 +19,8 @@ #include <QtCore/qurl.h> #include <QtQml/qqml.h> +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE class QQuickLabsPlatformFileNameFilter; @@ -161,4 +163,6 @@ private: QT_END_NAMESPACE +#endif // QT_DEPRECATED_SINCE(6, 9) + #endif // QQUICKLABSPLATFORMFILEDIALOG_P_H diff --git a/src/labs/platform/qquicklabsplatformfolderdialog.cpp b/src/labs/platform/qquicklabsplatformfolderdialog.cpp index dfe7945ce3..c8af04bff8 100644 --- a/src/labs/platform/qquicklabsplatformfolderdialog.cpp +++ b/src/labs/platform/qquicklabsplatformfolderdialog.cpp @@ -3,6 +3,8 @@ #include "qquicklabsplatformfolderdialog_p.h" +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE /*! @@ -11,6 +13,7 @@ QT_BEGIN_NAMESPACE //! \nativetype QQuickLabsPlatformFolderDialog \inqmlmodule Qt.labs.platform \since 5.8 + \deprecated [6.9] Use QtQuick.Dialogs::FolderDialog instead. \brief A native folder dialog. The FolderDialog type provides a QML API for native platform folder dialogs. @@ -57,7 +60,7 @@ QT_BEGIN_NAMESPACE \labs - \sa FileDialog, StandardPaths + \sa QtQuick.Dialogs::FolderDialog, FileDialog, StandardPaths */ QQuickLabsPlatformFolderDialog::QQuickLabsPlatformFolderDialog(QObject *parent) @@ -251,3 +254,5 @@ void QQuickLabsPlatformFolderDialog::accept() QT_END_NAMESPACE #include "moc_qquicklabsplatformfolderdialog_p.cpp" + +#endif // QT_DEPRECATED_SINCE(6, 9) diff --git a/src/labs/platform/qquicklabsplatformfolderdialog_p.h b/src/labs/platform/qquicklabsplatformfolderdialog_p.h index 334b0f6479..19e40ab6f4 100644 --- a/src/labs/platform/qquicklabsplatformfolderdialog_p.h +++ b/src/labs/platform/qquicklabsplatformfolderdialog_p.h @@ -19,6 +19,8 @@ #include <QtCore/qurl.h> #include <QtQml/qqml.h> +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE class QQuickLabsPlatformFolderDialog : public QQuickLabsPlatformDialog @@ -73,4 +75,6 @@ private: QT_END_NAMESPACE +#endif // QT_DEPRECATED_SINCE(6, 9) + #endif // QQUICKLABSPLATFORMFOLDERDIALOG_P_H diff --git a/src/labs/platform/qquicklabsplatformfontdialog.cpp b/src/labs/platform/qquicklabsplatformfontdialog.cpp index 3d34bbe77e..b182ae4453 100644 --- a/src/labs/platform/qquicklabsplatformfontdialog.cpp +++ b/src/labs/platform/qquicklabsplatformfontdialog.cpp @@ -3,6 +3,8 @@ #include "qquicklabsplatformfontdialog_p.h" +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE /*! @@ -11,6 +13,7 @@ QT_BEGIN_NAMESPACE //! \nativetype QQuickLabsPlatformFontDialog \inqmlmodule Qt.labs.platform \since 5.8 + \deprecated [6.9] Use QtQuick.Dialogs::FontDialog instead. \brief A native font dialog. The FontDialog type provides a QML API for native platform font dialogs. @@ -53,6 +56,8 @@ QT_BEGIN_NAMESPACE \input includes/widgets.qdocinc 1 \labs + + \sa QtQuick.Dialogs::FontDialog */ QQuickLabsPlatformFontDialog::QQuickLabsPlatformFontDialog(QObject *parent) @@ -176,3 +181,5 @@ void QQuickLabsPlatformFontDialog::accept() QT_END_NAMESPACE #include "moc_qquicklabsplatformfontdialog_p.cpp" + +#endif // QT_DEPRECATED_SINCE(6, 9) diff --git a/src/labs/platform/qquicklabsplatformfontdialog_p.h b/src/labs/platform/qquicklabsplatformfontdialog_p.h index 8f7d07091d..9913b496c4 100644 --- a/src/labs/platform/qquicklabsplatformfontdialog_p.h +++ b/src/labs/platform/qquicklabsplatformfontdialog_p.h @@ -19,6 +19,8 @@ #include <QtGui/qfont.h> #include <QtQml/qqml.h> +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE class QQuickLabsPlatformFontDialog : public QQuickLabsPlatformDialog @@ -61,4 +63,6 @@ private: QT_END_NAMESPACE +#endif // QT_DEPRECATED_SINCE(6, 9) + #endif // QQUICKLABSPLATFORMFONTDIALOG_P_H diff --git a/src/labs/platform/qquicklabsplatformmessagedialog.cpp b/src/labs/platform/qquicklabsplatformmessagedialog.cpp index e3dd72112f..ff5924b7cf 100644 --- a/src/labs/platform/qquicklabsplatformmessagedialog.cpp +++ b/src/labs/platform/qquicklabsplatformmessagedialog.cpp @@ -3,6 +3,8 @@ #include "qquicklabsplatformmessagedialog_p.h" +#if QT_DEPRECATED_SINCE(6, 9) + #include <QtQml/qqmlinfo.h> QT_BEGIN_NAMESPACE @@ -13,6 +15,7 @@ QT_BEGIN_NAMESPACE //! \nativetype QQuickLabsPlatformMessageDialog \inqmlmodule Qt.labs.platform \since 5.8 + \deprecated [6.9] Use QtQuick.Dialogs::MessageDialog instead. \brief A native message dialog. The MessageDialog type provides a QML API for native platform message dialogs. @@ -72,6 +75,8 @@ QT_BEGIN_NAMESPACE \input includes/widgets.qdocinc 1 \labs + + \sa QtQuick.Dialogs::MessageDialog */ /*! @@ -350,3 +355,5 @@ void QQuickLabsPlatformMessageDialog::handleClick(QPlatformDialogHelper::Standar QT_END_NAMESPACE #include "moc_qquicklabsplatformmessagedialog_p.cpp" + +#endif // QT_DEPRECATED_SINCE(6, 9) diff --git a/src/labs/platform/qquicklabsplatformmessagedialog_p.h b/src/labs/platform/qquicklabsplatformmessagedialog_p.h index 8b42c78f34..f471601a65 100644 --- a/src/labs/platform/qquicklabsplatformmessagedialog_p.h +++ b/src/labs/platform/qquicklabsplatformmessagedialog_p.h @@ -18,6 +18,8 @@ #include "qquicklabsplatformdialog_p.h" #include <QtQml/qqml.h> +#if QT_DEPRECATED_SINCE(6, 9) + QT_BEGIN_NAMESPACE class QQuickLabsPlatformMessageDialog : public QQuickLabsPlatformDialog @@ -84,4 +86,6 @@ private: QT_END_NAMESPACE +#endif // QT_DEPRECATED_SINCE(6, 9) + #endif // QQUICKLABSPLATFORMMESSAGEDIALOG_P_H |
