aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-10-18 12:01:20 +0200
committerMitch Curtis <mitch.curtis@qt.io>2021-10-26 15:02:17 +0200
commitd0507b6d5eab28f36cc39c1f46d8a87ab76bb88e (patch)
tree57d3d76c3807f5d2a46b082838b32d8564a0e55b
parentc61cfa84875442ced136653f3734bbdf249098dc (diff)
Rename labs platform types to avoid duplicate type names
Qt Labs Platform and Qt Quick Dialogs contain the same type names, which may cause issues when both modules are imported from QML. This may be the cause of the linker error when building Qt for Web Assembly: wasm-ld: error: duplicate symbol: vtable for QQuickPlatformFontDialog >>> defined in /home/qt/RTA/qt5/6.2.1/wasm_32/./qml/Qt/labs/platform/libqtlabsplatformplugin.a(mocs_compilation.cpp.o) >>> defined in /home/qt/RTA/qt5/6.2.1/wasm_32/lib/libQt6QuickDialogs2QuickImpl.a(mocs_compilation.cpp.o) Fixes: QTBUG-97465 Pick-to: 6.2 Change-Id: I43dfab7cf4f56e4bfcdd4262dcf7d99f82351434 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/labs/platform/CMakeLists.txt30
-rw-r--r--src/labs/platform/platform.pri60
-rw-r--r--src/labs/platform/qquicklabsplatformcolordialog.cpp (renamed from src/labs/platform/qquickplatformcolordialog.cpp)34
-rw-r--r--src/labs/platform/qquicklabsplatformcolordialog_p.h (renamed from src/labs/platform/qquickplatformcolordialog_p.h)14
-rw-r--r--src/labs/platform/qquicklabsplatformdialog.cpp (renamed from src/labs/platform/qquickplatformdialog.cpp)72
-rw-r--r--src/labs/platform/qquicklabsplatformdialog_p.h (renamed from src/labs/platform/qquickplatformdialog_p.h)14
-rw-r--r--src/labs/platform/qquicklabsplatformfiledialog.cpp (renamed from src/labs/platform/qquickplatformfiledialog.cpp)116
-rw-r--r--src/labs/platform/qquicklabsplatformfiledialog_p.h (renamed from src/labs/platform/qquickplatformfiledialog_p.h)26
-rw-r--r--src/labs/platform/qquicklabsplatformfolderdialog.cpp (renamed from src/labs/platform/qquickplatformfolderdialog.cpp)48
-rw-r--r--src/labs/platform/qquicklabsplatformfolderdialog_p.h (renamed from src/labs/platform/qquickplatformfolderdialog_p.h)14
-rw-r--r--src/labs/platform/qquicklabsplatformfontdialog.cpp (renamed from src/labs/platform/qquickplatformfontdialog.cpp)34
-rw-r--r--src/labs/platform/qquicklabsplatformfontdialog_p.h (renamed from src/labs/platform/qquickplatformfontdialog_p.h)14
-rw-r--r--src/labs/platform/qquicklabsplatformicon.cpp (renamed from src/labs/platform/qquickplatformicon.cpp)18
-rw-r--r--src/labs/platform/qquicklabsplatformicon_p.h (renamed from src/labs/platform/qquickplatformicon_p.h)12
-rw-r--r--src/labs/platform/qquicklabsplatformiconloader.cpp (renamed from src/labs/platform/qquickplatformiconloader.cpp)16
-rw-r--r--src/labs/platform/qquicklabsplatformiconloader_p.h (renamed from src/labs/platform/qquickplatformiconloader_p.h)18
-rw-r--r--src/labs/platform/qquicklabsplatformmenu.cpp (renamed from src/labs/platform/qquickplatformmenu.cpp)170
-rw-r--r--src/labs/platform/qquicklabsplatformmenu_p.h (renamed from src/labs/platform/qquickplatformmenu_p.h)90
-rw-r--r--src/labs/platform/qquicklabsplatformmenubar.cpp (renamed from src/labs/platform/qquickplatformmenubar.cpp)80
-rw-r--r--src/labs/platform/qquicklabsplatformmenubar_p.h (renamed from src/labs/platform/qquickplatformmenubar_p.h)36
-rw-r--r--src/labs/platform/qquicklabsplatformmenuitem.cpp (renamed from src/labs/platform/qquickplatformmenuitem.cpp)98
-rw-r--r--src/labs/platform/qquicklabsplatformmenuitem_p.h (renamed from src/labs/platform/qquickplatformmenuitem_p.h)60
-rw-r--r--src/labs/platform/qquicklabsplatformmenuitemgroup.cpp (renamed from src/labs/platform/qquickplatformmenuitemgroup.cpp)96
-rw-r--r--src/labs/platform/qquicklabsplatformmenuitemgroup_p.h (renamed from src/labs/platform/qquickplatformmenuitemgroup_p.h)50
-rw-r--r--src/labs/platform/qquicklabsplatformmenuseparator.cpp (renamed from src/labs/platform/qquickplatformmenuseparator.cpp)8
-rw-r--r--src/labs/platform/qquicklabsplatformmenuseparator_p.h (renamed from src/labs/platform/qquickplatformmenuseparator_p.h)14
-rw-r--r--src/labs/platform/qquicklabsplatformmessagedialog.cpp (renamed from src/labs/platform/qquickplatformmessagedialog.cpp)32
-rw-r--r--src/labs/platform/qquicklabsplatformmessagedialog_p.h (renamed from src/labs/platform/qquickplatformmessagedialog_p.h)14
-rw-r--r--src/labs/platform/qquicklabsplatformstandardpaths.cpp (renamed from src/labs/platform/qquickplatformstandardpaths.cpp)24
-rw-r--r--src/labs/platform/qquicklabsplatformstandardpaths_p.h (renamed from src/labs/platform/qquickplatformstandardpaths_p.h)14
-rw-r--r--src/labs/platform/qquicklabsplatformsystemtrayicon.cpp (renamed from src/labs/platform/qquickplatformsystemtrayicon.cpp)66
-rw-r--r--src/labs/platform/qquicklabsplatformsystemtrayicon_p.h (renamed from src/labs/platform/qquickplatformsystemtrayicon_p.h)38
-rw-r--r--src/labs/platform/qtlabsplatformplugin.cpp72
33 files changed, 751 insertions, 751 deletions
diff --git a/src/labs/platform/CMakeLists.txt b/src/labs/platform/CMakeLists.txt
index 7fc542d38d..119f1d585a 100644
--- a/src/labs/platform/CMakeLists.txt
+++ b/src/labs/platform/CMakeLists.txt
@@ -10,20 +10,20 @@ qt_internal_add_qml_module(qtlabsplatformplugin
NO_PLUGIN_OPTIONAL
NO_GENERATE_PLUGIN_SOURCE
SOURCES
- qquickplatformcolordialog.cpp qquickplatformcolordialog_p.h
- qquickplatformdialog.cpp qquickplatformdialog_p.h
- qquickplatformfiledialog.cpp qquickplatformfiledialog_p.h
- qquickplatformfolderdialog.cpp qquickplatformfolderdialog_p.h
- qquickplatformfontdialog.cpp qquickplatformfontdialog_p.h
- qquickplatformicon.cpp qquickplatformicon_p.h
- qquickplatformiconloader.cpp qquickplatformiconloader_p.h
- qquickplatformmenu.cpp qquickplatformmenu_p.h
- qquickplatformmenubar.cpp qquickplatformmenubar_p.h
- qquickplatformmenuitem.cpp qquickplatformmenuitem_p.h
- qquickplatformmenuitemgroup.cpp qquickplatformmenuitemgroup_p.h
- qquickplatformmenuseparator.cpp qquickplatformmenuseparator_p.h
- qquickplatformmessagedialog.cpp qquickplatformmessagedialog_p.h
- qquickplatformstandardpaths.cpp qquickplatformstandardpaths_p.h
+ qquicklabsplatformcolordialog.cpp qquicklabsplatformcolordialog_p.h
+ qquicklabsplatformdialog.cpp qquicklabsplatformdialog_p.h
+ qquicklabsplatformfiledialog.cpp qquicklabsplatformfiledialog_p.h
+ qquicklabsplatformfolderdialog.cpp qquicklabsplatformfolderdialog_p.h
+ qquicklabsplatformfontdialog.cpp qquicklabsplatformfontdialog_p.h
+ qquicklabsplatformicon.cpp qquicklabsplatformicon_p.h
+ qquicklabsplatformiconloader.cpp qquicklabsplatformiconloader_p.h
+ qquicklabsplatformmenu.cpp qquicklabsplatformmenu_p.h
+ qquicklabsplatformmenubar.cpp qquicklabsplatformmenubar_p.h
+ qquicklabsplatformmenuitem.cpp qquicklabsplatformmenuitem_p.h
+ qquicklabsplatformmenuitemgroup.cpp qquicklabsplatformmenuitemgroup_p.h
+ qquicklabsplatformmenuseparator.cpp qquicklabsplatformmenuseparator_p.h
+ qquicklabsplatformmessagedialog.cpp qquicklabsplatformmessagedialog_p.h
+ qquicklabsplatformstandardpaths.cpp qquicklabsplatformstandardpaths_p.h
qtlabsplatformplugin.cpp
DEFINES
QT_NO_CAST_FROM_ASCII
@@ -81,7 +81,7 @@ qt_internal_extend_target(qtlabsplatformplugin CONDITION TARGET Qt::Widgets AND
qt_internal_extend_target(qtlabsplatformplugin CONDITION QT_FEATURE_systemtrayicon
SOURCES
- qquickplatformsystemtrayicon.cpp qquickplatformsystemtrayicon_p.h
+ qquicklabsplatformsystemtrayicon.cpp qquicklabsplatformsystemtrayicon_p.h
)
qt_internal_add_docs(qtlabsplatformplugin
diff --git a/src/labs/platform/platform.pri b/src/labs/platform/platform.pri
index ec6e8616b8..c145663c23 100644
--- a/src/labs/platform/platform.pri
+++ b/src/labs/platform/platform.pri
@@ -1,39 +1,39 @@
HEADERS += \
- $$PWD/qquickplatformcolordialog_p.h \
- $$PWD/qquickplatformdialog_p.h \
- $$PWD/qquickplatformfiledialog_p.h \
- $$PWD/qquickplatformfolderdialog_p.h \
- $$PWD/qquickplatformfontdialog_p.h \
- $$PWD/qquickplatformicon_p.h \
- $$PWD/qquickplatformiconloader_p.h \
- $$PWD/qquickplatformmenu_p.h \
- $$PWD/qquickplatformmenubar_p.h \
- $$PWD/qquickplatformmenuitem_p.h \
- $$PWD/qquickplatformmenuitemgroup_p.h \
- $$PWD/qquickplatformmenuseparator_p.h \
- $$PWD/qquickplatformmessagedialog_p.h \
- $$PWD/qquickplatformstandardpaths_p.h
+ $$PWD/qquicklabsplatformcolordialog_p.h \
+ $$PWD/qquicklabsplatformdialog_p.h \
+ $$PWD/qquicklabsplatformfiledialog_p.h \
+ $$PWD/qquicklabsplatformfolderdialog_p.h \
+ $$PWD/qquicklabsplatformfontdialog_p.h \
+ $$PWD/qquicklabsplatformicon_p.h \
+ $$PWD/qquicklabsplatformiconloader_p.h \
+ $$PWD/qquicklabsplatformmenu_p.h \
+ $$PWD/qquicklabsplatformmenubar_p.h \
+ $$PWD/qquicklabsplatformmenuitem_p.h \
+ $$PWD/qquicklabsplatformmenuitemgroup_p.h \
+ $$PWD/qquicklabsplatformmenuseparator_p.h \
+ $$PWD/qquicklabsplatformmessagedialog_p.h \
+ $$PWD/qquicklabsplatformstandardpaths_p.h
SOURCES += \
- $$PWD/qquickplatformcolordialog.cpp \
- $$PWD/qquickplatformdialog.cpp \
- $$PWD/qquickplatformfiledialog.cpp \
- $$PWD/qquickplatformfolderdialog.cpp \
- $$PWD/qquickplatformfontdialog.cpp \
- $$PWD/qquickplatformicon.cpp \
- $$PWD/qquickplatformiconloader.cpp \
- $$PWD/qquickplatformmenu.cpp \
- $$PWD/qquickplatformmenubar.cpp \
- $$PWD/qquickplatformmenuitem.cpp \
- $$PWD/qquickplatformmenuitemgroup.cpp \
- $$PWD/qquickplatformmenuseparator.cpp \
- $$PWD/qquickplatformmessagedialog.cpp \
- $$PWD/qquickplatformstandardpaths.cpp
+ $$PWD/qquicklabsplatformcolordialog.cpp \
+ $$PWD/qquicklabsplatformdialog.cpp \
+ $$PWD/qquicklabsplatformfiledialog.cpp \
+ $$PWD/qquicklabsplatformfolderdialog.cpp \
+ $$PWD/qquicklabsplatformfontdialog.cpp \
+ $$PWD/qquicklabsplatformicon.cpp \
+ $$PWD/qquicklabsplatformiconloader.cpp \
+ $$PWD/qquicklabsplatformmenu.cpp \
+ $$PWD/qquicklabsplatformmenubar.cpp \
+ $$PWD/qquicklabsplatformmenuitem.cpp \
+ $$PWD/qquicklabsplatformmenuitemgroup.cpp \
+ $$PWD/qquicklabsplatformmenuseparator.cpp \
+ $$PWD/qquicklabsplatformmessagedialog.cpp \
+ $$PWD/qquicklabsplatformstandardpaths.cpp
qtConfig(systemtrayicon) {
HEADERS += \
- $$PWD/qquickplatformsystemtrayicon_p.h
+ $$PWD/qquicklabsplatformsystemtrayicon_p.h
SOURCES += \
- $$PWD/qquickplatformsystemtrayicon.cpp
+ $$PWD/qquicklabsplatformsystemtrayicon.cpp
}
diff --git a/src/labs/platform/qquickplatformcolordialog.cpp b/src/labs/platform/qquicklabsplatformcolordialog.cpp
index 04a5e079bd..0a98001250 100644
--- a/src/labs/platform/qquickplatformcolordialog.cpp
+++ b/src/labs/platform/qquicklabsplatformcolordialog.cpp
@@ -34,14 +34,14 @@
**
****************************************************************************/
-#include "qquickplatformcolordialog_p.h"
+#include "qquicklabsplatformcolordialog_p.h"
QT_BEGIN_NAMESPACE
/*!
\qmltype ColorDialog
\inherits Dialog
-//! \instantiates QQuickPlatformColorDialog
+//! \instantiates QQuickLabsPlatformColorDialog
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native color dialog.
@@ -87,8 +87,8 @@ QT_BEGIN_NAMESPACE
\labs
*/
-QQuickPlatformColorDialog::QQuickPlatformColorDialog(QObject *parent)
- : QQuickPlatformDialog(QPlatformTheme::ColorDialog, parent),
+QQuickLabsPlatformColorDialog::QQuickLabsPlatformColorDialog(QObject *parent)
+ : QQuickLabsPlatformDialog(QPlatformTheme::ColorDialog, parent),
m_options(QColorDialogOptions::create())
{
}
@@ -106,12 +106,12 @@ QQuickPlatformColorDialog::QQuickPlatformColorDialog(QObject *parent)
\sa currentColor, {Dialog::}{accepted()}
*/
-QColor QQuickPlatformColorDialog::color() const
+QColor QQuickLabsPlatformColorDialog::color() const
{
return m_color;
}
-void QQuickPlatformColorDialog::setColor(const QColor &color)
+void QQuickLabsPlatformColorDialog::setColor(const QColor &color)
{
if (m_color == color)
return;
@@ -132,14 +132,14 @@ void QQuickPlatformColorDialog::setColor(const QColor &color)
\sa color
*/
-QColor QQuickPlatformColorDialog::currentColor() const
+QColor QQuickLabsPlatformColorDialog::currentColor() const
{
if (QPlatformColorDialogHelper *colorDialog = qobject_cast<QPlatformColorDialogHelper *>(handle()))
return colorDialog->currentColor();
return m_currentColor;
}
-void QQuickPlatformColorDialog::setCurrentColor(const QColor &color)
+void QQuickLabsPlatformColorDialog::setCurrentColor(const QColor &color)
{
if (QPlatformColorDialogHelper *colorDialog = qobject_cast<QPlatformColorDialogHelper *>(handle()))
colorDialog->setCurrentColor(color);
@@ -161,12 +161,12 @@ void QQuickPlatformColorDialog::setCurrentColor(const QColor &color)
\value ColorDialog.ShowAlphaChannel Allow the user to select the alpha component of a color.
\value ColorDialog.NoButtons Don't display \uicontrol OK and \uicontrol Cancel buttons (useful for "live dialogs").
*/
-QColorDialogOptions::ColorDialogOptions QQuickPlatformColorDialog::options() const
+QColorDialogOptions::ColorDialogOptions QQuickLabsPlatformColorDialog::options() const
{
return m_options->options();
}
-void QQuickPlatformColorDialog::setOptions(QColorDialogOptions::ColorDialogOptions options)
+void QQuickLabsPlatformColorDialog::setOptions(QColorDialogOptions::ColorDialogOptions options)
{
if (options == m_options->options())
return;
@@ -175,32 +175,32 @@ void QQuickPlatformColorDialog::setOptions(QColorDialogOptions::ColorDialogOptio
emit optionsChanged();
}
-bool QQuickPlatformColorDialog::useNativeDialog() const
+bool QQuickLabsPlatformColorDialog::useNativeDialog() const
{
- return QQuickPlatformDialog::useNativeDialog()
+ return QQuickLabsPlatformDialog::useNativeDialog()
&& !m_options->testOption(QColorDialogOptions::DontUseNativeDialog);
}
-void QQuickPlatformColorDialog::onCreate(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformColorDialog::onCreate(QPlatformDialogHelper *dialog)
{
if (QPlatformColorDialogHelper *colorDialog = qobject_cast<QPlatformColorDialogHelper *>(dialog)) {
- connect(colorDialog, &QPlatformColorDialogHelper::currentColorChanged, this, &QQuickPlatformColorDialog::currentColorChanged);
+ connect(colorDialog, &QPlatformColorDialogHelper::currentColorChanged, this, &QQuickLabsPlatformColorDialog::currentColorChanged);
colorDialog->setOptions(m_options);
colorDialog->setCurrentColor(m_currentColor);
}
}
-void QQuickPlatformColorDialog::onShow(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformColorDialog::onShow(QPlatformDialogHelper *dialog)
{
m_options->setWindowTitle(title());
if (QPlatformColorDialogHelper *colorDialog = qobject_cast<QPlatformColorDialogHelper *>(dialog))
colorDialog->setOptions(m_options);
}
-void QQuickPlatformColorDialog::accept()
+void QQuickLabsPlatformColorDialog::accept()
{
setColor(currentColor());
- QQuickPlatformDialog::accept();
+ QQuickLabsPlatformDialog::accept();
}
QT_END_NAMESPACE
diff --git a/src/labs/platform/qquickplatformcolordialog_p.h b/src/labs/platform/qquicklabsplatformcolordialog_p.h
index 1df047d9b0..7eef090ffc 100644
--- a/src/labs/platform/qquickplatformcolordialog_p.h
+++ b/src/labs/platform/qquicklabsplatformcolordialog_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMCOLORDIALOG_P_H
-#define QQUICKPLATFORMCOLORDIALOG_P_H
+#ifndef QQUICKLABSPLATFORMCOLORDIALOG_P_H
+#define QQUICKLABSPLATFORMCOLORDIALOG_P_H
//
// W A R N I N G
@@ -48,13 +48,13 @@
// We mean it.
//
-#include "qquickplatformdialog_p.h"
+#include "qquicklabsplatformdialog_p.h"
#include <QtGui/qcolor.h>
#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
-class QQuickPlatformColorDialog : public QQuickPlatformDialog
+class QQuickLabsPlatformColorDialog : public QQuickLabsPlatformDialog
{
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
@@ -63,7 +63,7 @@ class QQuickPlatformColorDialog : public QQuickPlatformDialog
Q_FLAGS(QColorDialogOptions::ColorDialogOptions)
public:
- explicit QQuickPlatformColorDialog(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformColorDialog(QObject *parent = nullptr);
QColor color() const;
void setColor(const QColor &color);
@@ -93,6 +93,6 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformColorDialog)
+QML_DECLARE_TYPE(QQuickLabsPlatformColorDialog)
-#endif // QQUICKPLATFORMCOLORDIALOG_P_H
+#endif // QQUICKLABSPLATFORMCOLORDIALOG_P_H
diff --git a/src/labs/platform/qquickplatformdialog.cpp b/src/labs/platform/qquicklabsplatformdialog.cpp
index 5a78c7a432..a05129e5aa 100644
--- a/src/labs/platform/qquickplatformdialog.cpp
+++ b/src/labs/platform/qquicklabsplatformdialog.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "qquickplatformdialog_p.h"
+#include "qquicklabsplatformdialog_p.h"
#include <QtCore/qloggingcategory.h>
#include <QtGui/private/qguiapplication_p.h>
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Dialog
\inherits QtObject
-//! \instantiates QQuickPlatformDialog
+//! \instantiates QQuickLabsPlatformDialog
\inqmlmodule Qt.labs.platform
\since 5.8
\brief The base class of native dialogs.
@@ -87,7 +87,7 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(qtLabsPlatformDialogs)
-QQuickPlatformDialog::QQuickPlatformDialog(QPlatformTheme::DialogType type, QObject *parent)
+QQuickLabsPlatformDialog::QQuickLabsPlatformDialog(QPlatformTheme::DialogType type, QObject *parent)
: QObject(parent),
m_visible(false),
m_complete(false),
@@ -100,12 +100,12 @@ QQuickPlatformDialog::QQuickPlatformDialog(QPlatformTheme::DialogType type, QObj
{
}
-QQuickPlatformDialog::~QQuickPlatformDialog()
+QQuickLabsPlatformDialog::~QQuickLabsPlatformDialog()
{
destroy();
}
-QPlatformDialogHelper *QQuickPlatformDialog::handle() const
+QPlatformDialogHelper *QQuickLabsPlatformDialog::handle() const
{
return m_handle;
}
@@ -117,7 +117,7 @@ QPlatformDialogHelper *QQuickPlatformDialog::handle() const
This default property holds the list of all objects declared as children of
the dialog.
*/
-QQmlListProperty<QObject> QQuickPlatformDialog::data()
+QQmlListProperty<QObject> QQuickLabsPlatformDialog::data()
{
return QQmlListProperty<QObject>(this, &m_data);
}
@@ -131,12 +131,12 @@ QQmlListProperty<QObject> QQuickPlatformDialog::data()
the QML parent objects until a \l Window or an \l Item that has a window
is found.
*/
-QWindow *QQuickPlatformDialog::parentWindow() const
+QWindow *QQuickLabsPlatformDialog::parentWindow() const
{
return m_parentWindow;
}
-void QQuickPlatformDialog::setParentWindow(QWindow *window)
+void QQuickLabsPlatformDialog::setParentWindow(QWindow *window)
{
if (m_parentWindow == window)
return;
@@ -150,12 +150,12 @@ void QQuickPlatformDialog::setParentWindow(QWindow *window)
This property holds the title of the dialog.
*/
-QString QQuickPlatformDialog::title() const
+QString QQuickLabsPlatformDialog::title() const
{
return m_title;
}
-void QQuickPlatformDialog::setTitle(const QString &title)
+void QQuickLabsPlatformDialog::setTitle(const QString &title)
{
if (m_title == title)
return;
@@ -169,12 +169,12 @@ void QQuickPlatformDialog::setTitle(const QString &title)
This property holds the window flags of the dialog. The default value is \c Qt.Dialog.
*/
-Qt::WindowFlags QQuickPlatformDialog::flags() const
+Qt::WindowFlags QQuickLabsPlatformDialog::flags() const
{
return m_flags;
}
-void QQuickPlatformDialog::setFlags(Qt::WindowFlags flags)
+void QQuickLabsPlatformDialog::setFlags(Qt::WindowFlags flags)
{
if (m_flags == flags)
return;
@@ -193,12 +193,12 @@ void QQuickPlatformDialog::setFlags(Qt::WindowFlags flags)
\value Qt.WindowModal The dialog is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows.
\value Qt.ApplicationModal The dialog is modal to the application and blocks input to all windows.
*/
-Qt::WindowModality QQuickPlatformDialog::modality() const
+Qt::WindowModality QQuickLabsPlatformDialog::modality() const
{
return m_modality;
}
-void QQuickPlatformDialog::setModality(Qt::WindowModality modality)
+void QQuickLabsPlatformDialog::setModality(Qt::WindowModality modality)
{
if (m_modality == modality)
return;
@@ -214,12 +214,12 @@ void QQuickPlatformDialog::setModality(Qt::WindowModality modality)
\sa open(), close()
*/
-bool QQuickPlatformDialog::isVisible() const
+bool QQuickLabsPlatformDialog::isVisible() const
{
return m_handle && m_visible;
}
-void QQuickPlatformDialog::setVisible(bool visible)
+void QQuickLabsPlatformDialog::setVisible(bool visible)
{
if (visible)
open();
@@ -239,12 +239,12 @@ void QQuickPlatformDialog::setVisible(bool visible)
\note MessageDialog sets the result to the value of the clicked standard
button instead of using the standard result codes.
*/
-int QQuickPlatformDialog::result() const
+int QQuickLabsPlatformDialog::result() const
{
return m_result;
}
-void QQuickPlatformDialog::setResult(int result)
+void QQuickLabsPlatformDialog::setResult(int result)
{
if (m_result == result)
return;
@@ -260,7 +260,7 @@ void QQuickPlatformDialog::setResult(int result)
\sa visible, close()
*/
-void QQuickPlatformDialog::open()
+void QQuickLabsPlatformDialog::open()
{
if (m_visible || !create())
return;
@@ -278,7 +278,7 @@ void QQuickPlatformDialog::open()
\sa visible, open()
*/
-void QQuickPlatformDialog::close()
+void QQuickLabsPlatformDialog::close()
{
if (!m_handle || !m_visible)
return;
@@ -296,7 +296,7 @@ void QQuickPlatformDialog::close()
\sa reject()
*/
-void QQuickPlatformDialog::accept()
+void QQuickLabsPlatformDialog::accept()
{
done(Accepted);
}
@@ -308,7 +308,7 @@ void QQuickPlatformDialog::accept()
\sa accept()
*/
-void QQuickPlatformDialog::reject()
+void QQuickLabsPlatformDialog::reject()
{
done(Rejected);
}
@@ -320,7 +320,7 @@ void QQuickPlatformDialog::reject()
\sa accept(), reject(), result
*/
-void QQuickPlatformDialog::done(int result)
+void QQuickLabsPlatformDialog::done(int result)
{
close();
setResult(result);
@@ -331,11 +331,11 @@ void QQuickPlatformDialog::done(int result)
emit rejected();
}
-void QQuickPlatformDialog::classBegin()
+void QQuickLabsPlatformDialog::classBegin()
{
}
-void QQuickPlatformDialog::componentComplete()
+void QQuickLabsPlatformDialog::componentComplete()
{
m_complete = true;
if (!m_parentWindow)
@@ -344,10 +344,10 @@ void QQuickPlatformDialog::componentComplete()
static const char *qmlTypeName(const QObject *object)
{
- return object->metaObject()->className() + qstrlen("QQuickPlatform");
+ return object->metaObject()->className() + qstrlen("QQuickLabsPlatform");
}
-bool QQuickPlatformDialog::create()
+bool QQuickLabsPlatformDialog::create()
{
if (!m_handle) {
if (useNativeDialog())
@@ -357,41 +357,41 @@ bool QQuickPlatformDialog::create()
qCDebug(qtLabsPlatformDialogs) << qmlTypeName(this) << "->" << m_handle;
if (m_handle) {
onCreate(m_handle);
- connect(m_handle, &QPlatformDialogHelper::accept, this, &QQuickPlatformDialog::accept);
- connect(m_handle, &QPlatformDialogHelper::reject, this, &QQuickPlatformDialog::reject);
+ connect(m_handle, &QPlatformDialogHelper::accept, this, &QQuickLabsPlatformDialog::accept);
+ connect(m_handle, &QPlatformDialogHelper::reject, this, &QQuickLabsPlatformDialog::reject);
}
}
return m_handle;
}
-void QQuickPlatformDialog::destroy()
+void QQuickLabsPlatformDialog::destroy()
{
delete m_handle;
m_handle = nullptr;
}
-bool QQuickPlatformDialog::useNativeDialog() const
+bool QQuickLabsPlatformDialog::useNativeDialog() const
{
return !QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs)
&& QGuiApplicationPrivate::platformTheme()->usePlatformNativeDialog(m_type);
}
-void QQuickPlatformDialog::onCreate(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformDialog::onCreate(QPlatformDialogHelper *dialog)
{
Q_UNUSED(dialog);
}
-void QQuickPlatformDialog::onShow(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformDialog::onShow(QPlatformDialogHelper *dialog)
{
Q_UNUSED(dialog);
}
-void QQuickPlatformDialog::onHide(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformDialog::onHide(QPlatformDialogHelper *dialog)
{
Q_UNUSED(dialog);
}
-QWindow *QQuickPlatformDialog::findParentWindow() const
+QWindow *QQuickLabsPlatformDialog::findParentWindow() const
{
QObject *obj = parent();
while (obj) {
@@ -408,4 +408,4 @@ QWindow *QQuickPlatformDialog::findParentWindow() const
QT_END_NAMESPACE
-#include "moc_qquickplatformdialog_p.cpp"
+#include "moc_qquicklabsplatformdialog_p.cpp"
diff --git a/src/labs/platform/qquickplatformdialog_p.h b/src/labs/platform/qquicklabsplatformdialog_p.h
index 55a549375e..802a846106 100644
--- a/src/labs/platform/qquickplatformdialog_p.h
+++ b/src/labs/platform/qquicklabsplatformdialog_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMDIALOG_P_H
-#define QQUICKPLATFORMDIALOG_P_H
+#ifndef QQUICKLABSPLATFORMDIALOG_P_H
+#define QQUICKLABSPLATFORMDIALOG_P_H
//
// W A R N I N G
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QWindow;
class QPlatformDialogHelper;
-class QQuickPlatformDialog : public QObject, public QQmlParserStatus
+class QQuickLabsPlatformDialog : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
@@ -74,8 +74,8 @@ class QQuickPlatformDialog : public QObject, public QQmlParserStatus
Q_CLASSINFO("DefaultProperty", "data")
public:
- explicit QQuickPlatformDialog(QPlatformTheme::DialogType type, QObject *parent = nullptr);
- ~QQuickPlatformDialog();
+ explicit QQuickLabsPlatformDialog(QPlatformTheme::DialogType type, QObject *parent = nullptr);
+ ~QQuickLabsPlatformDialog();
QPlatformDialogHelper *handle() const;
@@ -148,6 +148,6 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformDialog)
+QML_DECLARE_TYPE(QQuickLabsPlatformDialog)
-#endif // QQUICKPLATFORMDIALOG_P_H
+#endif // QQUICKLABSPLATFORMDIALOG_P_H
diff --git a/src/labs/platform/qquickplatformfiledialog.cpp b/src/labs/platform/qquicklabsplatformfiledialog.cpp
index 8bfcfc931b..96950b19ef 100644
--- a/src/labs/platform/qquickplatformfiledialog.cpp
+++ b/src/labs/platform/qquicklabsplatformfiledialog.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "qquickplatformfiledialog_p.h"
+#include "qquicklabsplatformfiledialog_p.h"
#include <QtCore/qlist.h>
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype FileDialog
\inherits Dialog
-//! \instantiates QQuickPlatformFileDialog
+//! \instantiates QQuickLabsPlatformFileDialog
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native file dialog.
@@ -95,8 +95,8 @@ QT_BEGIN_NAMESPACE
\sa FolderDialog, StandardPaths
*/
-QQuickPlatformFileDialog::QQuickPlatformFileDialog(QObject *parent)
- : QQuickPlatformDialog(QPlatformTheme::FileDialog, parent),
+QQuickLabsPlatformFileDialog::QQuickLabsPlatformFileDialog(QObject *parent)
+ : QQuickLabsPlatformDialog(QPlatformTheme::FileDialog, parent),
m_fileMode(OpenFile),
m_options(QFileDialogOptions::create()),
m_selectedNameFilter(nullptr)
@@ -115,12 +115,12 @@ QQuickPlatformFileDialog::QQuickPlatformFileDialog(QObject *parent)
\value FileDialog.OpenFiles The dialog is used to select multiple existing files.
\value FileDialog.SaveFile The dialog is used to select any file. The file does not have to exist.
*/
-QQuickPlatformFileDialog::FileMode QQuickPlatformFileDialog::fileMode() const
+QQuickLabsPlatformFileDialog::FileMode QQuickLabsPlatformFileDialog::fileMode() const
{
return m_fileMode;
}
-void QQuickPlatformFileDialog::setFileMode(FileMode mode)
+void QQuickLabsPlatformFileDialog::setFileMode(FileMode mode)
{
if (mode == m_fileMode)
return;
@@ -159,12 +159,12 @@ void QQuickPlatformFileDialog::setFileMode(FileMode mode)
\sa currentFile, {Dialog::}{accepted()}
*/
-QUrl QQuickPlatformFileDialog::file() const
+QUrl QQuickLabsPlatformFileDialog::file() const
{
return addDefaultSuffix(m_files.value(0));
}
-void QQuickPlatformFileDialog::setFile(const QUrl &file)
+void QQuickLabsPlatformFileDialog::setFile(const QUrl &file)
{
setFiles(QList<QUrl>() << file);
}
@@ -182,12 +182,12 @@ void QQuickPlatformFileDialog::setFile(const QUrl &file)
\sa currentFiles, {Dialog::}{accepted()}
*/
-QList<QUrl> QQuickPlatformFileDialog::files() const
+QList<QUrl> QQuickLabsPlatformFileDialog::files() const
{
return addDefaultSuffixes(m_files);
}
-void QQuickPlatformFileDialog::setFiles(const QList<QUrl> &files)
+void QQuickLabsPlatformFileDialog::setFiles(const QList<QUrl> &files)
{
if (m_files == files)
return;
@@ -210,12 +210,12 @@ void QQuickPlatformFileDialog::setFiles(const QList<QUrl> &files)
\sa file, currentFiles
*/
-QUrl QQuickPlatformFileDialog::currentFile() const
+QUrl QQuickLabsPlatformFileDialog::currentFile() const
{
return currentFiles().value(0);
}
-void QQuickPlatformFileDialog::setCurrentFile(const QUrl &file)
+void QQuickLabsPlatformFileDialog::setCurrentFile(const QUrl &file)
{
setCurrentFiles(QList<QUrl>() << file);
}
@@ -231,14 +231,14 @@ void QQuickPlatformFileDialog::setCurrentFile(const QUrl &file)
\sa files, currentFile
*/
-QList<QUrl> QQuickPlatformFileDialog::currentFiles() const
+QList<QUrl> QQuickLabsPlatformFileDialog::currentFiles() const
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle()))
return fileDialog->selectedFiles();
return m_options->initiallySelectedFiles();
}
-void QQuickPlatformFileDialog::setCurrentFiles(const QList<QUrl> &files)
+void QQuickLabsPlatformFileDialog::setCurrentFiles(const QList<QUrl> &files)
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle())) {
for (const QUrl &file : files)
@@ -255,14 +255,14 @@ void QQuickPlatformFileDialog::setCurrentFiles(const QList<QUrl> &files)
\sa FolderDialog
*/
-QUrl QQuickPlatformFileDialog::folder() const
+QUrl QQuickLabsPlatformFileDialog::folder() const
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle()))
return fileDialog->directory();
return m_options->initialDirectory();
}
-void QQuickPlatformFileDialog::setFolder(const QUrl &folder)
+void QQuickLabsPlatformFileDialog::setFolder(const QUrl &folder)
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle()))
fileDialog->setDirectory(folder);
@@ -286,12 +286,12 @@ void QQuickPlatformFileDialog::setFolder(const QUrl &folder)
\value FileDialog.ReadOnly Indicates that the dialog doesn't allow creating directories.
\value FileDialog.HideNameFilterDetails Indicates if the file name filter details are hidden or not.
*/
-QFileDialogOptions::FileDialogOptions QQuickPlatformFileDialog::options() const
+QFileDialogOptions::FileDialogOptions QQuickLabsPlatformFileDialog::options() const
{
return m_options->options();
}
-void QQuickPlatformFileDialog::setOptions(QFileDialogOptions::FileDialogOptions options)
+void QQuickLabsPlatformFileDialog::setOptions(QFileDialogOptions::FileDialogOptions options)
{
if (options == m_options->options())
return;
@@ -300,7 +300,7 @@ void QQuickPlatformFileDialog::setOptions(QFileDialogOptions::FileDialogOptions
emit optionsChanged();
}
-void QQuickPlatformFileDialog::resetOptions()
+void QQuickLabsPlatformFileDialog::resetOptions()
{
setOptions({});
}
@@ -326,12 +326,12 @@ void QQuickPlatformFileDialog::resetOptions()
\sa selectedNameFilter
*/
-QStringList QQuickPlatformFileDialog::nameFilters() const
+QStringList QQuickLabsPlatformFileDialog::nameFilters() const
{
return m_options->nameFilters();
}
-void QQuickPlatformFileDialog::setNameFilters(const QStringList &filters)
+void QQuickLabsPlatformFileDialog::setNameFilters(const QStringList &filters)
{
if (filters == m_options->nameFilters())
return;
@@ -346,7 +346,7 @@ void QQuickPlatformFileDialog::setNameFilters(const QStringList &filters)
emit nameFiltersChanged();
}
-void QQuickPlatformFileDialog::resetNameFilters()
+void QQuickLabsPlatformFileDialog::resetNameFilters()
{
setNameFilters(QStringList());
}
@@ -394,11 +394,11 @@ void QQuickPlatformFileDialog::resetNameFilters()
\sa nameFilters
*/
-QQuickPlatformFileNameFilter *QQuickPlatformFileDialog::selectedNameFilter() const
+QQuickLabsPlatformFileNameFilter *QQuickLabsPlatformFileDialog::selectedNameFilter() const
{
if (!m_selectedNameFilter) {
- QQuickPlatformFileDialog *that = const_cast<QQuickPlatformFileDialog *>(this);
- m_selectedNameFilter = new QQuickPlatformFileNameFilter(that);
+ QQuickLabsPlatformFileDialog *that = const_cast<QQuickLabsPlatformFileDialog *>(this);
+ m_selectedNameFilter = new QQuickLabsPlatformFileNameFilter(that);
m_selectedNameFilter->setOptions(m_options);
}
return m_selectedNameFilter;
@@ -413,12 +413,12 @@ QQuickPlatformFileNameFilter *QQuickPlatformFileDialog::selectedNameFilter() con
If the first character is a dot ('.'), it is removed.
*/
-QString QQuickPlatformFileDialog::defaultSuffix() const
+QString QQuickLabsPlatformFileDialog::defaultSuffix() const
{
return m_options->defaultSuffix();
}
-void QQuickPlatformFileDialog::setDefaultSuffix(const QString &suffix)
+void QQuickLabsPlatformFileDialog::setDefaultSuffix(const QString &suffix)
{
if (suffix == m_options->defaultSuffix())
return;
@@ -427,7 +427,7 @@ void QQuickPlatformFileDialog::setDefaultSuffix(const QString &suffix)
emit defaultSuffixChanged();
}
-void QQuickPlatformFileDialog::resetDefaultSuffix()
+void QQuickLabsPlatformFileDialog::resetDefaultSuffix()
{
setDefaultSuffix(QString());
}
@@ -445,12 +445,12 @@ void QQuickPlatformFileDialog::resetDefaultSuffix()
\sa rejectLabel
*/
-QString QQuickPlatformFileDialog::acceptLabel() const
+QString QQuickLabsPlatformFileDialog::acceptLabel() const
{
return m_options->labelText(QFileDialogOptions::Accept);
}
-void QQuickPlatformFileDialog::setAcceptLabel(const QString &label)
+void QQuickLabsPlatformFileDialog::setAcceptLabel(const QString &label)
{
if (label == m_options->labelText(QFileDialogOptions::Accept))
return;
@@ -459,7 +459,7 @@ void QQuickPlatformFileDialog::setAcceptLabel(const QString &label)
emit acceptLabelChanged();
}
-void QQuickPlatformFileDialog::resetAcceptLabel()
+void QQuickLabsPlatformFileDialog::resetAcceptLabel()
{
setAcceptLabel(QString());
}
@@ -476,12 +476,12 @@ void QQuickPlatformFileDialog::resetAcceptLabel()
\sa acceptLabel
*/
-QString QQuickPlatformFileDialog::rejectLabel() const
+QString QQuickLabsPlatformFileDialog::rejectLabel() const
{
return m_options->labelText(QFileDialogOptions::Reject);
}
-void QQuickPlatformFileDialog::setRejectLabel(const QString &label)
+void QQuickLabsPlatformFileDialog::setRejectLabel(const QString &label)
{
if (label == m_options->labelText(QFileDialogOptions::Reject))
return;
@@ -490,29 +490,29 @@ void QQuickPlatformFileDialog::setRejectLabel(const QString &label)
emit rejectLabelChanged();
}
-void QQuickPlatformFileDialog::resetRejectLabel()
+void QQuickLabsPlatformFileDialog::resetRejectLabel()
{
setRejectLabel(QString());
}
-bool QQuickPlatformFileDialog::useNativeDialog() const
+bool QQuickLabsPlatformFileDialog::useNativeDialog() const
{
- return QQuickPlatformDialog::useNativeDialog()
+ return QQuickLabsPlatformDialog::useNativeDialog()
&& !m_options->testOption(QFileDialogOptions::DontUseNativeDialog);
}
-void QQuickPlatformFileDialog::onCreate(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformFileDialog::onCreate(QPlatformDialogHelper *dialog)
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(dialog)) {
// TODO: emit currentFileChanged only when the first entry in currentFiles changes
- connect(fileDialog, &QPlatformFileDialogHelper::currentChanged, this, &QQuickPlatformFileDialog::currentFileChanged);
- connect(fileDialog, &QPlatformFileDialogHelper::currentChanged, this, &QQuickPlatformFileDialog::currentFilesChanged);
- connect(fileDialog, &QPlatformFileDialogHelper::directoryEntered, this, &QQuickPlatformFileDialog::folderChanged);
+ connect(fileDialog, &QPlatformFileDialogHelper::currentChanged, this, &QQuickLabsPlatformFileDialog::currentFileChanged);
+ connect(fileDialog, &QPlatformFileDialogHelper::currentChanged, this, &QQuickLabsPlatformFileDialog::currentFilesChanged);
+ connect(fileDialog, &QPlatformFileDialogHelper::directoryEntered, this, &QQuickLabsPlatformFileDialog::folderChanged);
fileDialog->setOptions(m_options);
}
}
-void QQuickPlatformFileDialog::onShow(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformFileDialog::onShow(QPlatformDialogHelper *dialog)
{
m_options->setWindowTitle(title());
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(dialog)) {
@@ -524,29 +524,29 @@ void QQuickPlatformFileDialog::onShow(QPlatformDialogHelper *dialog)
const QString filter = m_options->nameFilters().value(index);
m_options->setInitiallySelectedNameFilter(filter);
fileDialog->selectNameFilter(filter);
- connect(fileDialog, &QPlatformFileDialogHelper::filterSelected, m_selectedNameFilter, &QQuickPlatformFileNameFilter::update);
+ connect(fileDialog, &QPlatformFileDialogHelper::filterSelected, m_selectedNameFilter, &QQuickLabsPlatformFileNameFilter::update);
}
}
if (m_firstShow)
m_firstShow = false;
}
-void QQuickPlatformFileDialog::onHide(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformFileDialog::onHide(QPlatformDialogHelper *dialog)
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(dialog)) {
if (m_selectedNameFilter)
- disconnect(fileDialog, &QPlatformFileDialogHelper::filterSelected, m_selectedNameFilter, &QQuickPlatformFileNameFilter::update);
+ disconnect(fileDialog, &QPlatformFileDialogHelper::filterSelected, m_selectedNameFilter, &QQuickLabsPlatformFileNameFilter::update);
}
}
-void QQuickPlatformFileDialog::accept()
+void QQuickLabsPlatformFileDialog::accept()
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle()))
setFiles(fileDialog->selectedFiles());
- QQuickPlatformDialog::accept();
+ QQuickLabsPlatformDialog::accept();
}
-QUrl QQuickPlatformFileDialog::addDefaultSuffix(const QUrl &file) const
+QUrl QQuickLabsPlatformFileDialog::addDefaultSuffix(const QUrl &file) const
{
QUrl url = file;
const QString path = url.path();
@@ -556,7 +556,7 @@ QUrl QQuickPlatformFileDialog::addDefaultSuffix(const QUrl &file) const
return url;
}
-QList<QUrl> QQuickPlatformFileDialog::addDefaultSuffixes(const QList<QUrl> &files) const
+QList<QUrl> QQuickLabsPlatformFileDialog::addDefaultSuffixes(const QList<QUrl> &files) const
{
QList<QUrl> urls;
urls.reserve(files.size());
@@ -565,17 +565,17 @@ QList<QUrl> QQuickPlatformFileDialog::addDefaultSuffixes(const QList<QUrl> &file
return urls;
}
-QQuickPlatformFileNameFilter::QQuickPlatformFileNameFilter(QObject *parent)
+QQuickLabsPlatformFileNameFilter::QQuickLabsPlatformFileNameFilter(QObject *parent)
: QObject(parent), m_index(-1)
{
}
-int QQuickPlatformFileNameFilter::index() const
+int QQuickLabsPlatformFileNameFilter::index() const
{
return m_index;
}
-void QQuickPlatformFileNameFilter::setIndex(int index)
+void QQuickLabsPlatformFileNameFilter::setIndex(int index)
{
if (m_index == index)
return;
@@ -584,22 +584,22 @@ void QQuickPlatformFileNameFilter::setIndex(int index)
emit indexChanged(index);
}
-QString QQuickPlatformFileNameFilter::name() const
+QString QQuickLabsPlatformFileNameFilter::name() const
{
return m_name;
}
-QStringList QQuickPlatformFileNameFilter::extensions() const
+QStringList QQuickLabsPlatformFileNameFilter::extensions() const
{
return m_extensions;
}
-QSharedPointer<QFileDialogOptions> QQuickPlatformFileNameFilter::options() const
+QSharedPointer<QFileDialogOptions> QQuickLabsPlatformFileNameFilter::options() const
{
return m_options;
}
-void QQuickPlatformFileNameFilter::setOptions(const QSharedPointer<QFileDialogOptions> &options)
+void QQuickLabsPlatformFileNameFilter::setOptions(const QSharedPointer<QFileDialogOptions> &options)
{
m_options = options;
}
@@ -629,7 +629,7 @@ static QStringList extractExtensions(QStringView filter)
return extensions;
}
-void QQuickPlatformFileNameFilter::update(const QString &filter)
+void QQuickLabsPlatformFileNameFilter::update(const QString &filter)
{
const QStringList filters = nameFilters();
@@ -649,12 +649,12 @@ void QQuickPlatformFileNameFilter::update(const QString &filter)
emit extensionsChanged(m_extensions);
}
-QStringList QQuickPlatformFileNameFilter::nameFilters() const
+QStringList QQuickLabsPlatformFileNameFilter::nameFilters() const
{
return m_options ? m_options->nameFilters() : QStringList();
}
-QString QQuickPlatformFileNameFilter::nameFilter(int index) const
+QString QQuickLabsPlatformFileNameFilter::nameFilter(int index) const
{
return m_options ? m_options->nameFilters().value(index) : QString();
}
diff --git a/src/labs/platform/qquickplatformfiledialog_p.h b/src/labs/platform/qquicklabsplatformfiledialog_p.h
index b867f3c897..782b598047 100644
--- a/src/labs/platform/qquickplatformfiledialog_p.h
+++ b/src/labs/platform/qquicklabsplatformfiledialog_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMFILEDIALOG_P_H
-#define QQUICKPLATFORMFILEDIALOG_P_H
+#ifndef QQUICKLABSPLATFORMFILEDIALOG_P_H
+#define QQUICKLABSPLATFORMFILEDIALOG_P_H
//
// W A R N I N G
@@ -48,15 +48,15 @@
// We mean it.
//
-#include "qquickplatformdialog_p.h"
+#include "qquicklabsplatformdialog_p.h"
#include <QtCore/qurl.h>
#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
-class QQuickPlatformFileNameFilter;
+class QQuickLabsPlatformFileNameFilter;
-class QQuickPlatformFileDialog : public QQuickPlatformDialog
+class QQuickLabsPlatformFileDialog : public QQuickLabsPlatformDialog
{
Q_OBJECT
Q_PROPERTY(FileMode fileMode READ fileMode WRITE setFileMode NOTIFY fileModeChanged FINAL)
@@ -67,14 +67,14 @@ class QQuickPlatformFileDialog : public QQuickPlatformDialog
Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged FINAL)
Q_PROPERTY(QFileDialogOptions::FileDialogOptions options READ options WRITE setOptions RESET resetOptions NOTIFY optionsChanged FINAL)
Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters RESET resetNameFilters NOTIFY nameFiltersChanged FINAL)
- Q_PROPERTY(QQuickPlatformFileNameFilter *selectedNameFilter READ selectedNameFilter CONSTANT)
+ Q_PROPERTY(QQuickLabsPlatformFileNameFilter *selectedNameFilter READ selectedNameFilter CONSTANT)
Q_PROPERTY(QString defaultSuffix READ defaultSuffix WRITE setDefaultSuffix RESET resetDefaultSuffix NOTIFY defaultSuffixChanged FINAL)
Q_PROPERTY(QString acceptLabel READ acceptLabel WRITE setAcceptLabel RESET resetAcceptLabel NOTIFY acceptLabelChanged FINAL)
Q_PROPERTY(QString rejectLabel READ rejectLabel WRITE setRejectLabel RESET resetRejectLabel NOTIFY rejectLabelChanged FINAL)
Q_FLAGS(QFileDialogOptions::FileDialogOptions)
public:
- explicit QQuickPlatformFileDialog(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformFileDialog(QObject *parent = nullptr);
enum FileMode {
OpenFile,
@@ -109,7 +109,7 @@ public:
void setNameFilters(const QStringList &filters);
void resetNameFilters();
- QQuickPlatformFileNameFilter *selectedNameFilter() const;
+ QQuickLabsPlatformFileNameFilter *selectedNameFilter() const;
QString defaultSuffix() const;
void setDefaultSuffix(const QString &suffix);
@@ -151,10 +151,10 @@ private:
QList<QUrl> m_files;
bool m_firstShow = true;
QSharedPointer<QFileDialogOptions> m_options;
- mutable QQuickPlatformFileNameFilter *m_selectedNameFilter;
+ mutable QQuickLabsPlatformFileNameFilter *m_selectedNameFilter;
};
-class QQuickPlatformFileNameFilter : public QObject
+class QQuickLabsPlatformFileNameFilter : public QObject
{
Q_OBJECT
Q_PROPERTY(int index READ index WRITE setIndex NOTIFY indexChanged FINAL)
@@ -162,7 +162,7 @@ class QQuickPlatformFileNameFilter : public QObject
Q_PROPERTY(QStringList extensions READ extensions NOTIFY extensionsChanged FINAL)
public:
- explicit QQuickPlatformFileNameFilter(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformFileNameFilter(QObject *parent = nullptr);
int index() const;
void setIndex(int index);
@@ -192,6 +192,6 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformFileDialog)
+QML_DECLARE_TYPE(QQuickLabsPlatformFileDialog)
-#endif // QQUICKPLATFORMFILEDIALOG_P_H
+#endif // QQUICKLABSPLATFORMFILEDIALOG_P_H
diff --git a/src/labs/platform/qquickplatformfolderdialog.cpp b/src/labs/platform/qquicklabsplatformfolderdialog.cpp
index ca6a17b188..0215d04b5e 100644
--- a/src/labs/platform/qquickplatformfolderdialog.cpp
+++ b/src/labs/platform/qquicklabsplatformfolderdialog.cpp
@@ -34,14 +34,14 @@
**
****************************************************************************/
-#include "qquickplatformfolderdialog_p.h"
+#include "qquicklabsplatformfolderdialog_p.h"
QT_BEGIN_NAMESPACE
/*!
\qmltype FolderDialog
\inherits Dialog
-//! \instantiates QQuickPlatformFolderDialog
+//! \instantiates QQuickLabsPlatformFolderDialog
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native folder dialog.
@@ -92,8 +92,8 @@ QT_BEGIN_NAMESPACE
\sa FileDialog, StandardPaths
*/
-QQuickPlatformFolderDialog::QQuickPlatformFolderDialog(QObject *parent)
- : QQuickPlatformDialog(QPlatformTheme::FileDialog, parent),
+QQuickLabsPlatformFolderDialog::QQuickLabsPlatformFolderDialog(QObject *parent)
+ : QQuickLabsPlatformDialog(QPlatformTheme::FileDialog, parent),
m_options(QFileDialogOptions::create())
{
m_options->setFileMode(QFileDialogOptions::Directory);
@@ -113,12 +113,12 @@ QQuickPlatformFolderDialog::QQuickPlatformFolderDialog(QObject *parent)
\sa currentFolder, {Dialog::}{accepted()}
*/
-QUrl QQuickPlatformFolderDialog::folder() const
+QUrl QQuickLabsPlatformFolderDialog::folder() const
{
return m_folder;
}
-void QQuickPlatformFolderDialog::setFolder(const QUrl &folder)
+void QQuickLabsPlatformFolderDialog::setFolder(const QUrl &folder)
{
if (m_folder == folder)
return;
@@ -139,7 +139,7 @@ void QQuickPlatformFolderDialog::setFolder(const QUrl &folder)
\sa folder
*/
-QUrl QQuickPlatformFolderDialog::currentFolder() const
+QUrl QQuickLabsPlatformFolderDialog::currentFolder() const
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle())) {
const QList<QUrl> selectedFiles = fileDialog->selectedFiles();
@@ -150,7 +150,7 @@ QUrl QQuickPlatformFolderDialog::currentFolder() const
return m_options->initialDirectory();
}
-void QQuickPlatformFolderDialog::setCurrentFolder(const QUrl &folder)
+void QQuickLabsPlatformFolderDialog::setCurrentFolder(const QUrl &folder)
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle()))
fileDialog->setDirectory(folder);
@@ -173,12 +173,12 @@ void QQuickPlatformFolderDialog::setCurrentFolder(const QUrl &folder)
\value FolderDialog.DontResolveSymlinks Don't resolve symlinks in the folder dialog. By default symlinks are resolved.
\value FolderDialog.ReadOnly Indicates that the dialog doesn't allow creating directories.
*/
-QFileDialogOptions::FileDialogOptions QQuickPlatformFolderDialog::options() const
+QFileDialogOptions::FileDialogOptions QQuickLabsPlatformFolderDialog::options() const
{
return m_options->options();
}
-void QQuickPlatformFolderDialog::setOptions(QFileDialogOptions::FileDialogOptions options)
+void QQuickLabsPlatformFolderDialog::setOptions(QFileDialogOptions::FileDialogOptions options)
{
if (options == m_options->options())
return;
@@ -187,7 +187,7 @@ void QQuickPlatformFolderDialog::setOptions(QFileDialogOptions::FileDialogOption
emit optionsChanged();
}
-void QQuickPlatformFolderDialog::resetOptions()
+void QQuickLabsPlatformFolderDialog::resetOptions()
{
setOptions({});
}
@@ -204,12 +204,12 @@ void QQuickPlatformFolderDialog::resetOptions()
\sa rejectLabel
*/
-QString QQuickPlatformFolderDialog::acceptLabel() const
+QString QQuickLabsPlatformFolderDialog::acceptLabel() const
{
return m_options->labelText(QFileDialogOptions::Accept);
}
-void QQuickPlatformFolderDialog::setAcceptLabel(const QString &label)
+void QQuickLabsPlatformFolderDialog::setAcceptLabel(const QString &label)
{
if (label == m_options->labelText(QFileDialogOptions::Accept))
return;
@@ -218,7 +218,7 @@ void QQuickPlatformFolderDialog::setAcceptLabel(const QString &label)
emit acceptLabelChanged();
}
-void QQuickPlatformFolderDialog::resetAcceptLabel()
+void QQuickLabsPlatformFolderDialog::resetAcceptLabel()
{
setAcceptLabel(QString());
}
@@ -235,12 +235,12 @@ void QQuickPlatformFolderDialog::resetAcceptLabel()
\sa acceptLabel
*/
-QString QQuickPlatformFolderDialog::rejectLabel() const
+QString QQuickLabsPlatformFolderDialog::rejectLabel() const
{
return m_options->labelText(QFileDialogOptions::Reject);
}
-void QQuickPlatformFolderDialog::setRejectLabel(const QString &label)
+void QQuickLabsPlatformFolderDialog::setRejectLabel(const QString &label)
{
if (label == m_options->labelText(QFileDialogOptions::Reject))
return;
@@ -249,36 +249,36 @@ void QQuickPlatformFolderDialog::setRejectLabel(const QString &label)
emit rejectLabelChanged();
}
-void QQuickPlatformFolderDialog::resetRejectLabel()
+void QQuickLabsPlatformFolderDialog::resetRejectLabel()
{
setRejectLabel(QString());
}
-bool QQuickPlatformFolderDialog::useNativeDialog() const
+bool QQuickLabsPlatformFolderDialog::useNativeDialog() const
{
- return QQuickPlatformDialog::useNativeDialog()
+ return QQuickLabsPlatformDialog::useNativeDialog()
&& !m_options->testOption(QFileDialogOptions::DontUseNativeDialog);
}
-void QQuickPlatformFolderDialog::onCreate(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformFolderDialog::onCreate(QPlatformDialogHelper *dialog)
{
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(dialog)) {
- connect(fileDialog, &QPlatformFileDialogHelper::currentChanged, this, &QQuickPlatformFolderDialog::currentFolderChanged);
+ connect(fileDialog, &QPlatformFileDialogHelper::currentChanged, this, &QQuickLabsPlatformFolderDialog::currentFolderChanged);
fileDialog->setOptions(m_options);
}
}
-void QQuickPlatformFolderDialog::onShow(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformFolderDialog::onShow(QPlatformDialogHelper *dialog)
{
m_options->setWindowTitle(title());
if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(dialog))
fileDialog->setOptions(m_options);
}
-void QQuickPlatformFolderDialog::accept()
+void QQuickLabsPlatformFolderDialog::accept()
{
setFolder(currentFolder());
- QQuickPlatformDialog::accept();
+ QQuickLabsPlatformDialog::accept();
}
QT_END_NAMESPACE
diff --git a/src/labs/platform/qquickplatformfolderdialog_p.h b/src/labs/platform/qquicklabsplatformfolderdialog_p.h
index 69878cb94c..21ee3c6c43 100644
--- a/src/labs/platform/qquickplatformfolderdialog_p.h
+++ b/src/labs/platform/qquicklabsplatformfolderdialog_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMFOLDERDIALOG_P_H
-#define QQUICKPLATFORMFOLDERDIALOG_P_H
+#ifndef QQUICKLABSPLATFORMFOLDERDIALOG_P_H
+#define QQUICKLABSPLATFORMFOLDERDIALOG_P_H
//
// W A R N I N G
@@ -48,13 +48,13 @@
// We mean it.
//
-#include "qquickplatformdialog_p.h"
+#include "qquicklabsplatformdialog_p.h"
#include <QtCore/qurl.h>
#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
-class QQuickPlatformFolderDialog : public QQuickPlatformDialog
+class QQuickLabsPlatformFolderDialog : public QQuickLabsPlatformDialog
{
Q_OBJECT
Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged FINAL)
@@ -65,7 +65,7 @@ class QQuickPlatformFolderDialog : public QQuickPlatformDialog
Q_FLAGS(QFileDialogOptions::FileDialogOptions)
public:
- explicit QQuickPlatformFolderDialog(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformFolderDialog(QObject *parent = nullptr);
QUrl folder() const;
void setFolder(const QUrl &folder);
@@ -105,6 +105,6 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformFolderDialog)
+QML_DECLARE_TYPE(QQuickLabsPlatformFolderDialog)
-#endif // QQUICKPLATFORMFOLDERDIALOG_P_H
+#endif // QQUICKLABSPLATFORMFOLDERDIALOG_P_H
diff --git a/src/labs/platform/qquickplatformfontdialog.cpp b/src/labs/platform/qquicklabsplatformfontdialog.cpp
index f3eca2c33a..67d0432eb9 100644
--- a/src/labs/platform/qquickplatformfontdialog.cpp
+++ b/src/labs/platform/qquicklabsplatformfontdialog.cpp
@@ -34,14 +34,14 @@
**
****************************************************************************/
-#include "qquickplatformfontdialog_p.h"
+#include "qquicklabsplatformfontdialog_p.h"
QT_BEGIN_NAMESPACE
/*!
\qmltype FontDialog
\inherits Dialog
-//! \instantiates QQuickPlatformFontDialog
+//! \instantiates QQuickLabsPlatformFontDialog
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native font dialog.
@@ -87,8 +87,8 @@ QT_BEGIN_NAMESPACE
\labs
*/
-QQuickPlatformFontDialog::QQuickPlatformFontDialog(QObject *parent)
- : QQuickPlatformDialog(QPlatformTheme::FontDialog, parent),
+QQuickLabsPlatformFontDialog::QQuickLabsPlatformFontDialog(QObject *parent)
+ : QQuickLabsPlatformDialog(QPlatformTheme::FontDialog, parent),
m_options(QFontDialogOptions::create())
{
}
@@ -106,12 +106,12 @@ QQuickPlatformFontDialog::QQuickPlatformFontDialog(QObject *parent)
\sa currentFont, {Dialog::}{accepted()}
*/
-QFont QQuickPlatformFontDialog::font() const
+QFont QQuickLabsPlatformFontDialog::font() const
{
return m_font;
}
-void QQuickPlatformFontDialog::setFont(const QFont &font)
+void QQuickLabsPlatformFontDialog::setFont(const QFont &font)
{
if (m_font == font)
return;
@@ -132,14 +132,14 @@ void QQuickPlatformFontDialog::setFont(const QFont &font)
\sa font
*/
-QFont QQuickPlatformFontDialog::currentFont() const
+QFont QQuickLabsPlatformFontDialog::currentFont() const
{
if (QPlatformFontDialogHelper *fontDialog = qobject_cast<QPlatformFontDialogHelper *>(handle()))
return fontDialog->currentFont();
return m_currentFont;
}
-void QQuickPlatformFontDialog::setCurrentFont(const QFont &font)
+void QQuickLabsPlatformFontDialog::setCurrentFont(const QFont &font)
{
if (QPlatformFontDialogHelper *fontDialog = qobject_cast<QPlatformFontDialogHelper *>(handle()))
fontDialog->setCurrentFont(font);
@@ -164,12 +164,12 @@ void QQuickPlatformFontDialog::setCurrentFont(const QFont &font)
\value FontDialog.ProportionalFonts Show proportional fonts.
\value FontDialog.NoButtons Don't display \uicontrol OK and \uicontrol Cancel buttons (useful for "live dialogs").
*/
-QFontDialogOptions::FontDialogOptions QQuickPlatformFontDialog::options() const
+QFontDialogOptions::FontDialogOptions QQuickLabsPlatformFontDialog::options() const
{
return m_options->options();
}
-void QQuickPlatformFontDialog::setOptions(QFontDialogOptions::FontDialogOptions options)
+void QQuickLabsPlatformFontDialog::setOptions(QFontDialogOptions::FontDialogOptions options)
{
if (options == m_options->options())
return;
@@ -178,31 +178,31 @@ void QQuickPlatformFontDialog::setOptions(QFontDialogOptions::FontDialogOptions
emit optionsChanged();
}
-bool QQuickPlatformFontDialog::useNativeDialog() const
+bool QQuickLabsPlatformFontDialog::useNativeDialog() const
{
- return QQuickPlatformDialog::useNativeDialog()
+ return QQuickLabsPlatformDialog::useNativeDialog()
&& !m_options->testOption(QFontDialogOptions::DontUseNativeDialog);
}
-void QQuickPlatformFontDialog::onCreate(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformFontDialog::onCreate(QPlatformDialogHelper *dialog)
{
if (QPlatformFontDialogHelper *fontDialog = qobject_cast<QPlatformFontDialogHelper *>(dialog)) {
- connect(fontDialog, &QPlatformFontDialogHelper::currentFontChanged, this, &QQuickPlatformFontDialog::currentFontChanged);
+ connect(fontDialog, &QPlatformFontDialogHelper::currentFontChanged, this, &QQuickLabsPlatformFontDialog::currentFontChanged);
fontDialog->setOptions(m_options);
}
}
-void QQuickPlatformFontDialog::onShow(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformFontDialog::onShow(QPlatformDialogHelper *dialog)
{
m_options->setWindowTitle(title());
if (QPlatformFontDialogHelper *fontDialog = qobject_cast<QPlatformFontDialogHelper *>(dialog))
fontDialog->setOptions(m_options);
}
-void QQuickPlatformFontDialog::accept()
+void QQuickLabsPlatformFontDialog::accept()
{
setFont(currentFont());
- QQuickPlatformDialog::accept();
+ QQuickLabsPlatformDialog::accept();
}
QT_END_NAMESPACE
diff --git a/src/labs/platform/qquickplatformfontdialog_p.h b/src/labs/platform/qquicklabsplatformfontdialog_p.h
index e794647706..eb9399d998 100644
--- a/src/labs/platform/qquickplatformfontdialog_p.h
+++ b/src/labs/platform/qquicklabsplatformfontdialog_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMFONTDIALOG_P_H
-#define QQUICKPLATFORMFONTDIALOG_P_H
+#ifndef QQUICKLABSPLATFORMFONTDIALOG_P_H
+#define QQUICKLABSPLATFORMFONTDIALOG_P_H
//
// W A R N I N G
@@ -48,13 +48,13 @@
// We mean it.
//
-#include "qquickplatformdialog_p.h"
+#include "qquicklabsplatformdialog_p.h"
#include <QtGui/qfont.h>
#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
-class QQuickPlatformFontDialog : public QQuickPlatformDialog
+class QQuickLabsPlatformFontDialog : public QQuickLabsPlatformDialog
{
Q_OBJECT
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL)
@@ -63,7 +63,7 @@ class QQuickPlatformFontDialog : public QQuickPlatformDialog
Q_FLAGS(QFontDialogOptions::FontDialogOptions)
public:
- explicit QQuickPlatformFontDialog(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformFontDialog(QObject *parent = nullptr);
QFont font() const;
void setFont(const QFont &font);
@@ -93,6 +93,6 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformFontDialog)
+QML_DECLARE_TYPE(QQuickLabsPlatformFontDialog)
-#endif // QQUICKPLATFORMFONTDIALOG_P_H
+#endif // QQUICKLABSPLATFORMFONTDIALOG_P_H
diff --git a/src/labs/platform/qquickplatformicon.cpp b/src/labs/platform/qquicklabsplatformicon.cpp
index 7096ff8ae8..a3d0f325f4 100644
--- a/src/labs/platform/qquickplatformicon.cpp
+++ b/src/labs/platform/qquicklabsplatformicon.cpp
@@ -34,46 +34,46 @@
**
****************************************************************************/
-#include "qquickplatformicon_p.h"
+#include "qquicklabsplatformicon_p.h"
QT_BEGIN_NAMESPACE
-QUrl QQuickPlatformIcon::source() const
+QUrl QQuickLabsPlatformIcon::source() const
{
return m_source;
}
-void QQuickPlatformIcon::setSource(const QUrl& source)
+void QQuickLabsPlatformIcon::setSource(const QUrl& source)
{
m_source = source;
}
-QString QQuickPlatformIcon::name() const
+QString QQuickLabsPlatformIcon::name() const
{
return m_name;
}
-void QQuickPlatformIcon::setName(const QString& name)
+void QQuickLabsPlatformIcon::setName(const QString& name)
{
m_name = name;
}
-bool QQuickPlatformIcon::isMask() const
+bool QQuickLabsPlatformIcon::isMask() const
{
return m_mask;
}
-void QQuickPlatformIcon::setMask(bool mask)
+void QQuickLabsPlatformIcon::setMask(bool mask)
{
m_mask = mask;
}
-bool QQuickPlatformIcon::operator==(const QQuickPlatformIcon &other) const
+bool QQuickLabsPlatformIcon::operator==(const QQuickLabsPlatformIcon &other) const
{
return m_source == other.m_source && m_name == other.m_name && m_mask == other.m_mask;
}
-bool QQuickPlatformIcon::operator!=(const QQuickPlatformIcon &other) const
+bool QQuickLabsPlatformIcon::operator!=(const QQuickLabsPlatformIcon &other) const
{
return !(*this == other);
}
diff --git a/src/labs/platform/qquickplatformicon_p.h b/src/labs/platform/qquicklabsplatformicon_p.h
index 9add9d6e72..eaf0c2d3df 100644
--- a/src/labs/platform/qquickplatformicon_p.h
+++ b/src/labs/platform/qquicklabsplatformicon_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMICON_P_H
-#define QQUICKPLATFORMICON_P_H
+#ifndef QQUICKLABSPLATFORMICON_P_H
+#define QQUICKLABSPLATFORMICON_P_H
//
// W A R N I N G
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
class QObject;
-class QQuickPlatformIcon
+class QQuickLabsPlatformIcon
{
Q_GADGET
Q_PROPERTY(QUrl source READ source WRITE setSource)
@@ -72,8 +72,8 @@ public:
bool isMask() const;
void setMask(bool mask);
- bool operator==(const QQuickPlatformIcon &other) const;
- bool operator!=(const QQuickPlatformIcon &other) const;
+ bool operator==(const QQuickLabsPlatformIcon &other) const;
+ bool operator!=(const QQuickLabsPlatformIcon &other) const;
private:
bool m_mask = false;
@@ -83,4 +83,4 @@ private:
QT_END_NAMESPACE
-#endif // QQUICKPLATFORMICON_P_H
+#endif // QQUICKLABSPLATFORMICON_P_H
diff --git a/src/labs/platform/qquickplatformiconloader.cpp b/src/labs/platform/qquicklabsplatformiconloader.cpp
index c7b699b2ce..6d6deb5812 100644
--- a/src/labs/platform/qquickplatformiconloader.cpp
+++ b/src/labs/platform/qquicklabsplatformiconloader.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "qquickplatformiconloader_p.h"
+#include "qquicklabsplatformiconloader_p.h"
#include <QtCore/qobject.h>
#include <QtCore/qmetaobject.h>
@@ -42,7 +42,7 @@
QT_BEGIN_NAMESPACE
-QQuickPlatformIconLoader::QQuickPlatformIconLoader(int slot, QObject *parent)
+QQuickLabsPlatformIconLoader::QQuickLabsPlatformIconLoader(int slot, QObject *parent)
: m_parent(parent),
m_slot(slot),
m_enabled(false)
@@ -50,19 +50,19 @@ QQuickPlatformIconLoader::QQuickPlatformIconLoader(int slot, QObject *parent)
Q_ASSERT(slot != -1 && parent);
}
-bool QQuickPlatformIconLoader::isEnabled() const
+bool QQuickLabsPlatformIconLoader::isEnabled() const
{
return m_enabled;
}
-void QQuickPlatformIconLoader::setEnabled(bool enabled)
+void QQuickLabsPlatformIconLoader::setEnabled(bool enabled)
{
m_enabled = enabled;
if (m_enabled)
loadIcon();
}
-QIcon QQuickPlatformIconLoader::toQIcon() const
+QIcon QQuickLabsPlatformIconLoader::toQIcon() const
{
QIcon fallback = QPixmap::fromImage(image());
QIcon icon = QIcon::fromTheme(m_icon.name(), fallback);
@@ -70,19 +70,19 @@ QIcon QQuickPlatformIconLoader::toQIcon() const
return icon;
}
-QQuickPlatformIcon QQuickPlatformIconLoader::icon() const
+QQuickLabsPlatformIcon QQuickLabsPlatformIconLoader::icon() const
{
return m_icon;
}
-void QQuickPlatformIconLoader::setIcon(const QQuickPlatformIcon& icon)
+void QQuickLabsPlatformIconLoader::setIcon(const QQuickLabsPlatformIcon& icon)
{
m_icon = icon;
if (m_enabled)
loadIcon();
}
-void QQuickPlatformIconLoader::loadIcon()
+void QQuickLabsPlatformIconLoader::loadIcon()
{
if (m_icon.source().isEmpty()) {
clear(m_parent);
diff --git a/src/labs/platform/qquickplatformiconloader_p.h b/src/labs/platform/qquicklabsplatformiconloader_p.h
index d284a5130e..ed48e1cf67 100644
--- a/src/labs/platform/qquickplatformiconloader_p.h
+++ b/src/labs/platform/qquicklabsplatformiconloader_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMICONLOADER_P_H
-#define QQUICKPLATFORMICONLOADER_P_H
+#ifndef QQUICKLABSPLATFORMICONLOADER_P_H
+#define QQUICKLABSPLATFORMICONLOADER_P_H
//
// W A R N I N G
@@ -53,24 +53,24 @@
#include <QtGui/qicon.h>
#include <QtQuick/private/qquickpixmapcache_p.h>
-#include "qquickplatformicon_p.h"
+#include "qquicklabsplatformicon_p.h"
QT_BEGIN_NAMESPACE
class QObject;
-class QQuickPlatformIconLoader : public QQuickPixmap
+class QQuickLabsPlatformIconLoader : public QQuickPixmap
{
public:
- QQuickPlatformIconLoader(int slot, QObject *parent);
+ QQuickLabsPlatformIconLoader(int slot, QObject *parent);
bool isEnabled() const;
void setEnabled(bool enabled);
QIcon toQIcon() const;
- QQuickPlatformIcon icon() const;
- void setIcon(const QQuickPlatformIcon &icon);
+ QQuickLabsPlatformIcon icon() const;
+ void setIcon(const QQuickLabsPlatformIcon &icon);
private:
void loadIcon();
@@ -78,9 +78,9 @@ private:
QObject *m_parent;
int m_slot;
bool m_enabled;
- QQuickPlatformIcon m_icon;
+ QQuickLabsPlatformIcon m_icon;
};
QT_END_NAMESPACE
-#endif // QQUICKPLATFORMICONLOADER_P_H
+#endif // QQUICKLABSPLATFORMICONLOADER_P_H
diff --git a/src/labs/platform/qquickplatformmenu.cpp b/src/labs/platform/qquicklabsplatformmenu.cpp
index 4b82687b41..e5cf45d386 100644
--- a/src/labs/platform/qquickplatformmenu.cpp
+++ b/src/labs/platform/qquicklabsplatformmenu.cpp
@@ -34,10 +34,10 @@
**
****************************************************************************/
-#include "qquickplatformmenu_p.h"
-#include "qquickplatformmenubar_p.h"
-#include "qquickplatformmenuitem_p.h"
-#include "qquickplatformiconloader_p.h"
+#include "qquicklabsplatformmenu_p.h"
+#include "qquicklabsplatformmenubar_p.h"
+#include "qquicklabsplatformmenuitem_p.h"
+#include "qquicklabsplatformiconloader_p.h"
#include <QtCore/qloggingcategory.h>
#include <QtGui/qicon.h>
@@ -55,7 +55,7 @@
#include "widgets/qwidgetplatform_p.h"
#if QT_CONFIG(systemtrayicon)
-#include "qquickplatformsystemtrayicon_p.h"
+#include "qquicklabsplatformsystemtrayicon_p.h"
#endif
QT_BEGIN_NAMESPACE
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Menu
\inherits QtObject
-//! \instantiates QQuickPlatformMenu
+//! \instantiates QQuickLabsPlatformMenu
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native menu.
@@ -194,7 +194,7 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(qtLabsPlatformMenus)
-QQuickPlatformMenu::QQuickPlatformMenu(QObject *parent)
+QQuickLabsPlatformMenu::QQuickLabsPlatformMenu(QObject *parent)
: QObject(parent),
m_complete(false),
m_enabled(true),
@@ -210,7 +210,7 @@ QQuickPlatformMenu::QQuickPlatformMenu(QObject *parent)
{
}
-QQuickPlatformMenu::~QQuickPlatformMenu()
+QQuickLabsPlatformMenu::~QQuickLabsPlatformMenu()
{
if (m_menuBar)
m_menuBar->removeMenu(this);
@@ -225,21 +225,21 @@ QQuickPlatformMenu::~QQuickPlatformMenu()
m_handle = nullptr;
}
-void QQuickPlatformMenu::unparentSubmenus()
+void QQuickLabsPlatformMenu::unparentSubmenus()
{
- for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
- if (QQuickPlatformMenu *subMenu = item->subMenu())
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items)) {
+ if (QQuickLabsPlatformMenu *subMenu = item->subMenu())
subMenu->setParentMenu(nullptr);
item->setMenu(nullptr);
}
}
-QPlatformMenu *QQuickPlatformMenu::handle() const
+QPlatformMenu *QQuickLabsPlatformMenu::handle() const
{
return m_handle;
}
-QPlatformMenu * QQuickPlatformMenu::create()
+QPlatformMenu * QQuickLabsPlatformMenu::create()
{
if (!m_handle) {
if (m_menuBar && m_menuBar->handle())
@@ -264,10 +264,10 @@ QPlatformMenu * QQuickPlatformMenu::create()
qCDebug(qtLabsPlatformMenus) << "Menu ->" << m_handle;
if (m_handle) {
- connect(m_handle, &QPlatformMenu::aboutToShow, this, &QQuickPlatformMenu::aboutToShow);
- connect(m_handle, &QPlatformMenu::aboutToHide, this, &QQuickPlatformMenu::aboutToHide);
+ connect(m_handle, &QPlatformMenu::aboutToShow, this, &QQuickLabsPlatformMenu::aboutToShow);
+ connect(m_handle, &QPlatformMenu::aboutToHide, this, &QQuickLabsPlatformMenu::aboutToHide);
- for (QQuickPlatformMenuItem *item : qAsConst(m_items))
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items))
m_handle->insertMenuItem(item->create(), nullptr);
if (m_menuItem) {
@@ -279,7 +279,7 @@ QPlatformMenu * QQuickPlatformMenu::create()
return m_handle;
}
-void QQuickPlatformMenu::destroy()
+void QQuickLabsPlatformMenu::destroy()
{
if (!m_handle)
return;
@@ -292,7 +292,7 @@ void QQuickPlatformMenu::destroy()
m_handle = nullptr;
}
-void QQuickPlatformMenu::sync()
+void QQuickLabsPlatformMenu::sync()
{
if (!m_complete || !create())
return;
@@ -311,7 +311,7 @@ void QQuickPlatformMenu::sync()
m_systemTrayIcon->handle()->updateMenu(m_handle);
#endif
- for (QQuickPlatformMenuItem *item : qAsConst(m_items))
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items))
item->sync();
}
@@ -325,7 +325,7 @@ void QQuickPlatformMenu::sync()
\sa items
*/
-QQmlListProperty<QObject> QQuickPlatformMenu::data()
+QQmlListProperty<QObject> QQuickLabsPlatformMenu::data()
{
return QQmlListProperty<QObject>(this, nullptr, data_append, data_count, data_at, data_clear);
}
@@ -335,9 +335,9 @@ QQmlListProperty<QObject> QQuickPlatformMenu::data()
This property holds the list of items in the menu.
*/
-QQmlListProperty<QQuickPlatformMenuItem> QQuickPlatformMenu::items()
+QQmlListProperty<QQuickLabsPlatformMenuItem> QQuickLabsPlatformMenu::items()
{
- return QQmlListProperty<QQuickPlatformMenuItem>(this, nullptr, items_append, items_count, items_at, items_clear);
+ return QQmlListProperty<QQuickLabsPlatformMenuItem>(this, nullptr, items_append, items_count, items_at, items_clear);
}
/*!
@@ -347,12 +347,12 @@ QQmlListProperty<QQuickPlatformMenuItem> QQuickPlatformMenu::items()
This property holds the menubar that the menu belongs to, or \c null if the
menu is not in a menubar.
*/
-QQuickPlatformMenuBar *QQuickPlatformMenu::menuBar() const
+QQuickLabsPlatformMenuBar *QQuickLabsPlatformMenu::menuBar() const
{
return m_menuBar;
}
-void QQuickPlatformMenu::setMenuBar(QQuickPlatformMenuBar *menuBar)
+void QQuickLabsPlatformMenu::setMenuBar(QQuickLabsPlatformMenuBar *menuBar)
{
if (m_menuBar == menuBar)
return;
@@ -369,12 +369,12 @@ void QQuickPlatformMenu::setMenuBar(QQuickPlatformMenuBar *menuBar)
This property holds the parent menu that the menu belongs to, or \c null if the
menu is not a sub-menu.
*/
-QQuickPlatformMenu *QQuickPlatformMenu::parentMenu() const
+QQuickLabsPlatformMenu *QQuickLabsPlatformMenu::parentMenu() const
{
return m_parentMenu;
}
-void QQuickPlatformMenu::setParentMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenu::setParentMenu(QQuickLabsPlatformMenu *menu)
{
if (m_parentMenu == menu)
return;
@@ -391,12 +391,12 @@ void QQuickPlatformMenu::setParentMenu(QQuickPlatformMenu *menu)
This property holds the system tray icon that the menu belongs to, or \c null
if the menu is not in a system tray icon.
*/
-QQuickPlatformSystemTrayIcon *QQuickPlatformMenu::systemTrayIcon() const
+QQuickLabsPlatformSystemTrayIcon *QQuickLabsPlatformMenu::systemTrayIcon() const
{
return m_systemTrayIcon;
}
-void QQuickPlatformMenu::setSystemTrayIcon(QQuickPlatformSystemTrayIcon *icon)
+void QQuickLabsPlatformMenu::setSystemTrayIcon(QQuickLabsPlatformSystemTrayIcon *icon)
{
if (m_systemTrayIcon == icon)
return;
@@ -412,11 +412,11 @@ void QQuickPlatformMenu::setSystemTrayIcon(QQuickPlatformSystemTrayIcon *icon)
This property holds the item that presents the menu (in a parent menu).
*/
-QQuickPlatformMenuItem *QQuickPlatformMenu::menuItem() const
+QQuickLabsPlatformMenuItem *QQuickLabsPlatformMenu::menuItem() const
{
if (!m_menuItem) {
- QQuickPlatformMenu *that = const_cast<QQuickPlatformMenu *>(this);
- m_menuItem = new QQuickPlatformMenuItem(that);
+ QQuickLabsPlatformMenu *that = const_cast<QQuickLabsPlatformMenu *>(this);
+ m_menuItem = new QQuickLabsPlatformMenuItem(that);
m_menuItem->setSubMenu(that);
m_menuItem->setText(m_title);
m_menuItem->setIcon(icon());
@@ -432,12 +432,12 @@ QQuickPlatformMenuItem *QQuickPlatformMenu::menuItem() const
This property holds whether the menu is enabled. The default value is \c true.
*/
-bool QQuickPlatformMenu::isEnabled() const
+bool QQuickLabsPlatformMenu::isEnabled() const
{
return m_enabled;
}
-void QQuickPlatformMenu::setEnabled(bool enabled)
+void QQuickLabsPlatformMenu::setEnabled(bool enabled)
{
if (m_enabled == enabled)
return;
@@ -455,12 +455,12 @@ void QQuickPlatformMenu::setEnabled(bool enabled)
This property holds whether the menu is visible. The default value is \c true.
*/
-bool QQuickPlatformMenu::isVisible() const
+bool QQuickLabsPlatformMenu::isVisible() const
{
return m_visible;
}
-void QQuickPlatformMenu::setVisible(bool visible)
+void QQuickLabsPlatformMenu::setVisible(bool visible)
{
if (m_visible == visible)
return;
@@ -478,12 +478,12 @@ void QQuickPlatformMenu::setVisible(bool visible)
This property holds the minimum width of the menu. The default value is \c -1 (no minimum width).
*/
-int QQuickPlatformMenu::minimumWidth() const
+int QQuickLabsPlatformMenu::minimumWidth() const
{
return m_minimumWidth;
}
-void QQuickPlatformMenu::setMinimumWidth(int width)
+void QQuickLabsPlatformMenu::setMinimumWidth(int width)
{
if (m_minimumWidth == width)
return;
@@ -502,12 +502,12 @@ void QQuickPlatformMenu::setMinimumWidth(int width)
\value Menu.DefaultMenu A normal menu (default).
\value Menu.EditMenu An edit menu with pre-populated cut, copy and paste items.
*/
-QPlatformMenu::MenuType QQuickPlatformMenu::type() const
+QPlatformMenu::MenuType QQuickLabsPlatformMenu::type() const
{
return m_type;
}
-void QQuickPlatformMenu::setType(QPlatformMenu::MenuType type)
+void QQuickLabsPlatformMenu::setType(QPlatformMenu::MenuType type)
{
if (m_type == type)
return;
@@ -522,12 +522,12 @@ void QQuickPlatformMenu::setType(QPlatformMenu::MenuType type)
This property holds the menu's title.
*/
-QString QQuickPlatformMenu::title() const
+QString QQuickLabsPlatformMenu::title() const
{
return m_title;
}
-void QQuickPlatformMenu::setTitle(const QString &title)
+void QQuickLabsPlatformMenu::setTitle(const QString &title)
{
if (m_title == title)
return;
@@ -547,12 +547,12 @@ void QQuickPlatformMenu::setTitle(const QString &title)
\sa title
*/
-QFont QQuickPlatformMenu::font() const
+QFont QQuickLabsPlatformMenu::font() const
{
return m_font;
}
-void QQuickPlatformMenu::setFont(const QFont& font)
+void QQuickLabsPlatformMenu::setFont(const QFont& font)
{
if (m_font == font)
return;
@@ -570,15 +570,15 @@ void QQuickPlatformMenu::setFont(const QFont& font)
This property holds the menu item's icon.
*/
-QQuickPlatformIcon QQuickPlatformMenu::icon() const
+QQuickLabsPlatformIcon QQuickLabsPlatformMenu::icon() const
{
if (!m_iconLoader)
- return QQuickPlatformIcon();
+ return QQuickLabsPlatformIcon();
return iconLoader()->icon();
}
-void QQuickPlatformMenu::setIcon(const QQuickPlatformIcon &icon)
+void QQuickLabsPlatformMenu::setIcon(const QQuickLabsPlatformIcon &icon)
{
if (iconLoader()->icon() == icon)
return;
@@ -595,7 +595,7 @@ void QQuickPlatformMenu::setIcon(const QQuickPlatformIcon &icon)
Adds an \a item to the end of the menu.
*/
-void QQuickPlatformMenu::addItem(QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenu::addItem(QQuickLabsPlatformMenuItem *item)
{
insertItem(m_items.count(), item);
}
@@ -605,7 +605,7 @@ void QQuickPlatformMenu::addItem(QQuickPlatformMenuItem *item)
Inserts an \a item at the specified \a index in the menu.
*/
-void QQuickPlatformMenu::insertItem(int index, QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenu::insertItem(int index, QQuickLabsPlatformMenuItem *item)
{
if (!item || m_items.contains(item))
return;
@@ -614,7 +614,7 @@ void QQuickPlatformMenu::insertItem(int index, QQuickPlatformMenuItem *item)
m_data.append(item);
item->setMenu(this);
if (m_handle && item->create()) {
- QQuickPlatformMenuItem *before = m_items.value(index + 1);
+ QQuickLabsPlatformMenuItem *before = m_items.value(index + 1);
m_handle->insertMenuItem(item->handle(), before ? before->create() : nullptr);
}
sync();
@@ -626,7 +626,7 @@ void QQuickPlatformMenu::insertItem(int index, QQuickPlatformMenuItem *item)
Removes an \a item from the menu.
*/
-void QQuickPlatformMenu::removeItem(QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenu::removeItem(QQuickLabsPlatformMenuItem *item)
{
if (!item || !m_items.removeOne(item))
return;
@@ -644,7 +644,7 @@ void QQuickPlatformMenu::removeItem(QQuickPlatformMenuItem *item)
Adds a \a submenu to the end of the menu.
*/
-void QQuickPlatformMenu::addMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenu::addMenu(QQuickLabsPlatformMenu *menu)
{
insertMenu(m_items.count(), menu);
}
@@ -654,7 +654,7 @@ void QQuickPlatformMenu::addMenu(QQuickPlatformMenu *menu)
Inserts a \a submenu at the specified \a index in the menu.
*/
-void QQuickPlatformMenu::insertMenu(int index, QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenu::insertMenu(int index, QQuickLabsPlatformMenu *menu)
{
if (!menu)
return;
@@ -668,7 +668,7 @@ void QQuickPlatformMenu::insertMenu(int index, QQuickPlatformMenu *menu)
Removes a \a submenu from the menu.
*/
-void QQuickPlatformMenu::removeMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenu::removeMenu(QQuickLabsPlatformMenu *menu)
{
if (!menu)
return;
@@ -682,12 +682,12 @@ void QQuickPlatformMenu::removeMenu(QQuickPlatformMenu *menu)
Removes all items from the menu.
*/
-void QQuickPlatformMenu::clear()
+void QQuickLabsPlatformMenu::clear()
{
if (m_items.isEmpty())
return;
- for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items)) {
m_data.removeOne(item);
if (m_handle)
m_handle->removeMenuItem(item->handle());
@@ -711,7 +711,7 @@ void QQuickPlatformMenu::clear()
Opens the menu at the specified \a target item, optionally aligned to a menu \a item.
*/
-void QQuickPlatformMenu::open(QQmlV4Function *args)
+void QQuickLabsPlatformMenu::open(QQmlV4Function *args)
{
if (!m_handle)
return;
@@ -732,12 +732,12 @@ void QQuickPlatformMenu::open(QQmlV4Function *args)
targetItem = qobject_cast<QQuickItem *>(object->object());
}
- QQuickPlatformMenuItem *menuItem = nullptr;
+ QQuickLabsPlatformMenuItem *menuItem = nullptr;
if (args->length() > 1) {
QV4::ScopedValue value(scope, (*args)[1]);
QV4::Scoped<QV4::QObjectWrapper> object(scope, value->as<QV4::QObjectWrapper>());
if (object)
- menuItem = qobject_cast<QQuickPlatformMenuItem *>(object->object());
+ menuItem = qobject_cast<QQuickLabsPlatformMenuItem *>(object->object());
}
QPoint offset;
@@ -765,17 +765,17 @@ void QQuickPlatformMenu::open(QQmlV4Function *args)
Closes the menu.
*/
-void QQuickPlatformMenu::close()
+void QQuickLabsPlatformMenu::close()
{
if (m_handle)
m_handle->dismiss();
}
-void QQuickPlatformMenu::classBegin()
+void QQuickLabsPlatformMenu::classBegin()
{
}
-void QQuickPlatformMenu::componentComplete()
+void QQuickLabsPlatformMenu::componentComplete()
{
m_complete = true;
if (m_handle && m_iconLoader)
@@ -783,12 +783,12 @@ void QQuickPlatformMenu::componentComplete()
sync();
}
-QQuickPlatformIconLoader *QQuickPlatformMenu::iconLoader() const
+QQuickLabsPlatformIconLoader *QQuickLabsPlatformMenu::iconLoader() const
{
if (!m_iconLoader) {
- QQuickPlatformMenu *that = const_cast<QQuickPlatformMenu *>(this);
+ QQuickLabsPlatformMenu *that = const_cast<QQuickLabsPlatformMenu *>(this);
static int slot = staticMetaObject.indexOfSlot("updateIcon()");
- m_iconLoader = new QQuickPlatformIconLoader(slot, that);
+ m_iconLoader = new QQuickLabsPlatformIconLoader(slot, that);
m_iconLoader->setEnabled(m_complete);
}
return m_iconLoader;
@@ -805,7 +805,7 @@ static QWindow *effectiveWindow(QWindow *window, QPoint *offset)
return window;
}
-QWindow *QQuickPlatformMenu::findWindow(QQuickItem *target, QPoint *offset) const
+QWindow *QQuickLabsPlatformMenu::findWindow(QQuickItem *target, QPoint *offset) const
{
if (target)
return effectiveWindow(target->window(), offset);
@@ -828,60 +828,60 @@ QWindow *QQuickPlatformMenu::findWindow(QQuickItem *target, QPoint *offset) cons
return nullptr;
}
-void QQuickPlatformMenu::data_append(QQmlListProperty<QObject> *property, QObject *object)
+void QQuickLabsPlatformMenu::data_append(QQmlListProperty<QObject> *property, QObject *object)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
- if (QQuickPlatformMenuItem *item = qobject_cast<QQuickPlatformMenuItem *>(object))
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
+ if (QQuickLabsPlatformMenuItem *item = qobject_cast<QQuickLabsPlatformMenuItem *>(object))
menu->addItem(item);
- else if (QQuickPlatformMenu *subMenu = qobject_cast<QQuickPlatformMenu *>(object))
+ else if (QQuickLabsPlatformMenu *subMenu = qobject_cast<QQuickLabsPlatformMenu *>(object))
menu->addMenu(subMenu);
else
menu->m_data.append(object);
}
-qsizetype QQuickPlatformMenu::data_count(QQmlListProperty<QObject> *property)
+qsizetype QQuickLabsPlatformMenu::data_count(QQmlListProperty<QObject> *property)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
return menu->m_data.count();
}
-QObject *QQuickPlatformMenu::data_at(QQmlListProperty<QObject> *property, qsizetype index)
+QObject *QQuickLabsPlatformMenu::data_at(QQmlListProperty<QObject> *property, qsizetype index)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
return menu->m_data.value(index);
}
-void QQuickPlatformMenu::data_clear(QQmlListProperty<QObject> *property)
+void QQuickLabsPlatformMenu::data_clear(QQmlListProperty<QObject> *property)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
menu->m_data.clear();
}
-void QQuickPlatformMenu::items_append(QQmlListProperty<QQuickPlatformMenuItem> *property, QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenu::items_append(QQmlListProperty<QQuickLabsPlatformMenuItem> *property, QQuickLabsPlatformMenuItem *item)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
menu->addItem(item);
}
-qsizetype QQuickPlatformMenu::items_count(QQmlListProperty<QQuickPlatformMenuItem> *property)
+qsizetype QQuickLabsPlatformMenu::items_count(QQmlListProperty<QQuickLabsPlatformMenuItem> *property)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
return menu->m_items.count();
}
-QQuickPlatformMenuItem *QQuickPlatformMenu::items_at(QQmlListProperty<QQuickPlatformMenuItem> *property, qsizetype index)
+QQuickLabsPlatformMenuItem *QQuickLabsPlatformMenu::items_at(QQmlListProperty<QQuickLabsPlatformMenuItem> *property, qsizetype index)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
return menu->m_items.value(index);
}
-void QQuickPlatformMenu::items_clear(QQmlListProperty<QQuickPlatformMenuItem> *property)
+void QQuickLabsPlatformMenu::items_clear(QQmlListProperty<QQuickLabsPlatformMenuItem> *property)
{
- QQuickPlatformMenu *menu = static_cast<QQuickPlatformMenu *>(property->object);
+ QQuickLabsPlatformMenu *menu = static_cast<QQuickLabsPlatformMenu *>(property->object);
menu->clear();
}
-void QQuickPlatformMenu::updateIcon()
+void QQuickLabsPlatformMenu::updateIcon()
{
if (!m_handle || !m_iconLoader)
return;
@@ -892,4 +892,4 @@ void QQuickPlatformMenu::updateIcon()
QT_END_NAMESPACE
-#include "moc_qquickplatformmenu_p.cpp"
+#include "moc_qquicklabsplatformmenu_p.cpp"
diff --git a/src/labs/platform/qquickplatformmenu_p.h b/src/labs/platform/qquicklabsplatformmenu_p.h
index fc66b61b45..cd41dec13e 100644
--- a/src/labs/platform/qquickplatformmenu_p.h
+++ b/src/labs/platform/qquicklabsplatformmenu_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMMENU_P_H
-#define QQUICKPLATFORMMENU_P_H
+#ifndef QQUICKLABSPLATFORMMENU_P_H
+#define QQUICKLABSPLATFORMMENU_P_H
//
// W A R N I N G
@@ -56,7 +56,7 @@
#include <QtQml/qqmllist.h>
#include <QtQml/qqml.h>
-#include "qquickplatformicon_p.h"
+#include "qquicklabsplatformicon_p.h"
QT_BEGIN_NAMESPACE
@@ -65,34 +65,34 @@ class QWindow;
class QQuickItem;
class QPlatformMenu;
class QQmlV4Function;
-class QQuickPlatformMenuBar;
-class QQuickPlatformMenuItem;
-class QQuickPlatformIconLoader;
-class QQuickPlatformSystemTrayIcon;
+class QQuickLabsPlatformMenuBar;
+class QQuickLabsPlatformMenuItem;
+class QQuickLabsPlatformIconLoader;
+class QQuickLabsPlatformSystemTrayIcon;
-class QQuickPlatformMenu : public QObject, public QQmlParserStatus
+class QQuickLabsPlatformMenu : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
Q_PROPERTY(QQmlListProperty<QObject> data READ data FINAL)
- Q_PROPERTY(QQmlListProperty<QQuickPlatformMenuItem> items READ items NOTIFY itemsChanged FINAL)
- Q_PROPERTY(QQuickPlatformMenuBar *menuBar READ menuBar NOTIFY menuBarChanged FINAL)
- Q_PROPERTY(QQuickPlatformMenu *parentMenu READ parentMenu NOTIFY parentMenuChanged FINAL)
- Q_PROPERTY(QQuickPlatformSystemTrayIcon *systemTrayIcon READ systemTrayIcon NOTIFY systemTrayIconChanged FINAL)
- Q_PROPERTY(QQuickPlatformMenuItem *menuItem READ menuItem CONSTANT FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickLabsPlatformMenuItem> items READ items NOTIFY itemsChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenuBar *menuBar READ menuBar NOTIFY menuBarChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenu *parentMenu READ parentMenu NOTIFY parentMenuChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformSystemTrayIcon *systemTrayIcon READ systemTrayIcon NOTIFY systemTrayIconChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenuItem *menuItem READ menuItem CONSTANT FINAL)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged FINAL)
Q_PROPERTY(QPlatformMenu::MenuType type READ type WRITE setType NOTIFY typeChanged FINAL)
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL)
- Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
+ Q_PROPERTY(QQuickLabsPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
Q_ENUMS(QPlatformMenu::MenuType)
Q_CLASSINFO("DefaultProperty", "data")
public:
- explicit QQuickPlatformMenu(QObject *parent = nullptr);
- ~QQuickPlatformMenu();
+ explicit QQuickLabsPlatformMenu(QObject *parent = nullptr);
+ ~QQuickLabsPlatformMenu();
QPlatformMenu *handle() const;
QPlatformMenu *create();
@@ -100,18 +100,18 @@ public:
void sync();
QQmlListProperty<QObject> data();
- QQmlListProperty<QQuickPlatformMenuItem> items();
+ QQmlListProperty<QQuickLabsPlatformMenuItem> items();
- QQuickPlatformMenuBar *menuBar() const;
- void setMenuBar(QQuickPlatformMenuBar *menuBar);
+ QQuickLabsPlatformMenuBar *menuBar() const;
+ void setMenuBar(QQuickLabsPlatformMenuBar *menuBar);
- QQuickPlatformMenu *parentMenu() const;
- void setParentMenu(QQuickPlatformMenu *menu);
+ QQuickLabsPlatformMenu *parentMenu() const;
+ void setParentMenu(QQuickLabsPlatformMenu *menu);
- QQuickPlatformSystemTrayIcon *systemTrayIcon() const;
- void setSystemTrayIcon(QQuickPlatformSystemTrayIcon *icon);
+ QQuickLabsPlatformSystemTrayIcon *systemTrayIcon() const;
+ void setSystemTrayIcon(QQuickLabsPlatformSystemTrayIcon *icon);
- QQuickPlatformMenuItem *menuItem() const;
+ QQuickLabsPlatformMenuItem *menuItem() const;
bool isEnabled() const;
void setEnabled(bool enabled);
@@ -131,16 +131,16 @@ public:
QFont font() const;
void setFont(const QFont &font);
- QQuickPlatformIcon icon() const;
- void setIcon(const QQuickPlatformIcon &icon);
+ QQuickLabsPlatformIcon icon() const;
+ void setIcon(const QQuickLabsPlatformIcon &icon);
- Q_INVOKABLE void addItem(QQuickPlatformMenuItem *item);
- Q_INVOKABLE void insertItem(int index, QQuickPlatformMenuItem *item);
- Q_INVOKABLE void removeItem(QQuickPlatformMenuItem *item);
+ Q_INVOKABLE void addItem(QQuickLabsPlatformMenuItem *item);
+ Q_INVOKABLE void insertItem(int index, QQuickLabsPlatformMenuItem *item);
+ Q_INVOKABLE void removeItem(QQuickLabsPlatformMenuItem *item);
- Q_INVOKABLE void addMenu(QQuickPlatformMenu *menu);
- Q_INVOKABLE void insertMenu(int index, QQuickPlatformMenu *menu);
- Q_INVOKABLE void removeMenu(QQuickPlatformMenu *menu);
+ Q_INVOKABLE void addMenu(QQuickLabsPlatformMenu *menu);
+ Q_INVOKABLE void insertMenu(int index, QQuickLabsPlatformMenu *menu);
+ Q_INVOKABLE void removeMenu(QQuickLabsPlatformMenu *menu);
Q_INVOKABLE void clear();
@@ -168,7 +168,7 @@ protected:
void classBegin() override;
void componentComplete() override;
- QQuickPlatformIconLoader *iconLoader() const;
+ QQuickLabsPlatformIconLoader *iconLoader() const;
QWindow *findWindow(QQuickItem *target, QPoint *offset) const;
@@ -177,10 +177,10 @@ protected:
static QObject *data_at(QQmlListProperty<QObject> *property, qsizetype index);
static void data_clear(QQmlListProperty<QObject> *property);
- static void items_append(QQmlListProperty<QQuickPlatformMenuItem> *property, QQuickPlatformMenuItem *item);
- static qsizetype items_count(QQmlListProperty<QQuickPlatformMenuItem> *property);
- static QQuickPlatformMenuItem *items_at(QQmlListProperty<QQuickPlatformMenuItem> *property, qsizetype index);
- static void items_clear(QQmlListProperty<QQuickPlatformMenuItem> *property);
+ static void items_append(QQmlListProperty<QQuickLabsPlatformMenuItem> *property, QQuickLabsPlatformMenuItem *item);
+ static qsizetype items_count(QQmlListProperty<QQuickLabsPlatformMenuItem> *property);
+ static QQuickLabsPlatformMenuItem *items_at(QQmlListProperty<QQuickLabsPlatformMenuItem> *property, qsizetype index);
+ static void items_clear(QQmlListProperty<QQuickLabsPlatformMenuItem> *property);
private Q_SLOTS:
void updateIcon();
@@ -196,18 +196,18 @@ private:
QString m_title;
QFont m_font;
QList<QObject *> m_data;
- QList<QQuickPlatformMenuItem *> m_items;
- QQuickPlatformMenuBar *m_menuBar;
- QQuickPlatformMenu *m_parentMenu;
- QQuickPlatformSystemTrayIcon *m_systemTrayIcon;
- mutable QQuickPlatformMenuItem *m_menuItem;
- mutable QQuickPlatformIconLoader *m_iconLoader;
+ QList<QQuickLabsPlatformMenuItem *> m_items;
+ QQuickLabsPlatformMenuBar *m_menuBar;
+ QQuickLabsPlatformMenu *m_parentMenu;
+ QQuickLabsPlatformSystemTrayIcon *m_systemTrayIcon;
+ mutable QQuickLabsPlatformMenuItem *m_menuItem;
+ mutable QQuickLabsPlatformIconLoader *m_iconLoader;
QPlatformMenu *m_handle;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformMenu)
+QML_DECLARE_TYPE(QQuickLabsPlatformMenu)
Q_DECLARE_METATYPE(QPlatformMenu::MenuType)
-#endif // QQUICKPLATFORMMENU_P_H
+#endif // QQUICKLABSPLATFORMMENU_P_H
diff --git a/src/labs/platform/qquickplatformmenubar.cpp b/src/labs/platform/qquicklabsplatformmenubar.cpp
index c232cec622..3c425b1164 100644
--- a/src/labs/platform/qquickplatformmenubar.cpp
+++ b/src/labs/platform/qquicklabsplatformmenubar.cpp
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#include "qquickplatformmenubar_p.h"
-#include "qquickplatformmenu_p.h"
+#include "qquicklabsplatformmenubar_p.h"
+#include "qquicklabsplatformmenu_p.h"
#include <QtCore/qloggingcategory.h>
#include <QtGui/qpa/qplatformmenu.h>
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MenuBar
\inherits QtObject
-//! \instantiates QQuickPlatformMenuBar
+//! \instantiates QQuickLabsPlatformMenuBar
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native menubar.
@@ -105,7 +105,7 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(qtLabsPlatformMenus)
-QQuickPlatformMenuBar::QQuickPlatformMenuBar(QObject *parent)
+QQuickLabsPlatformMenuBar::QQuickLabsPlatformMenuBar(QObject *parent)
: QObject(parent),
m_complete(false),
m_window(nullptr),
@@ -115,15 +115,15 @@ QQuickPlatformMenuBar::QQuickPlatformMenuBar(QObject *parent)
qCDebug(qtLabsPlatformMenus) << "MenuBar ->" << m_handle;
}
-QQuickPlatformMenuBar::~QQuickPlatformMenuBar()
+QQuickLabsPlatformMenuBar::~QQuickLabsPlatformMenuBar()
{
- for (QQuickPlatformMenu *menu : qAsConst(m_menus))
+ for (QQuickLabsPlatformMenu *menu : qAsConst(m_menus))
menu->setMenuBar(nullptr);
delete m_handle;
m_handle = nullptr;
}
-QPlatformMenuBar *QQuickPlatformMenuBar::handle() const
+QPlatformMenuBar *QQuickLabsPlatformMenuBar::handle() const
{
return m_handle;
}
@@ -138,7 +138,7 @@ QPlatformMenuBar *QQuickPlatformMenuBar::handle() const
\sa menus
*/
-QQmlListProperty<QObject> QQuickPlatformMenuBar::data()
+QQmlListProperty<QObject> QQuickLabsPlatformMenuBar::data()
{
return QQmlListProperty<QObject>(this, nullptr, data_append, data_count, data_at, data_clear);
}
@@ -148,9 +148,9 @@ QQmlListProperty<QObject> QQuickPlatformMenuBar::data()
This property holds the list of menus in the menubar.
*/
-QQmlListProperty<QQuickPlatformMenu> QQuickPlatformMenuBar::menus()
+QQmlListProperty<QQuickLabsPlatformMenu> QQuickLabsPlatformMenuBar::menus()
{
- return QQmlListProperty<QQuickPlatformMenu>(this, nullptr, menus_append, menus_count, menus_at, menus_clear);
+ return QQmlListProperty<QQuickLabsPlatformMenu>(this, nullptr, menus_append, menus_count, menus_at, menus_clear);
}
/*!
@@ -162,12 +162,12 @@ QQmlListProperty<QQuickPlatformMenu> QQuickPlatformMenuBar::menus()
the QML parent objects until a \l Window or an \l Item that has a window
is found.
*/
-QWindow *QQuickPlatformMenuBar::window() const
+QWindow *QQuickLabsPlatformMenuBar::window() const
{
return m_window;
}
-void QQuickPlatformMenuBar::setWindow(QWindow *window)
+void QQuickLabsPlatformMenuBar::setWindow(QWindow *window)
{
if (m_window == window)
return;
@@ -184,7 +184,7 @@ void QQuickPlatformMenuBar::setWindow(QWindow *window)
Adds a \a menu to end of the menubar.
*/
-void QQuickPlatformMenuBar::addMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenuBar::addMenu(QQuickLabsPlatformMenu *menu)
{
insertMenu(m_menus.count(), menu);
}
@@ -194,12 +194,12 @@ void QQuickPlatformMenuBar::addMenu(QQuickPlatformMenu *menu)
Inserts a \a menu at the specified \a index in the menubar.
*/
-void QQuickPlatformMenuBar::insertMenu(int index, QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenuBar::insertMenu(int index, QQuickLabsPlatformMenu *menu)
{
if (!menu || m_menus.contains(menu))
return;
- QQuickPlatformMenu *before = m_menus.value(index);
+ QQuickLabsPlatformMenu *before = m_menus.value(index);
m_menus.insert(index, menu);
m_data.append(menu);
menu->setMenuBar(this);
@@ -214,7 +214,7 @@ void QQuickPlatformMenuBar::insertMenu(int index, QQuickPlatformMenu *menu)
Removes a \a menu from the menubar.
*/
-void QQuickPlatformMenuBar::removeMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenuBar::removeMenu(QQuickLabsPlatformMenu *menu)
{
if (!menu || !m_menus.removeOne(menu))
return;
@@ -231,12 +231,12 @@ void QQuickPlatformMenuBar::removeMenu(QQuickPlatformMenu *menu)
Removes all menus from the menubar.
*/
-void QQuickPlatformMenuBar::clear()
+void QQuickLabsPlatformMenuBar::clear()
{
if (m_menus.isEmpty())
return;
- for (QQuickPlatformMenu *menu : qAsConst(m_menus)) {
+ for (QQuickLabsPlatformMenu *menu : qAsConst(m_menus)) {
m_data.removeOne(menu);
if (m_handle)
m_handle->removeMenu(menu->handle());
@@ -248,20 +248,20 @@ void QQuickPlatformMenuBar::clear()
emit menusChanged();
}
-void QQuickPlatformMenuBar::classBegin()
+void QQuickLabsPlatformMenuBar::classBegin()
{
}
-void QQuickPlatformMenuBar::componentComplete()
+void QQuickLabsPlatformMenuBar::componentComplete()
{
m_complete = true;
- for (QQuickPlatformMenu *menu : qAsConst(m_menus))
+ for (QQuickLabsPlatformMenu *menu : qAsConst(m_menus))
menu->sync();
if (!m_window)
setWindow(findWindow());
}
-QWindow *QQuickPlatformMenuBar::findWindow() const
+QWindow *QQuickLabsPlatformMenuBar::findWindow() const
{
QObject *obj = parent();
while (obj) {
@@ -276,58 +276,58 @@ QWindow *QQuickPlatformMenuBar::findWindow() const
return nullptr;
}
-void QQuickPlatformMenuBar::data_append(QQmlListProperty<QObject> *property, QObject *object)
+void QQuickLabsPlatformMenuBar::data_append(QQmlListProperty<QObject> *property, QObject *object)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
- QQuickPlatformMenu *menu = qobject_cast<QQuickPlatformMenu *>(object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenu *menu = qobject_cast<QQuickLabsPlatformMenu *>(object);
if (menu)
menuBar->addMenu(menu);
else
menuBar->m_data.append(object);
}
-qsizetype QQuickPlatformMenuBar::data_count(QQmlListProperty<QObject> *property)
+qsizetype QQuickLabsPlatformMenuBar::data_count(QQmlListProperty<QObject> *property)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
return menuBar->m_data.count();
}
-QObject *QQuickPlatformMenuBar::data_at(QQmlListProperty<QObject> *property, qsizetype index)
+QObject *QQuickLabsPlatformMenuBar::data_at(QQmlListProperty<QObject> *property, qsizetype index)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
return menuBar->m_data.value(index);
}
-void QQuickPlatformMenuBar::data_clear(QQmlListProperty<QObject> *property)
+void QQuickLabsPlatformMenuBar::data_clear(QQmlListProperty<QObject> *property)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
menuBar->m_data.clear();
}
-void QQuickPlatformMenuBar::menus_append(QQmlListProperty<QQuickPlatformMenu> *property, QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenuBar::menus_append(QQmlListProperty<QQuickLabsPlatformMenu> *property, QQuickLabsPlatformMenu *menu)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
menuBar->addMenu(menu);
}
-qsizetype QQuickPlatformMenuBar::menus_count(QQmlListProperty<QQuickPlatformMenu> *property)
+qsizetype QQuickLabsPlatformMenuBar::menus_count(QQmlListProperty<QQuickLabsPlatformMenu> *property)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
return menuBar->m_menus.count();
}
-QQuickPlatformMenu *QQuickPlatformMenuBar::menus_at(QQmlListProperty<QQuickPlatformMenu> *property, qsizetype index)
+QQuickLabsPlatformMenu *QQuickLabsPlatformMenuBar::menus_at(QQmlListProperty<QQuickLabsPlatformMenu> *property, qsizetype index)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
return menuBar->m_menus.value(index);
}
-void QQuickPlatformMenuBar::menus_clear(QQmlListProperty<QQuickPlatformMenu> *property)
+void QQuickLabsPlatformMenuBar::menus_clear(QQmlListProperty<QQuickLabsPlatformMenu> *property)
{
- QQuickPlatformMenuBar *menuBar = static_cast<QQuickPlatformMenuBar *>(property->object);
+ QQuickLabsPlatformMenuBar *menuBar = static_cast<QQuickLabsPlatformMenuBar *>(property->object);
menuBar->clear();
}
QT_END_NAMESPACE
-#include "moc_qquickplatformmenubar_p.cpp"
+#include "moc_qquicklabsplatformmenubar_p.cpp"
diff --git a/src/labs/platform/qquickplatformmenubar_p.h b/src/labs/platform/qquicklabsplatformmenubar_p.h
index e644c86c8d..25583bee52 100644
--- a/src/labs/platform/qquickplatformmenubar_p.h
+++ b/src/labs/platform/qquicklabsplatformmenubar_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMMENUBAR_P_H
-#define QQUICKPLATFORMMENUBAR_P_H
+#ifndef QQUICKLABSPLATFORMMENUBAR_P_H
+#define QQUICKLABSPLATFORMMENUBAR_P_H
//
// W A R N I N G
@@ -57,32 +57,32 @@ QT_BEGIN_NAMESPACE
class QWindow;
class QPlatformMenuBar;
-class QQuickPlatformMenu;
+class QQuickLabsPlatformMenu;
-class QQuickPlatformMenuBar : public QObject, public QQmlParserStatus
+class QQuickLabsPlatformMenuBar : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
Q_PROPERTY(QQmlListProperty<QObject> data READ data FINAL)
- Q_PROPERTY(QQmlListProperty<QQuickPlatformMenu> menus READ menus NOTIFY menusChanged FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickLabsPlatformMenu> menus READ menus NOTIFY menusChanged FINAL)
Q_PROPERTY(QWindow *window READ window WRITE setWindow NOTIFY windowChanged FINAL)
Q_CLASSINFO("DefaultProperty", "data")
public:
- explicit QQuickPlatformMenuBar(QObject *parent = nullptr);
- ~QQuickPlatformMenuBar();
+ explicit QQuickLabsPlatformMenuBar(QObject *parent = nullptr);
+ ~QQuickLabsPlatformMenuBar();
QPlatformMenuBar *handle() const;
QQmlListProperty<QObject> data();
- QQmlListProperty<QQuickPlatformMenu> menus();
+ QQmlListProperty<QQuickLabsPlatformMenu> menus();
QWindow *window() const;
void setWindow(QWindow *window);
- Q_INVOKABLE void addMenu(QQuickPlatformMenu *menu);
- Q_INVOKABLE void insertMenu(int index, QQuickPlatformMenu *menu);
- Q_INVOKABLE void removeMenu(QQuickPlatformMenu *menu);
+ Q_INVOKABLE void addMenu(QQuickLabsPlatformMenu *menu);
+ Q_INVOKABLE void insertMenu(int index, QQuickLabsPlatformMenu *menu);
+ Q_INVOKABLE void removeMenu(QQuickLabsPlatformMenu *menu);
Q_INVOKABLE void clear();
Q_SIGNALS:
@@ -100,21 +100,21 @@ protected:
static QObject *data_at(QQmlListProperty<QObject> *property, qsizetype index);
static void data_clear(QQmlListProperty<QObject> *property);
- static void menus_append(QQmlListProperty<QQuickPlatformMenu> *property, QQuickPlatformMenu *menu);
- static qsizetype menus_count(QQmlListProperty<QQuickPlatformMenu> *property);
- static QQuickPlatformMenu *menus_at(QQmlListProperty<QQuickPlatformMenu> *property, qsizetype index);
- static void menus_clear(QQmlListProperty<QQuickPlatformMenu> *property);
+ static void menus_append(QQmlListProperty<QQuickLabsPlatformMenu> *property, QQuickLabsPlatformMenu *menu);
+ static qsizetype menus_count(QQmlListProperty<QQuickLabsPlatformMenu> *property);
+ static QQuickLabsPlatformMenu *menus_at(QQmlListProperty<QQuickLabsPlatformMenu> *property, qsizetype index);
+ static void menus_clear(QQmlListProperty<QQuickLabsPlatformMenu> *property);
private:
bool m_complete;
QWindow *m_window;
QList<QObject *> m_data;
- QList<QQuickPlatformMenu *> m_menus;
+ QList<QQuickLabsPlatformMenu *> m_menus;
QPlatformMenuBar *m_handle;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformMenuBar)
+QML_DECLARE_TYPE(QQuickLabsPlatformMenuBar)
-#endif // QQUICKPLATFORMMENUBAR_P_H
+#endif // QQUICKLABSPLATFORMMENUBAR_P_H
diff --git a/src/labs/platform/qquickplatformmenuitem.cpp b/src/labs/platform/qquicklabsplatformmenuitem.cpp
index 4f61d4237f..52a58f8005 100644
--- a/src/labs/platform/qquickplatformmenuitem.cpp
+++ b/src/labs/platform/qquicklabsplatformmenuitem.cpp
@@ -34,10 +34,10 @@
**
****************************************************************************/
-#include "qquickplatformmenuitem_p.h"
-#include "qquickplatformmenu_p.h"
-#include "qquickplatformmenuitemgroup_p.h"
-#include "qquickplatformiconloader_p.h"
+#include "qquicklabsplatformmenuitem_p.h"
+#include "qquicklabsplatformmenu_p.h"
+#include "qquicklabsplatformmenuitemgroup_p.h"
+#include "qquicklabsplatformiconloader_p.h"
#include <QtGui/qicon.h>
#if QT_CONFIG(shortcut)
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MenuItem
\inherits QtObject
-//! \instantiates QQuickPlatformMenuItem
+//! \instantiates QQuickLabsPlatformMenuItem
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native menu item.
@@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE
This signal is emitted when the menu item is hovered by the user.
*/
-QQuickPlatformMenuItem::QQuickPlatformMenuItem(QObject *parent)
+QQuickLabsPlatformMenuItem::QQuickLabsPlatformMenuItem(QObject *parent)
: QObject(parent),
m_complete(false),
m_enabled(true),
@@ -117,7 +117,7 @@ QQuickPlatformMenuItem::QQuickPlatformMenuItem(QObject *parent)
{
}
-QQuickPlatformMenuItem::~QQuickPlatformMenuItem()
+QQuickLabsPlatformMenuItem::~QQuickLabsPlatformMenuItem()
{
if (m_menu)
m_menu->removeItem(this);
@@ -139,12 +139,12 @@ QQuickPlatformMenuItem::~QQuickPlatformMenuItem()
m_handle = nullptr;
}
-QPlatformMenuItem *QQuickPlatformMenuItem::handle() const
+QPlatformMenuItem *QQuickLabsPlatformMenuItem::handle() const
{
return m_handle;
}
-QPlatformMenuItem *QQuickPlatformMenuItem::create()
+QPlatformMenuItem *QQuickLabsPlatformMenuItem::create()
{
if (!m_handle && m_menu && m_menu->handle()) {
m_handle = m_menu->handle()->createMenuItem();
@@ -157,14 +157,14 @@ QPlatformMenuItem *QQuickPlatformMenuItem::create()
m_handle = QWidgetPlatform::createMenuItem();
if (m_handle) {
- connect(m_handle, &QPlatformMenuItem::activated, this, &QQuickPlatformMenuItem::activate);
- connect(m_handle, &QPlatformMenuItem::hovered, this, &QQuickPlatformMenuItem::hovered);
+ connect(m_handle, &QPlatformMenuItem::activated, this, &QQuickLabsPlatformMenuItem::activate);
+ connect(m_handle, &QPlatformMenuItem::hovered, this, &QQuickLabsPlatformMenuItem::hovered);
}
}
return m_handle;
}
-void QQuickPlatformMenuItem::sync()
+void QQuickLabsPlatformMenuItem::sync()
{
if (!m_complete || !create())
return;
@@ -206,12 +206,12 @@ void QQuickPlatformMenuItem::sync()
This property holds the menu that the item belongs to, or \c null if the
item is not in a menu.
*/
-QQuickPlatformMenu *QQuickPlatformMenuItem::menu() const
+QQuickLabsPlatformMenu *QQuickLabsPlatformMenuItem::menu() const
{
return m_menu;
}
-void QQuickPlatformMenuItem::setMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenuItem::setMenu(QQuickLabsPlatformMenu *menu)
{
if (m_menu == menu)
return;
@@ -227,12 +227,12 @@ void QQuickPlatformMenuItem::setMenu(QQuickPlatformMenu *menu)
This property holds the sub-menu that the item contains, or \c null if
the item is not a sub-menu item.
*/
-QQuickPlatformMenu *QQuickPlatformMenuItem::subMenu() const
+QQuickLabsPlatformMenu *QQuickLabsPlatformMenuItem::subMenu() const
{
return m_subMenu;
}
-void QQuickPlatformMenuItem::setSubMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformMenuItem::setSubMenu(QQuickLabsPlatformMenu *menu)
{
if (m_subMenu == menu)
return;
@@ -248,12 +248,12 @@ void QQuickPlatformMenuItem::setSubMenu(QQuickPlatformMenu *menu)
This property holds the group that the item belongs to, or \c null if the
item is not in a group.
*/
-QQuickPlatformMenuItemGroup *QQuickPlatformMenuItem::group() const
+QQuickLabsPlatformMenuItemGroup *QQuickLabsPlatformMenuItem::group() const
{
return m_group;
}
-void QQuickPlatformMenuItem::setGroup(QQuickPlatformMenuItemGroup *group)
+void QQuickLabsPlatformMenuItem::setGroup(QQuickLabsPlatformMenuItemGroup *group)
{
if (m_group == group)
return;
@@ -285,12 +285,12 @@ void QQuickPlatformMenuItem::setGroup(QQuickPlatformMenuItemGroup *group)
When an item is disabled, it is not possible to trigger it through its \l shortcut.
*/
-bool QQuickPlatformMenuItem::isEnabled() const
+bool QQuickLabsPlatformMenuItem::isEnabled() const
{
return m_enabled && (!m_group || m_group->isEnabled());
}
-void QQuickPlatformMenuItem::setEnabled(bool enabled)
+void QQuickLabsPlatformMenuItem::setEnabled(bool enabled)
{
if (m_enabled == enabled)
return;
@@ -307,12 +307,12 @@ void QQuickPlatformMenuItem::setEnabled(bool enabled)
This property holds whether the item is visible. The default value is \c true.
*/
-bool QQuickPlatformMenuItem::isVisible() const
+bool QQuickLabsPlatformMenuItem::isVisible() const
{
return m_visible && (!m_group || m_group->isVisible());
}
-void QQuickPlatformMenuItem::setVisible(bool visible)
+void QQuickLabsPlatformMenuItem::setVisible(bool visible)
{
if (m_visible == visible)
return;
@@ -332,12 +332,12 @@ void QQuickPlatformMenuItem::setVisible(bool visible)
\sa MenuSeparator
*/
-bool QQuickPlatformMenuItem::isSeparator() const
+bool QQuickLabsPlatformMenuItem::isSeparator() const
{
return m_separator;
}
-void QQuickPlatformMenuItem::setSeparator(bool separator)
+void QQuickLabsPlatformMenuItem::setSeparator(bool separator)
{
if (m_separator == separator)
return;
@@ -360,12 +360,12 @@ void QQuickPlatformMenuItem::setSeparator(bool separator)
\sa checked, MenuItemGroup
*/
-bool QQuickPlatformMenuItem::isCheckable() const
+bool QQuickLabsPlatformMenuItem::isCheckable() const
{
return m_checkable;
}
-void QQuickPlatformMenuItem::setCheckable(bool checkable)
+void QQuickLabsPlatformMenuItem::setCheckable(bool checkable)
{
if (m_checkable == checkable)
return;
@@ -383,12 +383,12 @@ void QQuickPlatformMenuItem::setCheckable(bool checkable)
\sa checkable, MenuItemGroup
*/
-bool QQuickPlatformMenuItem::isChecked() const
+bool QQuickLabsPlatformMenuItem::isChecked() const
{
return m_checked;
}
-void QQuickPlatformMenuItem::setChecked(bool checked)
+void QQuickLabsPlatformMenuItem::setChecked(bool checked)
{
if (m_checked == checked)
return;
@@ -424,12 +424,12 @@ void QQuickPlatformMenuItem::setChecked(bool checked)
specifying a role for the items in that submenu has no effect. They will
never be moved to the application menu.
*/
-QPlatformMenuItem::MenuRole QQuickPlatformMenuItem::role() const
+QPlatformMenuItem::MenuRole QQuickLabsPlatformMenuItem::role() const
{
return m_role;
}
-void QQuickPlatformMenuItem::setRole(QPlatformMenuItem::MenuRole role)
+void QQuickLabsPlatformMenuItem::setRole(QPlatformMenuItem::MenuRole role)
{
if (m_role == role)
return;
@@ -444,12 +444,12 @@ void QQuickPlatformMenuItem::setRole(QPlatformMenuItem::MenuRole role)
This property holds the menu item's text.
*/
-QString QQuickPlatformMenuItem::text() const
+QString QQuickLabsPlatformMenuItem::text() const
{
return m_text;
}
-void QQuickPlatformMenuItem::setText(const QString &text)
+void QQuickLabsPlatformMenuItem::setText(const QString &text)
{
if (m_text == text)
return;
@@ -478,12 +478,12 @@ void QQuickPlatformMenuItem::setText(const QString &text)
}
\endcode
*/
-QVariant QQuickPlatformMenuItem::shortcut() const
+QVariant QQuickLabsPlatformMenuItem::shortcut() const
{
return m_shortcut;
}
-bool QQuickPlatformMenuItem::event(QEvent *e)
+bool QQuickLabsPlatformMenuItem::event(QEvent *e)
{
#if QT_CONFIG(shortcut)
if (e->type() == QEvent::Shortcut) {
@@ -497,7 +497,7 @@ bool QQuickPlatformMenuItem::event(QEvent *e)
return QObject::event(e);
}
-void QQuickPlatformMenuItem::setShortcut(const QVariant& shortcut)
+void QQuickLabsPlatformMenuItem::setShortcut(const QVariant& shortcut)
{
if (m_shortcut == shortcut)
return;
@@ -537,12 +537,12 @@ void QQuickPlatformMenuItem::setShortcut(const QVariant& shortcut)
\sa text
*/
-QFont QQuickPlatformMenuItem::font() const
+QFont QQuickLabsPlatformMenuItem::font() const
{
return m_font;
}
-void QQuickPlatformMenuItem::setFont(const QFont& font)
+void QQuickLabsPlatformMenuItem::setFont(const QFont& font)
{
if (m_font == font)
return;
@@ -570,15 +570,15 @@ void QQuickPlatformMenuItem::setFont(const QFont& font)
\sa QIcon::fromTheme()
*/
-QQuickPlatformIcon QQuickPlatformMenuItem::icon() const
+QQuickLabsPlatformIcon QQuickLabsPlatformMenuItem::icon() const
{
if (!m_iconLoader)
- return QQuickPlatformIcon();
+ return QQuickLabsPlatformIcon();
return m_iconLoader->icon();
}
-void QQuickPlatformMenuItem::setIcon(const QQuickPlatformIcon &icon)
+void QQuickLabsPlatformMenuItem::setIcon(const QQuickLabsPlatformIcon &icon)
{
if (iconLoader()->icon() == icon)
return;
@@ -592,17 +592,17 @@ void QQuickPlatformMenuItem::setIcon(const QQuickPlatformIcon &icon)
Toggles the \l checked state to its opposite state.
*/
-void QQuickPlatformMenuItem::toggle()
+void QQuickLabsPlatformMenuItem::toggle()
{
if (m_checkable)
setChecked(!m_checked);
}
-void QQuickPlatformMenuItem::classBegin()
+void QQuickLabsPlatformMenuItem::classBegin()
{
}
-void QQuickPlatformMenuItem::componentComplete()
+void QQuickLabsPlatformMenuItem::componentComplete()
{
if (m_handle && m_iconLoader)
m_iconLoader->setEnabled(true);
@@ -610,24 +610,24 @@ void QQuickPlatformMenuItem::componentComplete()
sync();
}
-QQuickPlatformIconLoader *QQuickPlatformMenuItem::iconLoader() const
+QQuickLabsPlatformIconLoader *QQuickLabsPlatformMenuItem::iconLoader() const
{
if (!m_iconLoader) {
- QQuickPlatformMenuItem *that = const_cast<QQuickPlatformMenuItem *>(this);
+ QQuickLabsPlatformMenuItem *that = const_cast<QQuickLabsPlatformMenuItem *>(this);
static int slot = staticMetaObject.indexOfSlot("updateIcon()");
- m_iconLoader = new QQuickPlatformIconLoader(slot, that);
+ m_iconLoader = new QQuickLabsPlatformIconLoader(slot, that);
m_iconLoader->setEnabled(m_complete);
}
return m_iconLoader;
}
-void QQuickPlatformMenuItem::activate()
+void QQuickLabsPlatformMenuItem::activate()
{
toggle();
emit triggered();
}
-void QQuickPlatformMenuItem::updateIcon()
+void QQuickLabsPlatformMenuItem::updateIcon()
{
if (!m_handle || !m_iconLoader)
return;
@@ -638,4 +638,4 @@ void QQuickPlatformMenuItem::updateIcon()
QT_END_NAMESPACE
-#include "moc_qquickplatformmenuitem_p.cpp"
+#include "moc_qquicklabsplatformmenuitem_p.cpp"
diff --git a/src/labs/platform/qquickplatformmenuitem_p.h b/src/labs/platform/qquicklabsplatformmenuitem_p.h
index 01b7482d8f..6da6b81845 100644
--- a/src/labs/platform/qquickplatformmenuitem_p.h
+++ b/src/labs/platform/qquicklabsplatformmenuitem_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMMENUITEM_P_H
-#define QQUICKPLATFORMMENUITEM_P_H
+#ifndef QQUICKLABSPLATFORMMENUITEM_P_H
+#define QQUICKLABSPLATFORMMENUITEM_P_H
//
// W A R N I N G
@@ -55,22 +55,22 @@
#include <QtQml/qqmlparserstatus.h>
#include <QtQml/qqml.h>
-#include "qquickplatformicon_p.h"
+#include "qquicklabsplatformicon_p.h"
QT_BEGIN_NAMESPACE
class QPlatformMenuItem;
-class QQuickPlatformMenu;
-class QQuickPlatformIconLoader;
-class QQuickPlatformMenuItemGroup;
+class QQuickLabsPlatformMenu;
+class QQuickLabsPlatformIconLoader;
+class QQuickLabsPlatformMenuItemGroup;
-class QQuickPlatformMenuItem : public QObject, public QQmlParserStatus
+class QQuickLabsPlatformMenuItem : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
- Q_PROPERTY(QQuickPlatformMenu *menu READ menu NOTIFY menuChanged FINAL)
- Q_PROPERTY(QQuickPlatformMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL)
- Q_PROPERTY(QQuickPlatformMenuItemGroup *group READ group WRITE setGroup NOTIFY groupChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenu *menu READ menu NOTIFY menuChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenuItemGroup *group READ group WRITE setGroup NOTIFY groupChanged FINAL)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(bool separator READ isSeparator WRITE setSeparator NOTIFY separatorChanged FINAL)
@@ -80,25 +80,25 @@ class QQuickPlatformMenuItem : public QObject, public QQmlParserStatus
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
Q_PROPERTY(QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL)
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL)
- Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
+ Q_PROPERTY(QQuickLabsPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
Q_ENUMS(QPlatformMenuItem::MenuRole)
public:
- explicit QQuickPlatformMenuItem(QObject *parent = nullptr);
- ~QQuickPlatformMenuItem();
+ explicit QQuickLabsPlatformMenuItem(QObject *parent = nullptr);
+ ~QQuickLabsPlatformMenuItem();
QPlatformMenuItem *handle() const;
QPlatformMenuItem *create();
void sync();
- QQuickPlatformMenu *menu() const;
- void setMenu(QQuickPlatformMenu* menu);
+ QQuickLabsPlatformMenu *menu() const;
+ void setMenu(QQuickLabsPlatformMenu* menu);
- QQuickPlatformMenu *subMenu() const;
- void setSubMenu(QQuickPlatformMenu *menu);
+ QQuickLabsPlatformMenu *subMenu() const;
+ void setSubMenu(QQuickLabsPlatformMenu *menu);
- QQuickPlatformMenuItemGroup *group() const;
- void setGroup(QQuickPlatformMenuItemGroup *group);
+ QQuickLabsPlatformMenuItemGroup *group() const;
+ void setGroup(QQuickLabsPlatformMenuItemGroup *group);
bool isEnabled() const;
void setEnabled(bool enabled);
@@ -127,8 +127,8 @@ public:
QFont font() const;
void setFont(const QFont &font);
- QQuickPlatformIcon icon() const;
- void setIcon(const QQuickPlatformIcon &icon);
+ QQuickLabsPlatformIcon icon() const;
+ void setIcon(const QQuickLabsPlatformIcon &icon);
public Q_SLOTS:
void toggle();
@@ -155,7 +155,7 @@ protected:
void classBegin() override;
void componentComplete() override;
- QQuickPlatformIconLoader *iconLoader() const;
+ QQuickLabsPlatformIconLoader *iconLoader() const;
bool event(QEvent *e) override;
private Q_SLOTS:
@@ -173,19 +173,19 @@ private:
QString m_text;
QVariant m_shortcut;
QFont m_font;
- QQuickPlatformMenu *m_menu;
- QQuickPlatformMenu *m_subMenu;
- QQuickPlatformMenuItemGroup *m_group;
- mutable QQuickPlatformIconLoader *m_iconLoader;
+ QQuickLabsPlatformMenu *m_menu;
+ QQuickLabsPlatformMenu *m_subMenu;
+ QQuickLabsPlatformMenuItemGroup *m_group;
+ mutable QQuickLabsPlatformIconLoader *m_iconLoader;
QPlatformMenuItem *m_handle;
int m_shortcutId = -1;
- friend class QQuickPlatformMenu;
- friend class QQuickPlatformMenuItemGroup;
+ friend class QQuickLabsPlatformMenu;
+ friend class QQuickLabsPlatformMenuItemGroup;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformMenuItem)
+QML_DECLARE_TYPE(QQuickLabsPlatformMenuItem)
-#endif // QQUICKPLATFORMMENUITEM_P_H
+#endif // QQUICKLABSPLATFORMMENUITEM_P_H
diff --git a/src/labs/platform/qquickplatformmenuitemgroup.cpp b/src/labs/platform/qquicklabsplatformmenuitemgroup.cpp
index fcfcc664bc..bb2d116e23 100644
--- a/src/labs/platform/qquickplatformmenuitemgroup.cpp
+++ b/src/labs/platform/qquicklabsplatformmenuitemgroup.cpp
@@ -34,15 +34,15 @@
**
****************************************************************************/
-#include "qquickplatformmenuitemgroup_p.h"
-#include "qquickplatformmenuitem_p.h"
+#include "qquicklabsplatformmenuitemgroup_p.h"
+#include "qquicklabsplatformmenuitem_p.h"
QT_BEGIN_NAMESPACE
/*!
\qmltype MenuItemGroup
\inherits QtObject
-//! \instantiates QQuickPlatformMenuItemGroup
+//! \instantiates QQuickLabsPlatformMenuItemGroup
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A group for managing native menu items.
@@ -133,12 +133,12 @@ QT_BEGIN_NAMESPACE
\sa MenuItem::hovered()
*/
-QQuickPlatformMenuItemGroup::QQuickPlatformMenuItemGroup(QObject *parent)
+QQuickLabsPlatformMenuItemGroup::QQuickLabsPlatformMenuItemGroup(QObject *parent)
: QObject(parent), m_enabled(true), m_visible(true), m_exclusive(true), m_checkedItem(nullptr)
{
}
-QQuickPlatformMenuItemGroup::~QQuickPlatformMenuItemGroup()
+QQuickLabsPlatformMenuItemGroup::~QQuickLabsPlatformMenuItemGroup()
{
clear();
}
@@ -151,12 +151,12 @@ QQuickPlatformMenuItemGroup::~QQuickPlatformMenuItemGroup()
The enabled state of the group affects the enabled state of each item in the group,
except that explicitly disabled items are not enabled even if the group is enabled.
*/
-bool QQuickPlatformMenuItemGroup::isEnabled() const
+bool QQuickLabsPlatformMenuItemGroup::isEnabled() const
{
return m_enabled;
}
-void QQuickPlatformMenuItemGroup::setEnabled(bool enabled)
+void QQuickLabsPlatformMenuItemGroup::setEnabled(bool enabled)
{
if (m_enabled == enabled)
return;
@@ -164,7 +164,7 @@ void QQuickPlatformMenuItemGroup::setEnabled(bool enabled)
m_enabled = enabled;
emit enabledChanged();
- for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items)) {
if (item->m_enabled) {
item->sync();
emit item->enabledChanged();
@@ -180,12 +180,12 @@ void QQuickPlatformMenuItemGroup::setEnabled(bool enabled)
The visibility of the group affects the visibility of each item in the group,
except that explicitly hidden items are not visible even if the group is visible.
*/
-bool QQuickPlatformMenuItemGroup::isVisible() const
+bool QQuickLabsPlatformMenuItemGroup::isVisible() const
{
return m_visible;
}
-void QQuickPlatformMenuItemGroup::setVisible(bool visible)
+void QQuickLabsPlatformMenuItemGroup::setVisible(bool visible)
{
if (m_visible == visible)
return;
@@ -193,7 +193,7 @@ void QQuickPlatformMenuItemGroup::setVisible(bool visible)
m_visible = visible;
emit visibleChanged();
- for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items)) {
if (item->m_visible) {
item->sync();
emit item->visibleChanged();
@@ -209,12 +209,12 @@ void QQuickPlatformMenuItemGroup::setVisible(bool visible)
In an exclusive menu item group, only one item can be checked at any time;
checking another item automatically unchecks the previously checked one.
*/
-bool QQuickPlatformMenuItemGroup::isExclusive() const
+bool QQuickLabsPlatformMenuItemGroup::isExclusive() const
{
return m_exclusive;
}
-void QQuickPlatformMenuItemGroup::setExclusive(bool exclusive)
+void QQuickLabsPlatformMenuItemGroup::setExclusive(bool exclusive)
{
if (m_exclusive == exclusive)
return;
@@ -222,7 +222,7 @@ void QQuickPlatformMenuItemGroup::setExclusive(bool exclusive)
m_exclusive = exclusive;
emit exclusiveChanged();
- for (QQuickPlatformMenuItem *item : qAsConst(m_items))
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items))
item->sync();
}
@@ -231,12 +231,12 @@ void QQuickPlatformMenuItemGroup::setExclusive(bool exclusive)
This property holds the currently checked item in the group, or \c null if no item is checked.
*/
-QQuickPlatformMenuItem *QQuickPlatformMenuItemGroup::checkedItem() const
+QQuickLabsPlatformMenuItem *QQuickLabsPlatformMenuItemGroup::checkedItem() const
{
return m_checkedItem;
}
-void QQuickPlatformMenuItemGroup::setCheckedItem(QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenuItemGroup::setCheckedItem(QQuickLabsPlatformMenuItem *item)
{
if (m_checkedItem == item)
return;
@@ -256,9 +256,9 @@ void QQuickPlatformMenuItemGroup::setCheckedItem(QQuickPlatformMenuItem *item)
This property holds the list of items in the group.
*/
-QQmlListProperty<QQuickPlatformMenuItem> QQuickPlatformMenuItemGroup::items()
+QQmlListProperty<QQuickLabsPlatformMenuItem> QQuickLabsPlatformMenuItemGroup::items()
{
- return QQmlListProperty<QQuickPlatformMenuItem>(this, nullptr, items_append, items_count, items_at, items_clear);
+ return QQmlListProperty<QQuickLabsPlatformMenuItem>(this, nullptr, items_append, items_count, items_at, items_clear);
}
/*!
@@ -266,7 +266,7 @@ QQmlListProperty<QQuickPlatformMenuItem> QQuickPlatformMenuItemGroup::items()
Adds an \a item to the group.
*/
-void QQuickPlatformMenuItemGroup::addItem(QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenuItemGroup::addItem(QQuickLabsPlatformMenuItem *item)
{
if (!item || m_items.contains(item))
return;
@@ -274,9 +274,9 @@ void QQuickPlatformMenuItemGroup::addItem(QQuickPlatformMenuItem *item)
m_items.append(item);
item->setGroup(this);
- connect(item, &QQuickPlatformMenuItem::checkedChanged, this, &QQuickPlatformMenuItemGroup::updateCurrent);
- connect(item, &QQuickPlatformMenuItem::triggered, this, &QQuickPlatformMenuItemGroup::activateItem);
- connect(item, &QQuickPlatformMenuItem::hovered, this, &QQuickPlatformMenuItemGroup::hoverItem);
+ connect(item, &QQuickLabsPlatformMenuItem::checkedChanged, this, &QQuickLabsPlatformMenuItemGroup::updateCurrent);
+ connect(item, &QQuickLabsPlatformMenuItem::triggered, this, &QQuickLabsPlatformMenuItemGroup::activateItem);
+ connect(item, &QQuickLabsPlatformMenuItem::hovered, this, &QQuickLabsPlatformMenuItemGroup::hoverItem);
if (m_exclusive && item->isChecked())
setCheckedItem(item);
@@ -289,7 +289,7 @@ void QQuickPlatformMenuItemGroup::addItem(QQuickPlatformMenuItem *item)
Removes an \a item from the group.
*/
-void QQuickPlatformMenuItemGroup::removeItem(QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenuItemGroup::removeItem(QQuickLabsPlatformMenuItem *item)
{
if (!item || !m_items.contains(item))
return;
@@ -297,9 +297,9 @@ void QQuickPlatformMenuItemGroup::removeItem(QQuickPlatformMenuItem *item)
m_items.removeOne(item);
item->setGroup(nullptr);
- disconnect(item, &QQuickPlatformMenuItem::checkedChanged, this, &QQuickPlatformMenuItemGroup::updateCurrent);
- disconnect(item, &QQuickPlatformMenuItem::triggered, this, &QQuickPlatformMenuItemGroup::activateItem);
- disconnect(item, &QQuickPlatformMenuItem::hovered, this, &QQuickPlatformMenuItemGroup::hoverItem);
+ disconnect(item, &QQuickLabsPlatformMenuItem::checkedChanged, this, &QQuickLabsPlatformMenuItemGroup::updateCurrent);
+ disconnect(item, &QQuickLabsPlatformMenuItem::triggered, this, &QQuickLabsPlatformMenuItemGroup::activateItem);
+ disconnect(item, &QQuickLabsPlatformMenuItem::hovered, this, &QQuickLabsPlatformMenuItemGroup::hoverItem);
if (m_checkedItem == item)
setCheckedItem(nullptr);
@@ -312,16 +312,16 @@ void QQuickPlatformMenuItemGroup::removeItem(QQuickPlatformMenuItem *item)
Removes all items from the group.
*/
-void QQuickPlatformMenuItemGroup::clear()
+void QQuickLabsPlatformMenuItemGroup::clear()
{
if (m_items.isEmpty())
return;
- for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
+ for (QQuickLabsPlatformMenuItem *item : qAsConst(m_items)) {
item->setGroup(nullptr);
- disconnect(item, &QQuickPlatformMenuItem::checkedChanged, this, &QQuickPlatformMenuItemGroup::updateCurrent);
- disconnect(item, &QQuickPlatformMenuItem::triggered, this, &QQuickPlatformMenuItemGroup::activateItem);
- disconnect(item, &QQuickPlatformMenuItem::hovered, this, &QQuickPlatformMenuItemGroup::hoverItem);
+ disconnect(item, &QQuickLabsPlatformMenuItem::checkedChanged, this, &QQuickLabsPlatformMenuItemGroup::updateCurrent);
+ disconnect(item, &QQuickLabsPlatformMenuItem::triggered, this, &QQuickLabsPlatformMenuItemGroup::activateItem);
+ disconnect(item, &QQuickLabsPlatformMenuItem::hovered, this, &QQuickLabsPlatformMenuItemGroup::hoverItem);
}
setCheckedItem(nullptr);
@@ -330,63 +330,63 @@ void QQuickPlatformMenuItemGroup::clear()
emit itemsChanged();
}
-QQuickPlatformMenuItem *QQuickPlatformMenuItemGroup::findCurrent() const
+QQuickLabsPlatformMenuItem *QQuickLabsPlatformMenuItemGroup::findCurrent() const
{
- for (QQuickPlatformMenuItem *item : m_items) {
+ for (QQuickLabsPlatformMenuItem *item : m_items) {
if (item->isChecked())
return item;
}
return nullptr;
}
-void QQuickPlatformMenuItemGroup::updateCurrent()
+void QQuickLabsPlatformMenuItemGroup::updateCurrent()
{
if (!m_exclusive)
return;
- QQuickPlatformMenuItem *item = qobject_cast<QQuickPlatformMenuItem*>(sender());
+ QQuickLabsPlatformMenuItem *item = qobject_cast<QQuickLabsPlatformMenuItem*>(sender());
if (item && item->isChecked())
setCheckedItem(item);
}
-void QQuickPlatformMenuItemGroup::activateItem()
+void QQuickLabsPlatformMenuItemGroup::activateItem()
{
- QQuickPlatformMenuItem *item = qobject_cast<QQuickPlatformMenuItem*>(sender());
+ QQuickLabsPlatformMenuItem *item = qobject_cast<QQuickLabsPlatformMenuItem*>(sender());
if (item)
emit triggered(item);
}
-void QQuickPlatformMenuItemGroup::hoverItem()
+void QQuickLabsPlatformMenuItemGroup::hoverItem()
{
- QQuickPlatformMenuItem *item = qobject_cast<QQuickPlatformMenuItem*>(sender());
+ QQuickLabsPlatformMenuItem *item = qobject_cast<QQuickLabsPlatformMenuItem*>(sender());
if (item)
emit hovered(item);
}
-void QQuickPlatformMenuItemGroup::items_append(QQmlListProperty<QQuickPlatformMenuItem> *prop, QQuickPlatformMenuItem *item)
+void QQuickLabsPlatformMenuItemGroup::items_append(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop, QQuickLabsPlatformMenuItem *item)
{
- QQuickPlatformMenuItemGroup *group = static_cast<QQuickPlatformMenuItemGroup *>(prop->object);
+ QQuickLabsPlatformMenuItemGroup *group = static_cast<QQuickLabsPlatformMenuItemGroup *>(prop->object);
group->addItem(item);
}
-qsizetype QQuickPlatformMenuItemGroup::items_count(QQmlListProperty<QQuickPlatformMenuItem> *prop)
+qsizetype QQuickLabsPlatformMenuItemGroup::items_count(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop)
{
- QQuickPlatformMenuItemGroup *group = static_cast<QQuickPlatformMenuItemGroup *>(prop->object);
+ QQuickLabsPlatformMenuItemGroup *group = static_cast<QQuickLabsPlatformMenuItemGroup *>(prop->object);
return group->m_items.count();
}
-QQuickPlatformMenuItem *QQuickPlatformMenuItemGroup::items_at(QQmlListProperty<QQuickPlatformMenuItem> *prop, qsizetype index)
+QQuickLabsPlatformMenuItem *QQuickLabsPlatformMenuItemGroup::items_at(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop, qsizetype index)
{
- QQuickPlatformMenuItemGroup *group = static_cast<QQuickPlatformMenuItemGroup *>(prop->object);
+ QQuickLabsPlatformMenuItemGroup *group = static_cast<QQuickLabsPlatformMenuItemGroup *>(prop->object);
return group->m_items.value(index);
}
-void QQuickPlatformMenuItemGroup::items_clear(QQmlListProperty<QQuickPlatformMenuItem> *prop)
+void QQuickLabsPlatformMenuItemGroup::items_clear(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop)
{
- QQuickPlatformMenuItemGroup *group = static_cast<QQuickPlatformMenuItemGroup *>(prop->object);
+ QQuickLabsPlatformMenuItemGroup *group = static_cast<QQuickLabsPlatformMenuItemGroup *>(prop->object);
group->clear();
}
QT_END_NAMESPACE
-#include "moc_qquickplatformmenuitemgroup_p.cpp"
+#include "moc_qquicklabsplatformmenuitemgroup_p.cpp"
diff --git a/src/labs/platform/qquickplatformmenuitemgroup_p.h b/src/labs/platform/qquicklabsplatformmenuitemgroup_p.h
index 7407d26639..2dc60a70d2 100644
--- a/src/labs/platform/qquickplatformmenuitemgroup_p.h
+++ b/src/labs/platform/qquicklabsplatformmenuitemgroup_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMMENUITEMGROUP_P_H
-#define QQUICKPLATFORMMENUITEMGROUP_P_H
+#ifndef QQUICKLABSPLATFORMMENUITEMGROUP_P_H
+#define QQUICKLABSPLATFORMMENUITEMGROUP_P_H
//
// W A R N I N G
@@ -54,21 +54,21 @@
QT_BEGIN_NAMESPACE
-class QQuickPlatformMenuItem;
-class QQuickPlatformMenuItemGroupPrivate;
+class QQuickLabsPlatformMenuItem;
+class QQuickLabsPlatformMenuItemGroupPrivate;
-class QQuickPlatformMenuItemGroup : public QObject
+class QQuickLabsPlatformMenuItemGroup : public QObject
{
Q_OBJECT
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL)
- Q_PROPERTY(QQuickPlatformMenuItem *checkedItem READ checkedItem WRITE setCheckedItem NOTIFY checkedItemChanged FINAL)
- Q_PROPERTY(QQmlListProperty<QQuickPlatformMenuItem> items READ items NOTIFY itemsChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenuItem *checkedItem READ checkedItem WRITE setCheckedItem NOTIFY checkedItemChanged FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickLabsPlatformMenuItem> items READ items NOTIFY itemsChanged FINAL)
public:
- explicit QQuickPlatformMenuItemGroup(QObject *parent = nullptr);
- ~QQuickPlatformMenuItemGroup();
+ explicit QQuickLabsPlatformMenuItemGroup(QObject *parent = nullptr);
+ ~QQuickLabsPlatformMenuItemGroup();
bool isEnabled() const;
void setEnabled(bool enabled);
@@ -79,18 +79,18 @@ public:
bool isExclusive() const;
void setExclusive(bool exclusive);
- QQuickPlatformMenuItem *checkedItem() const;
- void setCheckedItem(QQuickPlatformMenuItem *item);
+ QQuickLabsPlatformMenuItem *checkedItem() const;
+ void setCheckedItem(QQuickLabsPlatformMenuItem *item);
- QQmlListProperty<QQuickPlatformMenuItem> items();
+ QQmlListProperty<QQuickLabsPlatformMenuItem> items();
- Q_INVOKABLE void addItem(QQuickPlatformMenuItem *item);
- Q_INVOKABLE void removeItem(QQuickPlatformMenuItem *item);
+ Q_INVOKABLE void addItem(QQuickLabsPlatformMenuItem *item);
+ Q_INVOKABLE void removeItem(QQuickLabsPlatformMenuItem *item);
Q_INVOKABLE void clear();
Q_SIGNALS:
- void triggered(QQuickPlatformMenuItem *item);
- void hovered(QQuickPlatformMenuItem *item);
+ void triggered(QQuickLabsPlatformMenuItem *item);
+ void hovered(QQuickLabsPlatformMenuItem *item);
void enabledChanged();
void visibleChanged();
@@ -99,25 +99,25 @@ Q_SIGNALS:
void itemsChanged();
private:
- QQuickPlatformMenuItem *findCurrent() const;
+ QQuickLabsPlatformMenuItem *findCurrent() const;
void updateCurrent();
void activateItem();
void hoverItem();
- static void items_append(QQmlListProperty<QQuickPlatformMenuItem> *prop, QQuickPlatformMenuItem *obj);
- static qsizetype items_count(QQmlListProperty<QQuickPlatformMenuItem> *prop);
- static QQuickPlatformMenuItem *items_at(QQmlListProperty<QQuickPlatformMenuItem> *prop, qsizetype index);
- static void items_clear(QQmlListProperty<QQuickPlatformMenuItem> *prop);
+ static void items_append(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop, QQuickLabsPlatformMenuItem *obj);
+ static qsizetype items_count(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop);
+ static QQuickLabsPlatformMenuItem *items_at(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop, qsizetype index);
+ static void items_clear(QQmlListProperty<QQuickLabsPlatformMenuItem> *prop);
bool m_enabled;
bool m_visible;
bool m_exclusive;
- QQuickPlatformMenuItem *m_checkedItem;
- QList<QQuickPlatformMenuItem*> m_items;
+ QQuickLabsPlatformMenuItem *m_checkedItem;
+ QList<QQuickLabsPlatformMenuItem*> m_items;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformMenuItemGroup)
+QML_DECLARE_TYPE(QQuickLabsPlatformMenuItemGroup)
-#endif // QQUICKPLATFORMMENUITEMGROUP_P_H
+#endif // QQUICKLABSPLATFORMMENUITEMGROUP_P_H
diff --git a/src/labs/platform/qquickplatformmenuseparator.cpp b/src/labs/platform/qquicklabsplatformmenuseparator.cpp
index f29d5b9edf..10dcefed0d 100644
--- a/src/labs/platform/qquickplatformmenuseparator.cpp
+++ b/src/labs/platform/qquicklabsplatformmenuseparator.cpp
@@ -34,14 +34,14 @@
**
****************************************************************************/
-#include "qquickplatformmenuseparator_p.h"
+#include "qquicklabsplatformmenuseparator_p.h"
QT_BEGIN_NAMESPACE
/*!
\qmltype MenuSeparator
\inherits MenuItem
-//! \instantiates QQuickPlatformMenuSeparator
+//! \instantiates QQuickLabsPlatformMenuSeparator
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native menu separator.
@@ -56,8 +56,8 @@ QT_BEGIN_NAMESPACE
\sa Menu, MenuItem
*/
-QQuickPlatformMenuSeparator::QQuickPlatformMenuSeparator(QObject *parent)
- : QQuickPlatformMenuItem(parent)
+QQuickLabsPlatformMenuSeparator::QQuickLabsPlatformMenuSeparator(QObject *parent)
+ : QQuickLabsPlatformMenuItem(parent)
{
setSeparator(true);
}
diff --git a/src/labs/platform/qquickplatformmenuseparator_p.h b/src/labs/platform/qquicklabsplatformmenuseparator_p.h
index 9fe973c5bf..d77903dda8 100644
--- a/src/labs/platform/qquickplatformmenuseparator_p.h
+++ b/src/labs/platform/qquicklabsplatformmenuseparator_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMMENUSEPARATOR_P_H
-#define QQUICKPLATFORMMENUSEPARATOR_P_H
+#ifndef QQUICKLABSPLATFORMMENUSEPARATOR_P_H
+#define QQUICKLABSPLATFORMMENUSEPARATOR_P_H
//
// W A R N I N G
@@ -48,20 +48,20 @@
// We mean it.
//
-#include "qquickplatformmenuitem_p.h"
+#include "qquicklabsplatformmenuitem_p.h"
QT_BEGIN_NAMESPACE
-class QQuickPlatformMenuSeparator : public QQuickPlatformMenuItem
+class QQuickLabsPlatformMenuSeparator : public QQuickLabsPlatformMenuItem
{
Q_OBJECT
public:
- explicit QQuickPlatformMenuSeparator(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformMenuSeparator(QObject *parent = nullptr);
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformMenuSeparator)
+QML_DECLARE_TYPE(QQuickLabsPlatformMenuSeparator)
-#endif // QQUICKPLATFORMMENUSEPARATOR_P_H
+#endif // QQUICKLABSPLATFORMMENUSEPARATOR_P_H
diff --git a/src/labs/platform/qquickplatformmessagedialog.cpp b/src/labs/platform/qquicklabsplatformmessagedialog.cpp
index f2e0970ced..33ed8fa9d2 100644
--- a/src/labs/platform/qquickplatformmessagedialog.cpp
+++ b/src/labs/platform/qquicklabsplatformmessagedialog.cpp
@@ -34,7 +34,7 @@
**
****************************************************************************/
-#include "qquickplatformmessagedialog_p.h"
+#include "qquicklabsplatformmessagedialog_p.h"
#include <QtQml/qqmlinfo.h>
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MessageDialog
\inherits Dialog
-//! \instantiates QQuickPlatformMessageDialog
+//! \instantiates QQuickLabsPlatformMessageDialog
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A native message dialog.
@@ -222,8 +222,8 @@ QT_BEGIN_NAMESPACE
This signal is emitted when \uicontrol {Restore Defaults} is clicked.
*/
-QQuickPlatformMessageDialog::QQuickPlatformMessageDialog(QObject *parent)
- : QQuickPlatformDialog(QPlatformTheme::MessageDialog, parent),
+QQuickLabsPlatformMessageDialog::QQuickLabsPlatformMessageDialog(QObject *parent)
+ : QQuickLabsPlatformDialog(QPlatformTheme::MessageDialog, parent),
m_options(QMessageDialogOptions::create())
{
}
@@ -235,12 +235,12 @@ QQuickPlatformMessageDialog::QQuickPlatformMessageDialog(QObject *parent)
\sa informativeText, detailedText
*/
-QString QQuickPlatformMessageDialog::text() const
+QString QQuickLabsPlatformMessageDialog::text() const
{
return m_options->text();
}
-void QQuickPlatformMessageDialog::setText(const QString &text)
+void QQuickLabsPlatformMessageDialog::setText(const QString &text)
{
if (m_options->text() == text)
return;
@@ -258,12 +258,12 @@ void QQuickPlatformMessageDialog::setText(const QString &text)
\sa text, detailedText
*/
-QString QQuickPlatformMessageDialog::informativeText() const
+QString QQuickLabsPlatformMessageDialog::informativeText() const
{
return m_options->informativeText();
}
-void QQuickPlatformMessageDialog::setInformativeText(const QString &text)
+void QQuickLabsPlatformMessageDialog::setInformativeText(const QString &text)
{
if (m_options->informativeText() == text)
return;
@@ -279,12 +279,12 @@ void QQuickPlatformMessageDialog::setInformativeText(const QString &text)
\sa text, informativeText
*/
-QString QQuickPlatformMessageDialog::detailedText() const
+QString QQuickLabsPlatformMessageDialog::detailedText() const
{
return m_options->detailedText();
}
-void QQuickPlatformMessageDialog::setDetailedText(const QString &text)
+void QQuickLabsPlatformMessageDialog::setDetailedText(const QString &text)
{
if (m_options->detailedText() == text)
return;
@@ -322,12 +322,12 @@ void QQuickPlatformMessageDialog::setDetailedText(const QString &text)
\sa clicked()
*/
-QPlatformDialogHelper::StandardButtons QQuickPlatformMessageDialog::buttons() const
+QPlatformDialogHelper::StandardButtons QQuickLabsPlatformMessageDialog::buttons() const
{
return m_options->standardButtons();
}
-void QQuickPlatformMessageDialog::setButtons(QPlatformDialogHelper::StandardButtons buttons)
+void QQuickLabsPlatformMessageDialog::setButtons(QPlatformDialogHelper::StandardButtons buttons)
{
if (m_options->standardButtons() == buttons)
return;
@@ -336,22 +336,22 @@ void QQuickPlatformMessageDialog::setButtons(QPlatformDialogHelper::StandardButt
emit buttonsChanged();
}
-void QQuickPlatformMessageDialog::onCreate(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformMessageDialog::onCreate(QPlatformDialogHelper *dialog)
{
if (QPlatformMessageDialogHelper *messageDialog = qobject_cast<QPlatformMessageDialogHelper *>(dialog)) {
- connect(messageDialog, &QPlatformMessageDialogHelper::clicked, this, &QQuickPlatformMessageDialog::handleClick);
+ connect(messageDialog, &QPlatformMessageDialogHelper::clicked, this, &QQuickLabsPlatformMessageDialog::handleClick);
messageDialog->setOptions(m_options);
}
}
-void QQuickPlatformMessageDialog::onShow(QPlatformDialogHelper *dialog)
+void QQuickLabsPlatformMessageDialog::onShow(QPlatformDialogHelper *dialog)
{
m_options->setWindowTitle(title());
if (QPlatformMessageDialogHelper *messageDialog = qobject_cast<QPlatformMessageDialogHelper *>(dialog))
messageDialog->setOptions(m_options);
}
-void QQuickPlatformMessageDialog::handleClick(QPlatformDialogHelper::StandardButton button)
+void QQuickLabsPlatformMessageDialog::handleClick(QPlatformDialogHelper::StandardButton button)
{
done(button);
emit clicked(button);
diff --git a/src/labs/platform/qquickplatformmessagedialog_p.h b/src/labs/platform/qquicklabsplatformmessagedialog_p.h
index 9434a927d7..af5ee25241 100644
--- a/src/labs/platform/qquickplatformmessagedialog_p.h
+++ b/src/labs/platform/qquicklabsplatformmessagedialog_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMMESSAGEDIALOG_P_H
-#define QQUICKPLATFORMMESSAGEDIALOG_P_H
+#ifndef QQUICKLABSPLATFORMMESSAGEDIALOG_P_H
+#define QQUICKLABSPLATFORMMESSAGEDIALOG_P_H
//
// W A R N I N G
@@ -48,12 +48,12 @@
// We mean it.
//
-#include "qquickplatformdialog_p.h"
+#include "qquicklabsplatformdialog_p.h"
#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
-class QQuickPlatformMessageDialog : public QQuickPlatformDialog
+class QQuickLabsPlatformMessageDialog : public QQuickLabsPlatformDialog
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
@@ -63,7 +63,7 @@ class QQuickPlatformMessageDialog : public QQuickPlatformDialog
Q_FLAGS(QPlatformDialogHelper::StandardButtons)
public:
- explicit QQuickPlatformMessageDialog(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformMessageDialog(QObject *parent = nullptr);
QString text() const;
void setText(const QString &text);
@@ -116,6 +116,6 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformMessageDialog)
+QML_DECLARE_TYPE(QQuickLabsPlatformMessageDialog)
-#endif // QQUICKPLATFORMMESSAGEDIALOG_P_H
+#endif // QQUICKLABSPLATFORMMESSAGEDIALOG_P_H
diff --git a/src/labs/platform/qquickplatformstandardpaths.cpp b/src/labs/platform/qquicklabsplatformstandardpaths.cpp
index a6fff1c016..68371c894e 100644
--- a/src/labs/platform/qquickplatformstandardpaths.cpp
+++ b/src/labs/platform/qquicklabsplatformstandardpaths.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "qquickplatformstandardpaths_p.h"
+#include "qquicklabsplatformstandardpaths_p.h"
#include <QtQml/qqmlengine.h>
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype StandardPaths
\inherits QtObject
-//! \instantiates QQuickPlatformStandardPaths
+//! \instantiates QQuickLabsPlatformStandardPaths
\inqmlmodule Qt.labs.platform
\since 5.8
\brief Provides access to the standard system paths.
@@ -75,15 +75,15 @@ static QList<QUrl> toUrlList(const QStringList &paths)
return urls;
}
-QQuickPlatformStandardPaths::QQuickPlatformStandardPaths(QObject *parent)
+QQuickLabsPlatformStandardPaths::QQuickLabsPlatformStandardPaths(QObject *parent)
: QObject(parent)
{
}
-QObject *QQuickPlatformStandardPaths::create(QQmlEngine *engine, QJSEngine *scriptEngine)
+QObject *QQuickLabsPlatformStandardPaths::create(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(scriptEngine);
- return new QQuickPlatformStandardPaths(engine);
+ return new QQuickLabsPlatformStandardPaths(engine);
}
/*!
@@ -93,7 +93,7 @@ QObject *QQuickPlatformStandardPaths::create(QQmlEngine *engine, QJSEngine *scri
\sa QStandardPaths::displayName()
*/
-QString QQuickPlatformStandardPaths::displayName(QStandardPaths::StandardLocation type)
+QString QQuickLabsPlatformStandardPaths::displayName(QStandardPaths::StandardLocation type)
{
return QStandardPaths::displayName(type);
}
@@ -105,7 +105,7 @@ QString QQuickPlatformStandardPaths::displayName(QStandardPaths::StandardLocatio
\sa QStandardPaths::findExecutable()
*/
-QUrl QQuickPlatformStandardPaths::findExecutable(const QString &executableName, const QStringList &paths)
+QUrl QQuickLabsPlatformStandardPaths::findExecutable(const QString &executableName, const QStringList &paths)
{
return QUrl::fromLocalFile(QStandardPaths::findExecutable(executableName, paths));
}
@@ -117,7 +117,7 @@ QUrl QQuickPlatformStandardPaths::findExecutable(const QString &executableName,
\sa QStandardPaths::locate()
*/
-QUrl QQuickPlatformStandardPaths::locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
+QUrl QQuickLabsPlatformStandardPaths::locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
{
return QUrl::fromLocalFile(QStandardPaths::locate(type, fileName, options));
}
@@ -129,7 +129,7 @@ QUrl QQuickPlatformStandardPaths::locate(QStandardPaths::StandardLocation type,
\sa QStandardPaths::locateAll()
*/
-QList<QUrl> QQuickPlatformStandardPaths::locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
+QList<QUrl> QQuickLabsPlatformStandardPaths::locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
{
return toUrlList(QStandardPaths::locateAll(type, fileName, options));
}
@@ -141,7 +141,7 @@ QList<QUrl> QQuickPlatformStandardPaths::locateAll(QStandardPaths::StandardLocat
\sa QStandardPaths::setTestModeEnabled()
*/
-void QQuickPlatformStandardPaths::setTestModeEnabled(bool testMode)
+void QQuickLabsPlatformStandardPaths::setTestModeEnabled(bool testMode)
{
QStandardPaths::setTestModeEnabled(testMode);
}
@@ -153,7 +153,7 @@ void QQuickPlatformStandardPaths::setTestModeEnabled(bool testMode)
\sa QStandardPaths::standardLocations()
*/
-QList<QUrl> QQuickPlatformStandardPaths::standardLocations(QStandardPaths::StandardLocation type)
+QList<QUrl> QQuickLabsPlatformStandardPaths::standardLocations(QStandardPaths::StandardLocation type)
{
return toUrlList(QStandardPaths::standardLocations(type));
}
@@ -165,7 +165,7 @@ QList<QUrl> QQuickPlatformStandardPaths::standardLocations(QStandardPaths::Stand
\sa QStandardPaths::writableLocation()
*/
-QUrl QQuickPlatformStandardPaths::writableLocation(QStandardPaths::StandardLocation type)
+QUrl QQuickLabsPlatformStandardPaths::writableLocation(QStandardPaths::StandardLocation type)
{
return QUrl::fromLocalFile(QStandardPaths::writableLocation(type));
}
diff --git a/src/labs/platform/qquickplatformstandardpaths_p.h b/src/labs/platform/qquicklabsplatformstandardpaths_p.h
index e2f4e11e44..2dd3247e72 100644
--- a/src/labs/platform/qquickplatformstandardpaths_p.h
+++ b/src/labs/platform/qquicklabsplatformstandardpaths_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMSTANDARDPATHS_P_H
-#define QQUICKPLATFORMSTANDARDPATHS_P_H
+#ifndef QQUICKLABSPLATFORMSTANDARDPATHS_P_H
+#define QQUICKLABSPLATFORMSTANDARDPATHS_P_H
//
// W A R N I N G
@@ -61,13 +61,13 @@ QT_BEGIN_NAMESPACE
class QQmlEngine;
class QJSEngine;
-class QQuickPlatformStandardPaths : public QObject
+class QQuickLabsPlatformStandardPaths : public QObject
{
Q_OBJECT
Q_ENUMS(QStandardPaths::StandardLocation QStandardPaths::LocateOptions)
public:
- explicit QQuickPlatformStandardPaths(QObject *parent = nullptr);
+ explicit QQuickLabsPlatformStandardPaths(QObject *parent = nullptr);
static QObject *create(QQmlEngine *engine, QJSEngine *scriptEngine);
@@ -80,13 +80,13 @@ public:
Q_INVOKABLE static QUrl writableLocation(QStandardPaths::StandardLocation type);
private:
- Q_DISABLE_COPY(QQuickPlatformStandardPaths)
+ Q_DISABLE_COPY(QQuickLabsPlatformStandardPaths)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformStandardPaths)
+QML_DECLARE_TYPE(QQuickLabsPlatformStandardPaths)
Q_DECLARE_METATYPE(QStandardPaths::StandardLocation)
Q_DECLARE_METATYPE(QStandardPaths::LocateOptions)
-#endif // QQUICKPLATFORMSTANDARDPATHS_P_H
+#endif // QQUICKLABSPLATFORMSTANDARDPATHS_P_H
diff --git a/src/labs/platform/qquickplatformsystemtrayicon.cpp b/src/labs/platform/qquicklabsplatformsystemtrayicon.cpp
index b97e379fbc..d3bb83aeed 100644
--- a/src/labs/platform/qquickplatformsystemtrayicon.cpp
+++ b/src/labs/platform/qquicklabsplatformsystemtrayicon.cpp
@@ -34,9 +34,9 @@
**
****************************************************************************/
-#include "qquickplatformsystemtrayicon_p.h"
-#include "qquickplatformmenu_p.h"
-#include "qquickplatformiconloader_p.h"
+#include "qquicklabsplatformsystemtrayicon_p.h"
+#include "qquicklabsplatformmenu_p.h"
+#include "qquicklabsplatformiconloader_p.h"
#include <QtCore/qloggingcategory.h>
#include <QtGui/qpa/qplatformtheme.h>
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype SystemTrayIcon
\inherits QtObject
-//! \instantiates QQuickPlatformSystemTrayIcon
+//! \instantiates QQuickLabsPlatformSystemTrayIcon
\inqmlmodule Qt.labs.platform
\since 5.8
\brief A system tray icon.
@@ -165,7 +165,7 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(qtLabsPlatformTray)
-QQuickPlatformSystemTrayIcon::QQuickPlatformSystemTrayIcon(QObject *parent)
+QQuickLabsPlatformSystemTrayIcon::QQuickLabsPlatformSystemTrayIcon(QObject *parent)
: QObject(parent),
m_complete(false),
m_visible(false),
@@ -179,12 +179,12 @@ QQuickPlatformSystemTrayIcon::QQuickPlatformSystemTrayIcon(QObject *parent)
qCDebug(qtLabsPlatformTray) << "SystemTrayIcon ->" << m_handle;
if (m_handle) {
- connect(m_handle, &QPlatformSystemTrayIcon::activated, this, &QQuickPlatformSystemTrayIcon::activated);
- connect(m_handle, &QPlatformSystemTrayIcon::messageClicked, this, &QQuickPlatformSystemTrayIcon::messageClicked);
+ connect(m_handle, &QPlatformSystemTrayIcon::activated, this, &QQuickLabsPlatformSystemTrayIcon::activated);
+ connect(m_handle, &QPlatformSystemTrayIcon::messageClicked, this, &QQuickLabsPlatformSystemTrayIcon::messageClicked);
}
}
-QQuickPlatformSystemTrayIcon::~QQuickPlatformSystemTrayIcon()
+QQuickLabsPlatformSystemTrayIcon::~QQuickLabsPlatformSystemTrayIcon()
{
if (m_menu)
m_menu->setSystemTrayIcon(nullptr);
@@ -195,7 +195,7 @@ QQuickPlatformSystemTrayIcon::~QQuickPlatformSystemTrayIcon()
m_handle = nullptr;
}
-QPlatformSystemTrayIcon *QQuickPlatformSystemTrayIcon::handle() const
+QPlatformSystemTrayIcon *QQuickLabsPlatformSystemTrayIcon::handle() const
{
return m_handle;
}
@@ -206,7 +206,7 @@ QPlatformSystemTrayIcon *QQuickPlatformSystemTrayIcon::handle() const
This property holds whether the system tray is available.
*/
-bool QQuickPlatformSystemTrayIcon::isAvailable() const
+bool QQuickLabsPlatformSystemTrayIcon::isAvailable() const
{
return m_handle && m_handle->isSystemTrayAvailable();
}
@@ -219,7 +219,7 @@ bool QQuickPlatformSystemTrayIcon::isAvailable() const
\sa showMessage()
*/
-bool QQuickPlatformSystemTrayIcon::supportsMessages() const
+bool QQuickLabsPlatformSystemTrayIcon::supportsMessages() const
{
return m_handle && m_handle->supportsMessages();
}
@@ -231,12 +231,12 @@ bool QQuickPlatformSystemTrayIcon::supportsMessages() const
The default value is \c false.
*/
-bool QQuickPlatformSystemTrayIcon::isVisible() const
+bool QQuickLabsPlatformSystemTrayIcon::isVisible() const
{
return m_visible;
}
-void QQuickPlatformSystemTrayIcon::setVisible(bool visible)
+void QQuickLabsPlatformSystemTrayIcon::setVisible(bool visible)
{
if (m_visible == visible)
return;
@@ -257,12 +257,12 @@ void QQuickPlatformSystemTrayIcon::setVisible(bool visible)
This property holds the tooltip of the system tray icon.
*/
-QString QQuickPlatformSystemTrayIcon::tooltip() const
+QString QQuickLabsPlatformSystemTrayIcon::tooltip() const
{
return m_tooltip;
}
-void QQuickPlatformSystemTrayIcon::setTooltip(const QString &tooltip)
+void QQuickLabsPlatformSystemTrayIcon::setTooltip(const QString &tooltip)
{
if (m_tooltip == tooltip)
return;
@@ -279,12 +279,12 @@ void QQuickPlatformSystemTrayIcon::setTooltip(const QString &tooltip)
This property holds a menu for the system tray icon.
*/
-QQuickPlatformMenu *QQuickPlatformSystemTrayIcon::menu() const
+QQuickLabsPlatformMenu *QQuickLabsPlatformSystemTrayIcon::menu() const
{
return m_menu;
}
-void QQuickPlatformSystemTrayIcon::setMenu(QQuickPlatformMenu *menu)
+void QQuickLabsPlatformSystemTrayIcon::setMenu(QQuickLabsPlatformMenu *menu)
{
if (m_menu == menu)
return;
@@ -307,7 +307,7 @@ void QQuickPlatformSystemTrayIcon::setMenu(QQuickPlatformMenu *menu)
This property holds the geometry of the system tray icon.
*/
-QRect QQuickPlatformSystemTrayIcon::geometry() const
+QRect QQuickLabsPlatformSystemTrayIcon::geometry() const
{
return m_handle ? m_handle->geometry() : QRect();
}
@@ -327,15 +327,15 @@ QRect QQuickPlatformSystemTrayIcon::geometry() const
}
\endcode
*/
-QQuickPlatformIcon QQuickPlatformSystemTrayIcon::icon() const
+QQuickLabsPlatformIcon QQuickLabsPlatformSystemTrayIcon::icon() const
{
if (!m_iconLoader)
- return QQuickPlatformIcon();
+ return QQuickLabsPlatformIcon();
return m_iconLoader->icon();
}
-void QQuickPlatformSystemTrayIcon::setIcon(const QQuickPlatformIcon &icon)
+void QQuickLabsPlatformSystemTrayIcon::setIcon(const QQuickLabsPlatformIcon &icon)
{
if (iconLoader()->icon() == icon)
return;
@@ -349,7 +349,7 @@ void QQuickPlatformSystemTrayIcon::setIcon(const QQuickPlatformIcon &icon)
Shows the system tray icon.
*/
-void QQuickPlatformSystemTrayIcon::show()
+void QQuickLabsPlatformSystemTrayIcon::show()
{
setVisible(true);
}
@@ -359,7 +359,7 @@ void QQuickPlatformSystemTrayIcon::show()
Hides the system tray icon.
*/
-void QQuickPlatformSystemTrayIcon::hide()
+void QQuickLabsPlatformSystemTrayIcon::hide()
{
setVisible(false);
}
@@ -376,13 +376,13 @@ void QQuickPlatformSystemTrayIcon::hide()
\sa supportsMessages, messageClicked()
*/
-void QQuickPlatformSystemTrayIcon::showMessage(const QString &title, const QString &msg, QPlatformSystemTrayIcon::MessageIcon icon, int msecs)
+void QQuickLabsPlatformSystemTrayIcon::showMessage(const QString &title, const QString &msg, QPlatformSystemTrayIcon::MessageIcon icon, int msecs)
{
if (m_handle)
m_handle->showMessage(title, msg, QIcon(), icon, msecs);
}
-void QQuickPlatformSystemTrayIcon::init()
+void QQuickLabsPlatformSystemTrayIcon::init()
{
if (!m_handle)
return;
@@ -395,7 +395,7 @@ void QQuickPlatformSystemTrayIcon::init()
m_iconLoader->setEnabled(true);
}
-void QQuickPlatformSystemTrayIcon::cleanup()
+void QQuickLabsPlatformSystemTrayIcon::cleanup()
{
if (m_handle)
m_handle->cleanup();
@@ -403,29 +403,29 @@ void QQuickPlatformSystemTrayIcon::cleanup()
m_iconLoader->setEnabled(false);
}
-void QQuickPlatformSystemTrayIcon::classBegin()
+void QQuickLabsPlatformSystemTrayIcon::classBegin()
{
}
-void QQuickPlatformSystemTrayIcon::componentComplete()
+void QQuickLabsPlatformSystemTrayIcon::componentComplete()
{
m_complete = true;
if (m_visible)
init();
}
-QQuickPlatformIconLoader *QQuickPlatformSystemTrayIcon::iconLoader() const
+QQuickLabsPlatformIconLoader *QQuickLabsPlatformSystemTrayIcon::iconLoader() const
{
if (!m_iconLoader) {
- QQuickPlatformSystemTrayIcon *that = const_cast<QQuickPlatformSystemTrayIcon *>(this);
+ QQuickLabsPlatformSystemTrayIcon *that = const_cast<QQuickLabsPlatformSystemTrayIcon *>(this);
static int slot = staticMetaObject.indexOfSlot("updateIcon()");
- m_iconLoader = new QQuickPlatformIconLoader(slot, that);
+ m_iconLoader = new QQuickLabsPlatformIconLoader(slot, that);
m_iconLoader->setEnabled(m_complete);
}
return m_iconLoader;
}
-void QQuickPlatformSystemTrayIcon::updateIcon()
+void QQuickLabsPlatformSystemTrayIcon::updateIcon()
{
if (!m_handle || !m_iconLoader)
return;
@@ -440,4 +440,4 @@ void QQuickPlatformSystemTrayIcon::updateIcon()
QT_END_NAMESPACE
-#include "moc_qquickplatformsystemtrayicon_p.cpp"
+#include "moc_qquicklabsplatformsystemtrayicon_p.cpp"
diff --git a/src/labs/platform/qquickplatformsystemtrayicon_p.h b/src/labs/platform/qquicklabsplatformsystemtrayicon_p.h
index d7cc46c0a4..f59fc55094 100644
--- a/src/labs/platform/qquickplatformsystemtrayicon_p.h
+++ b/src/labs/platform/qquicklabsplatformsystemtrayicon_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKPLATFORMSYSTEMTRAYICON_P_H
-#define QQUICKPLATFORMSYSTEMTRAYICON_P_H
+#ifndef QQUICKLABSPLATFORMSYSTEMTRAYICON_P_H
+#define QQUICKLABSPLATFORMSYSTEMTRAYICON_P_H
//
// W A R N I N G
@@ -54,16 +54,16 @@
#include <QtQml/qqmlparserstatus.h>
#include <QtQml/qqml.h>
-#include "qquickplatformicon_p.h"
+#include "qquicklabsplatformicon_p.h"
QT_REQUIRE_CONFIG(systemtrayicon);
QT_BEGIN_NAMESPACE
-class QQuickPlatformMenu;
-class QQuickPlatformIconLoader;
+class QQuickLabsPlatformMenu;
+class QQuickLabsPlatformIconLoader;
-class QQuickPlatformSystemTrayIcon : public QObject, public QQmlParserStatus
+class QQuickLabsPlatformSystemTrayIcon : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
@@ -71,14 +71,14 @@ class QQuickPlatformSystemTrayIcon : public QObject, public QQmlParserStatus
Q_PROPERTY(bool supportsMessages READ supportsMessages CONSTANT FINAL)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(QString tooltip READ tooltip WRITE setTooltip NOTIFY tooltipChanged FINAL)
- Q_PROPERTY(QQuickPlatformMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL)
+ Q_PROPERTY(QQuickLabsPlatformMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL)
Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged FINAL REVISION(1, 1))
- Q_PROPERTY(QQuickPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
+ Q_PROPERTY(QQuickLabsPlatformIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(1, 1))
Q_ENUMS(QPlatformSystemTrayIcon::ActivationReason QPlatformSystemTrayIcon::MessageIcon)
public:
- explicit QQuickPlatformSystemTrayIcon(QObject *parent = nullptr);
- ~QQuickPlatformSystemTrayIcon();
+ explicit QQuickLabsPlatformSystemTrayIcon(QObject *parent = nullptr);
+ ~QQuickLabsPlatformSystemTrayIcon();
QPlatformSystemTrayIcon *handle() const;
@@ -91,13 +91,13 @@ public:
QString tooltip() const;
void setTooltip(const QString &tooltip);
- QQuickPlatformMenu *menu() const;
- void setMenu(QQuickPlatformMenu *menu);
+ QQuickLabsPlatformMenu *menu() const;
+ void setMenu(QQuickLabsPlatformMenu *menu);
QRect geometry() const;
- QQuickPlatformIcon icon() const;
- void setIcon(const QQuickPlatformIcon &icon);
+ QQuickLabsPlatformIcon icon() const;
+ void setIcon(const QQuickLabsPlatformIcon &icon);
public Q_SLOTS:
void show();
@@ -122,7 +122,7 @@ protected:
void classBegin() override;
void componentComplete() override;
- QQuickPlatformIconLoader *iconLoader() const;
+ QQuickLabsPlatformIconLoader *iconLoader() const;
private Q_SLOTS:
void updateIcon();
@@ -131,15 +131,15 @@ private:
bool m_complete;
bool m_visible;
QString m_tooltip;
- QQuickPlatformMenu *m_menu;
- mutable QQuickPlatformIconLoader *m_iconLoader;
+ QQuickLabsPlatformMenu *m_menu;
+ mutable QQuickLabsPlatformIconLoader *m_iconLoader;
QPlatformSystemTrayIcon *m_handle;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickPlatformSystemTrayIcon)
+QML_DECLARE_TYPE(QQuickLabsPlatformSystemTrayIcon)
Q_DECLARE_METATYPE(QPlatformSystemTrayIcon::ActivationReason)
Q_DECLARE_METATYPE(QPlatformSystemTrayIcon::MessageIcon)
-#endif // QQUICKPLATFORMSYSTEMTRAYICON_P_H
+#endif // QQUICKLABSPLATFORMSYSTEMTRAYICON_P_H
diff --git a/src/labs/platform/qtlabsplatformplugin.cpp b/src/labs/platform/qtlabsplatformplugin.cpp
index 90bdb12186..90b166f6e9 100644
--- a/src/labs/platform/qtlabsplatformplugin.cpp
+++ b/src/labs/platform/qtlabsplatformplugin.cpp
@@ -38,25 +38,25 @@
#include <QtQml/qqml.h>
#include <QtCore/qloggingcategory.h>
-#include "qquickplatformdialog_p.h"
-#include "qquickplatformcolordialog_p.h"
-#include "qquickplatformfiledialog_p.h"
-#include "qquickplatformfolderdialog_p.h"
-#include "qquickplatformfontdialog_p.h"
-#include "qquickplatformmessagedialog_p.h"
-
-#include "qquickplatformmenu_p.h"
-#include "qquickplatformmenubar_p.h"
-#include "qquickplatformmenuitem_p.h"
-#include "qquickplatformmenuitemgroup_p.h"
-#include "qquickplatformmenuseparator_p.h"
-
-#include "qquickplatformstandardpaths_p.h"
+#include "qquicklabsplatformdialog_p.h"
+#include "qquicklabsplatformcolordialog_p.h"
+#include "qquicklabsplatformfiledialog_p.h"
+#include "qquicklabsplatformfolderdialog_p.h"
+#include "qquicklabsplatformfontdialog_p.h"
+#include "qquicklabsplatformmessagedialog_p.h"
+
+#include "qquicklabsplatformmenu_p.h"
+#include "qquicklabsplatformmenubar_p.h"
+#include "qquicklabsplatformmenuitem_p.h"
+#include "qquicklabsplatformmenuitemgroup_p.h"
+#include "qquicklabsplatformmenuseparator_p.h"
+
+#include "qquicklabsplatformstandardpaths_p.h"
#if QT_CONFIG(systemtrayicon)
-# include "qquickplatformsystemtrayicon_p.h"
+# include "qquicklabsplatformsystemtrayicon_p.h"
#endif
-#include "qquickplatformicon_p.h"
+#include "qquicklabsplatformicon_p.h"
QT_BEGIN_NAMESPACE
@@ -80,36 +80,36 @@ QtLabsPlatformPlugin::QtLabsPlatformPlugin(QObject *parent) : QQmlExtensionPlugi
void QtLabsPlatformPlugin::registerTypes(const char *uri)
{
- qmlRegisterUncreatableType<QQuickPlatformDialog>(uri, 1, 0, "Dialog", QQuickPlatformDialog::tr("Dialog is an abstract base class"));
- qmlRegisterType<QQuickPlatformColorDialog>(uri, 1, 0, "ColorDialog");
- qmlRegisterType<QQuickPlatformFileDialog>(uri, 1, 0, "FileDialog");
- qmlRegisterAnonymousType<QQuickPlatformFileNameFilter>(uri, 1);
- qmlRegisterType<QQuickPlatformFolderDialog>(uri, 1, 0, "FolderDialog");
- qmlRegisterType<QQuickPlatformFontDialog>(uri, 1, 0, "FontDialog");
- qmlRegisterType<QQuickPlatformMessageDialog>(uri, 1, 0, "MessageDialog");
-
- qmlRegisterType<QQuickPlatformMenu>(uri, 1, 0, "Menu");
- qmlRegisterType<QQuickPlatformMenuBar>(uri, 1, 0, "MenuBar");
- qmlRegisterType<QQuickPlatformMenuItem>(uri, 1, 0, "MenuItem");
- qmlRegisterType<QQuickPlatformMenuItem, 1>(uri, 1, 1, "MenuItem");
- qmlRegisterType<QQuickPlatformMenuItemGroup>(uri, 1, 0, "MenuItemGroup");
- qmlRegisterType<QQuickPlatformMenuSeparator>(uri, 1, 0, "MenuSeparator");
+ qmlRegisterUncreatableType<QQuickLabsPlatformDialog>(uri, 1, 0, "Dialog", QQuickLabsPlatformDialog::tr("Dialog is an abstract base class"));
+ qmlRegisterType<QQuickLabsPlatformColorDialog>(uri, 1, 0, "ColorDialog");
+ qmlRegisterType<QQuickLabsPlatformFileDialog>(uri, 1, 0, "FileDialog");
+ qmlRegisterAnonymousType<QQuickLabsPlatformFileNameFilter>(uri, 1);
+ qmlRegisterType<QQuickLabsPlatformFolderDialog>(uri, 1, 0, "FolderDialog");
+ qmlRegisterType<QQuickLabsPlatformFontDialog>(uri, 1, 0, "FontDialog");
+ qmlRegisterType<QQuickLabsPlatformMessageDialog>(uri, 1, 0, "MessageDialog");
+
+ qmlRegisterType<QQuickLabsPlatformMenu>(uri, 1, 0, "Menu");
+ qmlRegisterType<QQuickLabsPlatformMenuBar>(uri, 1, 0, "MenuBar");
+ qmlRegisterType<QQuickLabsPlatformMenuItem>(uri, 1, 0, "MenuItem");
+ qmlRegisterType<QQuickLabsPlatformMenuItem, 1>(uri, 1, 1, "MenuItem");
+ qmlRegisterType<QQuickLabsPlatformMenuItemGroup>(uri, 1, 0, "MenuItemGroup");
+ qmlRegisterType<QQuickLabsPlatformMenuSeparator>(uri, 1, 0, "MenuSeparator");
qRegisterMetaType<QPlatformMenu::MenuType>();
- qmlRegisterUncreatableType<QPlatformDialogHelper>(uri, 1, 0, "StandardButton", QQuickPlatformDialog::tr("Cannot create an instance of StandardButton"));
- qmlRegisterSingletonType<QQuickPlatformStandardPaths>(uri, 1, 0, "StandardPaths", QQuickPlatformStandardPaths::create);
+ qmlRegisterUncreatableType<QPlatformDialogHelper>(uri, 1, 0, "StandardButton", QQuickLabsPlatformDialog::tr("Cannot create an instance of StandardButton"));
+ qmlRegisterSingletonType<QQuickLabsPlatformStandardPaths>(uri, 1, 0, "StandardPaths", QQuickLabsPlatformStandardPaths::create);
qRegisterMetaType<QStandardPaths::StandardLocation>();
qRegisterMetaType<QStandardPaths::LocateOptions>();
#if QT_CONFIG(systemtrayicon)
- qmlRegisterType<QQuickPlatformSystemTrayIcon>(uri, 1, 0, "SystemTrayIcon");
- qmlRegisterType<QQuickPlatformSystemTrayIcon, 1>(uri, 1, 1, "SystemTrayIcon");
+ qmlRegisterType<QQuickLabsPlatformSystemTrayIcon>(uri, 1, 0, "SystemTrayIcon");
+ qmlRegisterType<QQuickLabsPlatformSystemTrayIcon, 1>(uri, 1, 1, "SystemTrayIcon");
qRegisterMetaType<QPlatformSystemTrayIcon::ActivationReason>();
qRegisterMetaType<QPlatformSystemTrayIcon::MessageIcon>();
#endif
- qmlRegisterAnonymousType<QQuickPlatformIcon>(uri, 1);
- qRegisterMetaType<QQuickPlatformIcon>();
+ qmlRegisterAnonymousType<QQuickLabsPlatformIcon>(uri, 1);
+ qRegisterMetaType<QQuickLabsPlatformIcon>();
}
QT_END_NAMESPACE