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
Utilities
KDiskFree
Commits
ae6d5f48
Verified
Commit
ae6d5f48
authored
May 10, 2021
by
Alexander Lohnau
💬
Browse files
Port away from deprecated create_* KCM loading
Task:
https://phabricator.kde.org/T13808
parent
58163e72
Changes
3
Show whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
ae6d5f48
...
...
@@ -94,7 +94,7 @@ ecm_qt_declare_logging_category(kcm_kdf_PART_SRCS
CATEGORY_NAME kdf.kcm DESCRIPTION
"kdf (kdf kcm)"
EXPORT KDF
)
add_library
(
kcm_kdf
${
kcm_kdf_PART_SRCS
}
)
kcoreaddons_desktop_to_json
(
kcm_kdf
"../desktop/kcmdf.desktop"
SERVICE_TYPES kcmodule.desktop
)
target_link_libraries
(
kcm_kdf
kdfprivate
Qt5::Core
...
...
src/kcmdf.cpp
View file @
ae6d5f48
...
...
@@ -28,9 +28,13 @@
#include
"kcmdf.h"
#include
<QVBoxLayout>
#include
<KPluginFactory>
#include
<kpluginfactory.h>
KDiskFreeWidget
::
KDiskFreeWidget
(
QWidget
*
parent
)
:
KCModule
(
parent
)
K_PLUGIN_CLASS_WITH_JSON
(
KDiskFreeWidget
,
"kcmdf.json"
)
KDiskFreeWidget
::
KDiskFreeWidget
(
QWidget
*
parent
,
const
QVariantList
&
args
)
:
KCModule
(
parent
,
args
)
{
setButtons
(
Help
);
...
...
@@ -52,11 +56,4 @@ QString KDiskFreeWidget::quickHelp() const
" or to open it in the file manager."
);
}
extern
"C"
{
Q_DECL_EXPORT
KCModule
*
create_kdf
(
QWidget
*
parent
,
const
char
*
/*name*/
)
{
return
new
KDiskFreeWidget
(
parent
);
}
}
#include
"kcmdf.moc"
src/kcmdf.h
View file @
ae6d5f48
...
...
@@ -34,7 +34,7 @@ class KDiskFreeWidget : public KCModule
Q_OBJECT
public:
explicit
KDiskFreeWidget
(
QWidget
*
parent
=
nullptr
);
explicit
KDiskFreeWidget
(
QWidget
*
parent
=
nullptr
,
const
QVariantList
&
args
=
{}
);
~
KDiskFreeWidget
()
override
;
QString
quickHelp
()
const
override
;
...
...
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