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
Konsole
Commits
7e42fcc2
Commit
7e42fcc2
authored
Jul 03, 2021
by
Nicolas Fella
Browse files
Port part loading from KService to KPluginFactory
parent
d80f47ab
Pipeline
#99326
passed with stage
in 2 minutes and 8 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7e42fcc2
...
...
@@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
# Match KDE Frameworks update Apr 2021
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
71
.0"
)
set
(
KF5_MIN_VERSION
"5.
86
.0"
)
# Release script will create bugzilla versions
project
(
konsole VERSION
${
RELEASE_SERVICE_VERSION
}
)
...
...
src/tests/PartManualTest.cpp
View file @
7e42fcc2
...
...
@@ -20,8 +20,6 @@
// KDE
#include
<KMainWindow>
#include
<KPluginFactory>
#include
<KPluginLoader>
#include
<KService>
#include
<qtest.h>
// Konsole
...
...
@@ -105,14 +103,11 @@ void PartManualTest::shortcutTriggered()
KParts
::
Part
*
PartManualTest
::
createPart
()
{
KService
::
Ptr
service
=
KService
::
serviceByDesktopName
(
QStringLiteral
(
"konsolepart"
));
Q_ASSERT
(
service
);
KPluginFactory
*
factory
=
KPluginLoader
(
service
->
library
()).
factory
();
Q_ASSERT
(
factory
);
const
KPluginFactory
::
Result
<
KParts
::
Part
>
result
=
KPluginFactory
::
instantiatePlugin
<
KParts
::
Part
>
(
KPluginMetaData
(
QStringLiteral
(
"konsolepart"
)),
this
);
auto
*
terminalPart
=
factory
->
create
<
KParts
::
Part
>
(
this
);
Q_ASSERT
(
result
);
return
terminalPart
;
return
result
.
plugin
;
}
QTEST_MAIN
(
PartManualTest
)
src/tests/demo_konsolepart/src/demo_konsolepart.cpp
View file @
7e42fcc2
...
...
@@ -12,8 +12,6 @@
#include
<QMenuBar>
#include
<KPluginFactory>
#include
<KPluginLoader>
#include
<KService>
#include
<KWindowEffects>
#include
<KWindowSystem>
...
...
@@ -75,14 +73,12 @@ demo_konsolepart::~demo_konsolepart()
KParts
::
ReadOnlyPart
*
demo_konsolepart
::
createPart
()
{
KService
::
Ptr
service
=
KService
::
serviceByDesktopName
(
QStringLiteral
(
"konsolepart"
));
Q_ASSERT
(
service
);
KPluginFactory
*
factory
=
KPluginLoader
(
service
->
library
()).
factory
();
Q_ASSERT
(
factory
);
const
KPluginFactory
::
Result
<
KParts
::
ReadOnlyPart
>
result
=
KPluginFactory
::
instantiatePlugin
<
KParts
::
ReadOnlyPart
>
(
KPluginMetaData
(
QStringLiteral
(
"konsolepart"
)),
this
);
auto
*
terminalPart
=
factory
->
create
<
KParts
::
ReadOnlyPart
>
(
this
);
Q_ASSERT
(
result
);
return
terminalPart
;
return
result
.
plugin
;
}
void
demo_konsolepart
::
manageProfiles
()
...
...
Kurt Hindenburg
@hindenburg
mentioned in commit
b5fba0d5
·
Nov 21, 2021
mentioned in commit
b5fba0d5
mentioned in commit b5fba0d5435b7aa8999a6e88a5c3bfab0c2c5086
Toggle commit list
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