4#include <QtCore/private/qfileselector_p.h>
5#include <QtCore/qloggingcategory.h>
6#include <QtQml/qqmlengine.h>
7#include <QtQml/qqmlextensionplugin.h>
8#include <QtQuickTemplates2/private/qquicktheme_p_p.h>
9#include <QtQuickControls2/private/qquickstyle_p.h>
10#include <QtQuickControls2/private/qquickstyleplugin_p.h>
11#include <QtQuickControls2/qquickstyle.h>
12#include <QtQuickControls2/qtquickcontrols2global.h>
18Q_LOGGING_CATEGORY(lcQtQuickControls2Plugin,
"qt.quick.controls.qtquickcontrols2plugin")
29 void registerTypes(
const char *uri)
override;
30 void unregisterTypes()
override;
38 bool customStyle =
false;
40 QString registeredFallbackStyleUri;
136 qCDebug(lcQtQuickControls2Plugin) <<
"registerTypes() called with uri" << uri;
148 <<
"fallback style:" << rawFallbackStyleName <<
"effective fallback style:" << fallbackStyleName;
158 if (styleName != fallbackStyleName && styleName !=
QLatin1String(
"Basic")) {
169 if (!rawFallbackStyleName.
isEmpty()) {
171 fallbackModule = registeredFallbackStyleUri;
172 }
else if (customStyle) {
178 fallbackModule =
QLatin1String(
"QtQuick.Controls.IndirectBasic");
180 parentModule = registeredStyleUri;
181 fallbackModule = registeredFallbackStyleUri;
184 qCDebug(lcQtQuickControls2Plugin)
185 <<
"calling qmlRegisterModuleImport() to register fallback style with"
199 qCDebug(lcQtQuickControls2Plugin).nospace()
200 <<
"calling qmlRegisterModuleImport() to register primary style with"
202 <<
" import " << registeredStyleUri <<
" importMajor " << importMajor;
213 qCDebug(lcQtQuickControls2Plugin) <<
"unregisterTypes() called";
216 qCDebug(lcQtQuickControls2Plugin).nospace()
217 <<
"calling qmlUnregisterModuleImport() to unregister primary style with"
219 <<
" import " << registeredStyleUri <<
" importMajor " << importMajor;
223 if (!registeredFallbackStyleUri.
isEmpty()) {
227 if (!rawFallbackStyleName.
isEmpty()) {
229 fallbackModule = registeredFallbackStyleUri;
230 rawFallbackStyleName.
clear();
231 }
else if (customStyle) {
233 fallbackModule =
QLatin1String(
"QtQuick.Controls.IndirectBasic");
235 parentModule = registeredStyleUri;
236 fallbackModule = registeredFallbackStyleUri;
239 qCDebug(lcQtQuickControls2Plugin)
240 <<
"calling qmlUnregisterModuleImport() to unregister fallback style with"
247 registeredFallbackStyleUri.
clear();
251 registeredStyleUri.
clear();
256#include "qtquickcontrols2plugin.moc"
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static void addStatics(const QStringList &)
The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins with custom ...
static QString effectiveStyleName(const QString &styleName)
static bool isCustomStyle()
static QString fallbackStyle()
static QString name()
Returns the name of the application style.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void clear()
Clears the contents of the string and makes it null.
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QByteArray toUtf8() const &
~QtQuickControls2Plugin()
QtQuickControls2Plugin(QObject *parent=nullptr)
void unregisterTypes() override
void registerTypes(const char *uri) override
Combined button and popup list for selecting options.
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
Q_QML_EXPORT void qmlRegisterModuleImport(const char *uri, int moduleMajor, const char *import, int importMajor=QQmlModuleImportLatest, int importMinor=QQmlModuleImportLatest)
@ QQmlModuleImportModuleAny
Q_QML_EXPORT void qmlUnregisterModuleImport(const char *uri, int moduleMajor, const char *import, int importMajor=QQmlModuleImportLatest, int importMinor=QQmlModuleImportLatest)
#define QQmlExtensionInterface_iid
#define Q_GHS_KEEP_REFERENCE(S)
QLatin1StringView QLatin1String
QT_BEGIN_NAMESPACE Q_QUICKCONTROLS2_EXPORT void qml_register_types_QtQuick_Controls()
QString fallbackStyleUri()
static const char * qtQuickControlsUri
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent