Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kontact
Commits
222bece2
Verified
Commit
222bece2
authored
Jul 11, 2021
by
Alexander Lohnau
💬
Browse files
Clean up code from imported class
parent
6c6808fa
Pipeline
#70026
passed with stage
in 4 minutes and 40 seconds
Changes
8
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
222bece2
...
...
@@ -11,8 +11,8 @@ target_sources(kontactprivate PRIVATE
sidepanebase.cpp
iconsidepane.cpp
aboutdialog.cpp
ksettingsdialog/kontactkcmultidialog.cpp
ksettingsdialog/kontactsettingsdialog.cpp
ksettingsdialog/kontactkcmultidialog.cpp
ksettingsdialog/kontactsettingsdialog.cpp
kontactconfiguredialog.cpp
kontact.qrc
)
...
...
src/kontactconfiguredialog.cpp
View file @
222bece2
...
...
@@ -16,7 +16,7 @@
using
namespace
Kontact
;
KontactConfigureDialog
::
KontactConfigureDialog
(
QWidget
*
parent
)
:
KSettings
::
KontactSettingsDialog
(
parent
)
:
KontactSettingsDialog
(
parent
)
{
setFaceType
(
Tree
);
connect
(
button
(
QDialogButtonBox
::
Ok
),
&
QPushButton
::
clicked
,
this
,
&
KontactConfigureDialog
::
slotOk
);
...
...
src/kontactconfiguredialog.h
View file @
222bece2
...
...
@@ -10,7 +10,7 @@
namespace
Kontact
{
class
KontactConfigureDialog
:
public
KSettings
::
KontactSettingsDialog
class
KontactConfigureDialog
:
public
KontactSettingsDialog
{
Q_OBJECT
...
...
src/ksettingsdialog/kontactkcmultidialog.cpp
View file @
222bece2
...
...
@@ -308,7 +308,7 @@ void KontactKCMultiDialogPrivate::apply()
Q_Q
(
KontactKCMultiDialog
);
QStringList
updatedComponents
;
for
(
const
CreatedModule
&
module
:
qAsC
onst
(
modules
))
{
for
(
const
CreatedModule
&
module
:
std
::
as_c
onst
(
modules
))
{
KCModuleProxy
*
proxy
=
module
.
kcm
;
if
(
proxy
->
changed
())
{
...
...
@@ -327,7 +327,7 @@ void KontactKCMultiDialogPrivate::apply()
}
// Send the configCommitted signal for every updated component.
for
(
const
QString
&
name
:
qAsC
onst
(
updatedComponents
))
{
for
(
const
QString
&
name
:
std
::
as_c
onst
(
updatedComponents
))
{
Q_EMIT
q
->
configCommitted
(
name
.
toLatin1
());
}
}
...
...
@@ -384,7 +384,7 @@ void KontactKCMultiDialog::closeEvent(QCloseEvent *event)
* in other situations will lead to "module already loaded in Foo," while to the user
* doesn't appear so(the dialog is hidden)
*/
for
(
auto
&
proxy
:
qAsC
onst
(
d
->
modules
))
{
for
(
auto
&
proxy
:
std
::
as_c
onst
(
d
->
modules
))
{
proxy
.
kcm
->
deleteClient
();
}
}
...
...
@@ -393,7 +393,7 @@ KPageWidgetItem *KontactKCMultiDialog::addModule(const KPluginMetaData &metaData
{
Q_D
(
KontactKCMultiDialog
);
// Create the scroller
auto
*
moduleScroll
=
new
UnboundScrollArea
(
this
);
auto
moduleScroll
=
new
UnboundScrollArea
(
this
);
// Prepare the scroll area
moduleScroll
->
setWidgetResizable
(
true
);
moduleScroll
->
setFrameStyle
(
QFrame
::
NoFrame
);
...
...
src/ksettingsdialog/kontactsettingsdialog.cpp
View file @
222bece2
...
...
@@ -26,8 +26,6 @@
#include
"kontact_debug.h"
namespace
KSettings
{
KontactSettingsDialog
::
KontactSettingsDialog
(
QWidget
*
parent
)
:
KontactKCMultiDialog
(
*
new
KontactSettingsDialogPrivate
(
this
),
new
KPageWidget
,
parent
)
{
...
...
@@ -108,6 +106,4 @@ void KontactSettingsDialogPrivate::createDialogFromServices()
});
}
}
// namespace
#include
"moc_kontactsettingsdialog.cpp"
src/ksettingsdialog/kontactsettingsdialog.h
View file @
222bece2
...
...
@@ -11,13 +11,10 @@
#include
"kontactkcmultidialog.h"
namespace
KSettings
{
class
KontactSettingsDialogPrivate
;
class
KontactSettingsDialog
:
public
KontactKCMultiDialog
{
friend
class
PageNode
;
Q_DECLARE_PRIVATE
(
KontactSettingsDialog
)
Q_OBJECT
public:
...
...
@@ -35,18 +32,6 @@ protected:
* Reimplemented to lazy create the dialog on first show.
*/
void
showEvent
(
QShowEvent
*
)
override
;
Q_SIGNALS:
/**
* If you use the dialog in Configurable mode and want to be notified
* when the user changes the plugin selections use this signal. It's
* emitted if the selection has changed and the user pressed Apply or
* Ok. In the slot you would then load and unload the plugins as
* requested.
*/
void
pluginSelectionChanged
();
};
}
#endif // KSETTINGS_DIALOG_H
src/ksettingsdialog/kontactsettingsdialog_p.h
View file @
222bece2
...
...
@@ -21,8 +21,6 @@
#include
<KPluginInfo>
#include
<KService>
namespace
KSettings
{
class
KontactSettingsDialogPrivate
:
public
KontactKCMultiDialogPrivate
{
friend
class
PageNode
;
...
...
@@ -46,5 +44,4 @@ private:
void
createDialogFromServices
();
};
}
// namespace KSettings
#endif // KSETTINGS_DIALOG_P_H
src/mainwindow.cpp
View file @
222bece2
...
...
@@ -65,8 +65,6 @@ using namespace Kontact;
#include
<QVBoxLayout>
#include
<QWebEngineUrlScheme>
#include
<ksettings/Dispatcher>
#include
<GrantleeTheme/GrantleeTheme>
#include
<GrantleeTheme/GrantleeThemeManager>
...
...
@@ -714,7 +712,7 @@ void MainWindow::slotPreferences()
static
Kontact
::
KontactConfigureDialog
*
dlg
=
nullptr
;
if
(
!
dlg
)
{
dlg
=
new
Kontact
::
KontactConfigureDialog
(
this
);
connect
(
dlg
,
&
KSettings
::
KontactSettingsDialog
::
configCommitted
,
this
,
[
this
](
const
QByteArray
&
componentName
)
{
connect
(
dlg
,
&
KontactSettingsDialog
::
configCommitted
,
this
,
[
this
](
const
QByteArray
&
componentName
)
{
if
(
componentName
==
QByteArrayLiteral
(
"kontact"
))
{
MainWindow
::
updateConfig
();
}
...
...
@@ -724,7 +722,7 @@ void MainWindow::slotPreferences()
return
m1
.
rawData
().
value
(
QStringLiteral
(
"X-KDE-Weight"
)).
toInt
()
<
m2
.
rawData
().
value
(
QStringLiteral
(
"X-KDE-Weight"
)).
toInt
();
};
std
::
sort
(
mPluginMetaData
.
begin
(),
mPluginMetaData
.
end
(),
sortByWeight
);
for
(
const
KPluginMetaData
&
metaData
:
qAsC
onst
(
mPluginMetaData
))
{
for
(
const
KPluginMetaData
&
metaData
:
std
::
as_c
onst
(
mPluginMetaData
))
{
const
QString
pluginNamespace
=
metaData
.
value
(
QStringLiteral
(
"X-KDE-ConfigModuleNamespace"
));
if
(
!
pluginNamespace
.
isEmpty
())
{
auto
plugins
=
KPluginLoader
::
findPlugins
(
pluginNamespace
);
...
...
@@ -732,7 +730,6 @@ void MainWindow::slotPreferences()
dlg
->
addPluginComponent
(
metaData
,
plugins
);
}
}
connect
(
dlg
,
&
Kontact
::
KontactConfigureDialog
::
pluginSelectionChanged
,
this
,
&
MainWindow
::
pluginsChanged
);
}
dlg
->
show
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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