Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Desktop
Commits
b2773580
Commit
b2773580
authored
Mar 29, 2022
by
Volker Krause
Browse files
Port to qmlRegisterAnonymousType()
See
kwin!2155
.
parent
8240372b
Pipeline
#159170
passed with stage
in 4 minutes and 9 seconds
Changes
8
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
containments/desktop/plugins/folder/foldermodel.cpp
View file @
b2773580
...
...
@@ -172,7 +172,7 @@ FolderModel::FolderModel(QObject *parent)
connect
(
DragTracker
::
self
(),
&
DragTracker
::
dragInProgressChanged
,
this
,
&
FolderModel
::
draggingChanged
);
connect
(
DragTracker
::
self
(),
&
DragTracker
::
dragInProgressChanged
,
this
,
&
FolderModel
::
dragInProgressAnywhereChanged
);
// needed to pass the job around with qml
qmlRegisterType
<
KIO
::
DropJob
>
();
qmlRegister
Anonymous
Type
<
KIO
::
DropJob
>
(
"org.kde.private.desktopcontainment.folder"
,
0
);
DirLister
*
dirLister
=
new
DirLister
(
this
);
dirLister
->
setDelayedMimeTypes
(
true
);
dirLister
->
setAutoErrorHandlingEnabled
(
false
);
...
...
kcms/access/kcmaccess.cpp
View file @
b2773580
...
...
@@ -142,11 +142,11 @@ KAccessConfig::KAccessConfig(QObject *parent, const KPluginMetaData &metaData, c
,
m_data
(
new
AccessibilityData
(
this
))
,
m_desktopShortcutInfo
(
QX11Info
::
isPlatformX11
()
?
mouseKeysShortcut
(
QX11Info
::
display
())
:
QString
())
{
qmlRegisterType
<
MouseSettings
>
();
qmlRegisterType
<
BellSettings
>
();
qmlRegisterType
<
KeyboardSettings
>
();
qmlRegisterType
<
KeyboardFiltersSettings
>
();
qmlRegisterType
<
ScreenReaderSettings
>
();
qmlRegister
Anonymous
Type
<
MouseSettings
>
(
"org.kde.plasma.access.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
BellSettings
>
(
"org.kde.plasma.access.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
KeyboardSettings
>
(
"org.kde.plasma.access.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
KeyboardFiltersSettings
>
(
"org.kde.plasma.access.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
ScreenReaderSettings
>
(
"org.kde.plasma.access.kcm"
,
0
);
int
tryOrcaRun
=
QProcess
::
execute
(
QStringLiteral
(
"orca"
),
{
QStringLiteral
(
"--version"
)});
m_screenReaderInstalled
=
tryOrcaRun
!=
-
2
;
...
...
kcms/baloo/kcm.cpp
View file @
b2773580
...
...
@@ -49,8 +49,8 @@ ServerConfigModule::ServerConfigModule(QObject *parent, const QVariantList &args
,
m_data
(
new
BalooData
(
this
))
,
m_filteredFolderModel
(
new
FilteredFolderModel
(
m_data
->
settings
(),
this
))
{
qmlRegisterType
<
FilteredFolderModel
>
();
qmlRegisterType
<
BalooSettings
>
();
qmlRegister
Anonymous
Type
<
FilteredFolderModel
>
(
"org.kde.plasma.baloo.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
BalooSettings
>
(
"org.kde.plasma.baloo.kcm"
,
0
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcm_baloofile"
),
i18n
(
"File Search"
),
...
...
kcms/kded/kcmkded.cpp
View file @
b2773580
...
...
@@ -41,9 +41,8 @@ KDEDConfig::KDEDConfig(QObject *parent, const QVariantList &args)
,
m_kdedWatcher
(
new
QDBusServiceWatcher
(
s_kdedServiceName
,
QDBusConnection
::
sessionBus
(),
QDBusServiceWatcher
::
WatchForOwnerChange
,
this
))
{
qmlRegisterUncreatableType
<
KDEDConfig
>
(
"org.kde.private.kcms.style"
,
1
,
0
,
"KCM"
,
QStringLiteral
(
"Cannot create instances of KCM"
));
// FIXME Qt 5.14 qmlRegisterAnonymousType
qmlRegisterType
<
ModulesModel
>
();
qmlRegisterType
<
FilterProxyModel
>
();
qmlRegisterAnonymousType
<
ModulesModel
>
(
"org.kde.plasma.kded.kcm"
,
0
);
qmlRegisterAnonymousType
<
FilterProxyModel
>
(
"org.kde.plasma.kded.kcm"
,
0
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcm5_kded"
),
i18n
(
"Background Services"
),
...
...
kcms/ksplash/kcm.cpp
View file @
b2773580
...
...
@@ -33,8 +33,8 @@ KCMSplashScreen::KCMSplashScreen(QObject *parent, const QVariantList &args)
,
m_data
(
new
SplashScreenData
(
this
))
,
m_model
(
new
QStandardItemModel
(
this
))
{
qmlRegisterType
<
SplashScreenSettings
>
();
qmlRegisterType
<
QStandardItemModel
>
();
qmlRegister
Anonymous
Type
<
SplashScreenSettings
>
(
"org.kde.plasma.splash.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
QStandardItemModel
>
(
"org.kde.plasma.splash.kcm"
,
0
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcm_splashscreen"
),
i18n
(
"Splash Screen"
),
QStringLiteral
(
"0.1"
),
QString
(),
KAboutLicense
::
LGPL
);
about
->
addAuthor
(
i18n
(
"Marco Martin"
),
QString
(),
QStringLiteral
(
"mart@kde.org"
));
...
...
kcms/landingpage/landingpage.cpp
View file @
b2773580
...
...
@@ -160,12 +160,12 @@ KCMLandingPage::KCMLandingPage(QObject *parent, const QVariantList &args)
:
KQuickAddons
::
ManagedConfigModule
(
parent
,
args
)
,
m_data
(
new
LandingPageData
(
this
))
{
qmlRegisterType
<
LandingPageGlobalsSettings
>
();
qmlRegister
Anonymous
Type
<
LandingPageGlobalsSettings
>
(
"org.kde.plasma.landingpage.kcm"
,
0
);
#if HAVE_KUSERFEEDBACK
qmlRegisterType
<
FeedbackSettings
>
();
qmlRegister
Anonymous
Type
<
FeedbackSettings
>
(
"org.kde.plasma.landingpage.kcm"
,
0
);
#endif
qmlRegisterType
<
MostUsedModel
>
();
qmlRegisterType
<
LookAndFeelGroup
>
();
qmlRegister
Anonymous
Type
<
MostUsedModel
>
(
"org.kde.plasma.landingpage.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
LookAndFeelGroup
>
(
"org.kde.plasma.landingpage.kcm"
,
0
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcm_landingpage"
),
i18n
(
"Quick Settings"
),
...
...
kcms/runners/krunnersettings.cpp
View file @
b2773580
...
...
@@ -32,7 +32,7 @@ KRunnerSettings::KRunnerSettings(QObject *parent, const KPluginMetaData &metaDat
,
m_historyKeys
(
m_historyConfigGroup
.
keyList
())
,
m_doesShowPluginButton
(
args
.
isEmpty
()
||
args
.
constFirst
()
!=
QLatin1String
(
"openedFromPluginSettings"
))
{
qmlRegisterType
<
KRunnerSettingsBase
>
();
qmlRegister
Anonymous
Type
<
KRunnerSettingsBase
>
(
"org.kde.plasma.runners.kcm"
,
0
);
setButtons
(
Apply
|
Default
);
...
...
kcms/workspaceoptions/workspaceoptions.cpp
View file @
b2773580
...
...
@@ -24,8 +24,8 @@ KCMWorkspaceOptions::KCMWorkspaceOptions(QObject *parent, const QVariantList &ar
:
KQuickAddons
::
ManagedConfigModule
(
parent
,
args
)
,
m_data
(
new
WorkspaceOptionsData
(
this
))
{
qmlRegisterType
<
WorkspaceOptionsGlobalsSettings
>
();
qmlRegisterType
<
WorkspaceOptionsPlasmaSettings
>
();
qmlRegister
Anonymous
Type
<
WorkspaceOptionsGlobalsSettings
>
(
"org.kde.plasma.workspaceoptions.kcm"
,
0
);
qmlRegister
Anonymous
Type
<
WorkspaceOptionsPlasmaSettings
>
(
"org.kde.plasma.workspaceoptions.kcm"
,
0
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcm_workspace"
),
i18n
(
"General Behavior"
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment