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
6c6808fa
Verified
Commit
6c6808fa
authored
Jul 11, 2021
by
Alexander Lohnau
💬
Browse files
Rename imported classes to kontact specific names
Otherwise tha names would class with the existing ones from KCMUtils
parent
7dc7713e
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
6c6808fa
...
...
@@ -11,8 +11,8 @@ target_sources(kontactprivate PRIVATE
sidepanebase.cpp
iconsidepane.cpp
aboutdialog.cpp
ksettingsdialog/kcmultidialog.cpp
ksettingsdialog/dialog.cpp
ksettingsdialog/
kontact
kcmultidialog.cpp
ksettingsdialog/
kontactsettings
dialog.cpp
kontactconfiguredialog.cpp
kontact.qrc
)
...
...
src/kontactconfiguredialog.cpp
View file @
6c6808fa
...
...
@@ -16,7 +16,7 @@
using
namespace
Kontact
;
KontactConfigureDialog
::
KontactConfigureDialog
(
QWidget
*
parent
)
:
KSettings
::
Dialog
(
parent
)
:
KSettings
::
KontactSettings
Dialog
(
parent
)
{
setFaceType
(
Tree
);
connect
(
button
(
QDialogButtonBox
::
Ok
),
&
QPushButton
::
clicked
,
this
,
&
KontactConfigureDialog
::
slotOk
);
...
...
src/kontactconfiguredialog.h
View file @
6c6808fa
...
...
@@ -6,11 +6,11 @@
#pragma once
#include
"ksettingsdialog/dialog.h"
#include
"ksettingsdialog/
kontactsettings
dialog.h"
namespace
Kontact
{
class
KontactConfigureDialog
:
public
KSettings
::
Dialog
class
KontactConfigureDialog
:
public
KSettings
::
KontactSettings
Dialog
{
Q_OBJECT
...
...
src/ksettingsdialog/kcmultidialog.cpp
→
src/ksettingsdialog/
kontact
kcmultidialog.cpp
View file @
6c6808fa
...
...
@@ -9,8 +9,8 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include
"kcmultidialog.h"
#include
"kcmultidialog_p.h"
#include
"
kontact
kcmultidialog.h"
#include
"
kontact
kcmultidialog_p.h"
#include
"kcmoduleproxy.h"
...
...
@@ -33,9 +33,9 @@
#include
<KPageWidgetModel>
#include
<KPluginMetaData>
bool
KCMultiDialogPrivate
::
resolveChanges
(
KCModuleProxy
*
currentProxy
)
bool
Kontact
KCMultiDialogPrivate
::
resolveChanges
(
KCModuleProxy
*
currentProxy
)
{
Q_Q
(
KCMultiDialog
);
Q_Q
(
Kontact
KCMultiDialog
);
if
(
!
currentProxy
||
!
currentProxy
->
changed
())
{
return
true
;
}
...
...
@@ -66,9 +66,9 @@ bool KCMultiDialogPrivate::resolveChanges(KCModuleProxy *currentProxy)
}
}
void
KCMultiDialogPrivate
::
_k_slotCurrentPageChanged
(
KPageWidgetItem
*
current
,
KPageWidgetItem
*
previous
)
void
Kontact
KCMultiDialogPrivate
::
_k_slotCurrentPageChanged
(
KPageWidgetItem
*
current
,
KPageWidgetItem
*
previous
)
{
Q_Q
(
KCMultiDialog
);
Q_Q
(
Kontact
KCMultiDialog
);
KCModuleProxy
*
previousModule
=
nullptr
;
for
(
int
i
=
0
;
i
<
modules
.
count
();
++
i
)
{
...
...
@@ -110,9 +110,9 @@ void KCMultiDialogPrivate::_k_slotCurrentPageChanged(KPageWidgetItem *current, K
_k_clientChanged
();
}
void
KCMultiDialogPrivate
::
_k_clientChanged
()
void
Kontact
KCMultiDialogPrivate
::
_k_clientChanged
()
{
Q_Q
(
KCMultiDialog
);
Q_Q
(
Kontact
KCMultiDialog
);
// qDebug();
// Get the current module
KCModuleProxy
*
activeModule
=
nullptr
;
...
...
@@ -131,20 +131,20 @@ void KCMultiDialogPrivate::_k_clientChanged()
QPushButton
*
applyButton
=
q
->
buttonBox
()
->
button
(
QDialogButtonBox
::
Apply
);
if
(
applyButton
)
{
q
->
disconnect
(
applyButton
,
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotApplyClicked
);
q
->
disconnect
(
applyButton
,
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotApplyClicked
);
}
QPushButton
*
okButton
=
q
->
buttonBox
()
->
button
(
QDialogButtonBox
::
Ok
);
if
(
okButton
)
{
q
->
disconnect
(
okButton
,
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotOkClicked
);
q
->
disconnect
(
okButton
,
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotOkClicked
);
}
if
(
applyButton
)
{
q
->
connect
(
applyButton
,
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotApplyClicked
);
q
->
connect
(
applyButton
,
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotApplyClicked
);
}
if
(
okButton
)
{
q
->
connect
(
okButton
,
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotOkClicked
);
q
->
connect
(
okButton
,
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotOkClicked
);
}
}
...
...
@@ -189,9 +189,9 @@ void KCMultiDialogPrivate::_k_clientChanged()
}
}
void
KCMultiDialogPrivate
::
init
()
void
Kontact
KCMultiDialogPrivate
::
init
()
{
Q_Q
(
KCMultiDialog
);
Q_Q
(
Kontact
KCMultiDialog
);
q
->
setFaceType
(
KPageDialog
::
Auto
);
q
->
setWindowTitle
(
i18n
(
"Configure"
));
q
->
setModal
(
false
);
...
...
@@ -210,11 +210,11 @@ void KCMultiDialogPrivate::init()
buttonBox
->
button
(
QDialogButtonBox
::
Reset
)
->
setEnabled
(
false
);
buttonBox
->
button
(
QDialogButtonBox
::
Apply
)
->
setEnabled
(
false
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Apply
),
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotApplyClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Ok
),
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotOkClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
RestoreDefaults
),
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotDefaultClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Help
),
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotHelpClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Reset
),
&
QAbstractButton
::
clicked
,
q
,
&
KCMultiDialog
::
slotUser1Clicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Apply
),
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotApplyClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Ok
),
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotOkClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
RestoreDefaults
),
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotDefaultClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Help
),
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotHelpClicked
);
q
->
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Reset
),
&
QAbstractButton
::
clicked
,
q
,
&
Kontact
KCMultiDialog
::
slotUser1Clicked
);
q
->
setButtonBox
(
buttonBox
);
q
->
connect
(
q
,
&
KPageDialog
::
currentPageChanged
,
q
,
[
this
](
KPageWidgetItem
*
current
,
KPageWidgetItem
*
before
)
{
...
...
@@ -222,26 +222,26 @@ void KCMultiDialogPrivate::init()
});
}
KCMultiDialog
::
KCMultiDialog
(
QWidget
*
parent
)
Kontact
KCMultiDialog
::
Kontact
KCMultiDialog
(
QWidget
*
parent
)
:
KPageDialog
(
parent
)
,
d_ptr
(
new
KCMultiDialogPrivate
(
this
))
,
d_ptr
(
new
Kontact
KCMultiDialogPrivate
(
this
))
{
d_func
()
->
init
();
}
KCMultiDialog
::
KCMultiDialog
(
KCMultiDialogPrivate
&
dd
,
KPageWidget
*
pageWidget
,
QWidget
*
parent
,
Qt
::
WindowFlags
flags
)
Kontact
KCMultiDialog
::
Kontact
KCMultiDialog
(
Kontact
KCMultiDialogPrivate
&
dd
,
KPageWidget
*
pageWidget
,
QWidget
*
parent
,
Qt
::
WindowFlags
flags
)
:
KPageDialog
(
pageWidget
,
parent
,
flags
)
,
d_ptr
(
&
dd
)
{
d_func
()
->
init
();
}
KCMultiDialog
::~
KCMultiDialog
()
Kontact
KCMultiDialog
::~
Kontact
KCMultiDialog
()
{
delete
d_ptr
;
}
void
KCMultiDialog
::
showEvent
(
QShowEvent
*
ev
)
void
Kontact
KCMultiDialog
::
showEvent
(
QShowEvent
*
ev
)
{
KPageDialog
::
showEvent
(
ev
);
adjustSize
();
...
...
@@ -259,9 +259,9 @@ void KCMultiDialog::showEvent(QShowEvent *ev)
}
}
void
KCMultiDialog
::
slotDefaultClicked
()
void
Kontact
KCMultiDialog
::
slotDefaultClicked
()
{
Q_D
(
KCMultiDialog
);
Q_D
(
Kontact
KCMultiDialog
);
const
KPageWidgetItem
*
item
=
currentPage
();
if
(
!
item
)
{
return
;
...
...
@@ -276,14 +276,14 @@ void KCMultiDialog::slotDefaultClicked()
}
}
void
KCMultiDialog
::
slotUser1Clicked
()
void
Kontact
KCMultiDialog
::
slotUser1Clicked
()
{
const
KPageWidgetItem
*
item
=
currentPage
();
if
(
!
item
)
{
return
;
}
Q_D
(
KCMultiDialog
);
Q_D
(
Kontact
KCMultiDialog
);
for
(
int
i
=
0
;
i
<
d
->
modules
.
count
();
++
i
)
{
if
(
d
->
modules
[
i
].
item
==
item
)
{
d
->
modules
[
i
].
kcm
->
load
();
...
...
@@ -293,7 +293,7 @@ void KCMultiDialog::slotUser1Clicked()
}
}
bool
KCMultiDialogPrivate
::
moduleSave
(
KCModuleProxy
*
module
)
bool
Kontact
KCMultiDialogPrivate
::
moduleSave
(
KCModuleProxy
*
module
)
{
if
(
!
module
)
{
return
false
;
...
...
@@ -303,9 +303,9 @@ bool KCMultiDialogPrivate::moduleSave(KCModuleProxy *module)
return
true
;
}
void
KCMultiDialogPrivate
::
apply
()
void
Kontact
KCMultiDialogPrivate
::
apply
()
{
Q_Q
(
KCMultiDialog
);
Q_Q
(
Kontact
KCMultiDialog
);
QStringList
updatedComponents
;
for
(
const
CreatedModule
&
module
:
qAsConst
(
modules
))
{
...
...
@@ -332,7 +332,7 @@ void KCMultiDialogPrivate::apply()
}
}
void
KCMultiDialog
::
slotApplyClicked
()
void
Kontact
KCMultiDialog
::
slotApplyClicked
()
{
QPushButton
*
applyButton
=
buttonBox
()
->
button
(
QDialogButtonBox
::
Apply
);
applyButton
->
setFocus
();
...
...
@@ -340,7 +340,7 @@ void KCMultiDialog::slotApplyClicked()
d_func
()
->
apply
();
}
void
KCMultiDialog
::
slotOkClicked
()
void
Kontact
KCMultiDialog
::
slotOkClicked
()
{
QPushButton
*
okButton
=
buttonBox
()
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setFocus
();
...
...
@@ -349,14 +349,14 @@ void KCMultiDialog::slotOkClicked()
accept
();
}
void
KCMultiDialog
::
slotHelpClicked
()
void
Kontact
KCMultiDialog
::
slotHelpClicked
()
{
const
KPageWidgetItem
*
item
=
currentPage
();
if
(
!
item
)
{
return
;
}
Q_D
(
KCMultiDialog
);
Q_D
(
Kontact
KCMultiDialog
);
QString
docPath
;
for
(
int
i
=
0
;
i
<
d
->
modules
.
count
();
++
i
)
{
if
(
d
->
modules
[
i
].
item
==
item
)
{
...
...
@@ -374,9 +374,9 @@ void KCMultiDialog::slotHelpClicked()
}
}
void
KCMultiDialog
::
closeEvent
(
QCloseEvent
*
event
)
void
Kontact
KCMultiDialog
::
closeEvent
(
QCloseEvent
*
event
)
{
Q_D
(
KCMultiDialog
);
Q_D
(
Kontact
KCMultiDialog
);
KPageDialog
::
closeEvent
(
event
);
/**
...
...
@@ -389,9 +389,9 @@ void KCMultiDialog::closeEvent(QCloseEvent *event)
}
}
KPageWidgetItem
*
KCMultiDialog
::
addModule
(
const
KPluginMetaData
&
metaData
,
KPageWidgetItem
*
parent
)
KPageWidgetItem
*
Kontact
KCMultiDialog
::
addModule
(
const
KPluginMetaData
&
metaData
,
KPageWidgetItem
*
parent
)
{
Q_D
(
KCMultiDialog
);
Q_D
(
Kontact
KCMultiDialog
);
// Create the scroller
auto
*
moduleScroll
=
new
UnboundScrollArea
(
this
);
// Prepare the scroll area
...
...
@@ -404,7 +404,7 @@ KPageWidgetItem *KCMultiDialog::addModule(const KPluginMetaData &metaData, KPage
auto
item
=
new
KPageWidgetItem
(
moduleScroll
,
metaData
.
name
());
KCMultiDialogPrivate
::
CreatedModule
createdModule
;
Kontact
KCMultiDialogPrivate
::
CreatedModule
createdModule
;
createdModule
.
kcm
=
kcm
;
createdModule
.
item
=
item
;
d
->
modules
.
append
(
createdModule
);
...
...
@@ -440,4 +440,4 @@ KPageWidgetItem *KCMultiDialog::addModule(const KPluginMetaData &metaData, KPage
return
item
;
}
#include
"moc_kcmultidialog.cpp"
#include
"moc_
kontact
kcmultidialog.cpp"
src/ksettingsdialog/kcmultidialog.h
→
src/ksettingsdialog/
kontact
kcmultidialog.h
View file @
6c6808fa
...
...
@@ -7,8 +7,8 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef KCMULTIDIALOG_H
#define KCMULTIDIALOG_H
#ifndef
KONTACT
KCMULTIDIALOG_H
#define
KONTACT
KCMULTIDIALOG_H
#include
<QScrollArea>
#include
<QScrollBar>
...
...
@@ -16,7 +16,7 @@
#include
<KPageDialog>
#include
<KPluginMetaData>
class
KCMultiDialogPrivate
;
class
Kontact
KCMultiDialogPrivate
;
/**
* @short A class that offers a KPageDialog containing arbitrary
...
...
@@ -24,14 +24,14 @@ class KCMultiDialogPrivate;
*
* @author Matthias Elter <elter@kde.org>, Daniel Molkentin <molkentin@kde.org>
*/
class
KCMultiDialog
:
public
KPageDialog
class
Kontact
KCMultiDialog
:
public
KPageDialog
{
Q_OBJECT
Q_DECLARE_PRIVATE
(
KCMultiDialog
)
Q_DECLARE_PRIVATE
(
Kontact
KCMultiDialog
)
public:
explicit
KCMultiDialog
(
QWidget
*
parent
=
nullptr
);
~
KCMultiDialog
()
override
;
explicit
Kontact
KCMultiDialog
(
QWidget
*
parent
=
nullptr
);
~
Kontact
KCMultiDialog
()
override
;
/**
* Add a module to the dialog. Its position will be determined based on the @c X-KDE-Weight value.
...
...
@@ -62,9 +62,9 @@ protected:
/**
* This constructor can be used by subclasses to provide a custom KPageWidget.
*/
KCMultiDialog
(
KCMultiDialogPrivate
&
dd
,
KPageWidget
*
pageWidget
,
QWidget
*
parent
,
Qt
::
WindowFlags
flags
=
Qt
::
WindowFlags
());
Kontact
KCMultiDialog
(
Kontact
KCMultiDialogPrivate
&
dd
,
KPageWidget
*
pageWidget
,
QWidget
*
parent
,
Qt
::
WindowFlags
flags
=
Qt
::
WindowFlags
());
KCMultiDialogPrivate
*
const
d_ptr
;
Kontact
KCMultiDialogPrivate
*
const
d_ptr
;
void
closeEvent
(
QCloseEvent
*
event
)
override
;
void
showEvent
(
QShowEvent
*
event
)
override
;
...
...
src/ksettingsdialog/kcmultidialog_p.h
→
src/ksettingsdialog/
kontact
kcmultidialog_p.h
View file @
6c6808fa
...
...
@@ -6,26 +6,26 @@
SPDX-License-Identifier: LGPL-2.0-only
*/
#ifndef KCMULTIDIALOG_P_H
#define KCMULTIDIALOG_P_H
#ifndef
KONTACT
KCMULTIDIALOG_P_H
#define
KONTACT
KCMULTIDIALOG_P_H
#include
"kcmultidialog.h"
#include
"
kontact
kcmultidialog.h"
#include
<QList>
#include
<QStringList>
class
KCModuleProxy
;
class
KPageWidgetItem
;
class
KCMultiDialogPrivate
class
Kontact
KCMultiDialogPrivate
{
Q_DECLARE_PUBLIC
(
KCMultiDialog
)
Q_DECLARE_PUBLIC
(
Kontact
KCMultiDialog
)
protected:
KCMultiDialogPrivate
(
KCMultiDialog
*
parent
)
Kontact
KCMultiDialogPrivate
(
Kontact
KCMultiDialog
*
parent
)
:
q_ptr
(
parent
)
{
}
virtual
~
KCMultiDialogPrivate
()
virtual
~
Kontact
KCMultiDialogPrivate
()
{
}
...
...
@@ -44,7 +44,7 @@ protected:
virtual
void
_k_clientChanged
();
void
_k_dialogClosed
();
KCMultiDialog
*
const
q_ptr
;
Kontact
KCMultiDialog
*
const
q_ptr
;
private:
void
init
();
...
...
@@ -53,4 +53,4 @@ private:
bool
moduleSave
(
KCModuleProxy
*
module
);
};
#endif // KCMULTIDIALOG_P_H
#endif //
KONTACT
KCMULTIDIALOG_P_H
src/ksettingsdialog/dialog.cpp
→
src/ksettingsdialog/
kontactsettings
dialog.cpp
View file @
6c6808fa
...
...
@@ -6,8 +6,8 @@
SPDX-License-Identifier: LGPL-2.0-only
*/
#include
"dialog.h"
#include
"dialog_p.h"
#include
"
kontactsettings
dialog.h"
#include
"
kontactsettings
dialog_p.h"
#include
<KConfig>
#include
<KLocalizedString>
...
...
@@ -28,24 +28,24 @@
namespace
KSettings
{
Dialog
::
Dialog
(
QWidget
*
parent
)
:
KCMultiDialog
(
*
new
DialogPrivate
(
this
),
new
KPageWidget
,
parent
)
KontactSettingsDialog
::
KontactSettings
Dialog
(
QWidget
*
parent
)
:
Kontact
KCMultiDialog
(
*
new
KontactSettings
DialogPrivate
(
this
),
new
KPageWidget
,
parent
)
{
}
Dialog
::~
Dialog
()
KontactSettingsDialog
::~
KontactSettings
Dialog
()
{
}
void
Dialog
::
addPluginComponent
(
const
KPluginMetaData
&
parentPluginMetaData
,
const
QVector
<
KPluginMetaData
>
&
pluginMetaData
)
void
KontactSettings
Dialog
::
addPluginComponent
(
const
KPluginMetaData
&
parentPluginMetaData
,
const
QVector
<
KPluginMetaData
>
&
pluginMetaData
)
{
Q_D
(
Dialog
);
Q_D
(
KontactSettings
Dialog
);
d
->
componentsMetaData
.
append
({
parentPluginMetaData
,
pluginMetaData
});
}
void
Dialog
::
showEvent
(
QShowEvent
*
)
void
KontactSettings
Dialog
::
showEvent
(
QShowEvent
*
)
{
Q_D
(
Dialog
);
Q_D
(
KontactSettings
Dialog
);
if
(
d
->
firstshow
)
{
setUpdatesEnabled
(
false
);
d
->
createDialogFromServices
();
...
...
@@ -54,14 +54,14 @@ void Dialog::showEvent(QShowEvent *)
}
}
DialogPrivate
::
DialogPrivate
(
Dialog
*
parent
)
:
KCMultiDialogPrivate
(
parent
)
KontactSettingsDialogPrivate
::
KontactSettingsDialogPrivate
(
KontactSettings
Dialog
*
parent
)
:
Kontact
KCMultiDialogPrivate
(
parent
)
{
}
KPageWidgetItem
*
DialogPrivate
::
createPageItem
(
KPageWidgetItem
*
parentItem
,
const
QString
&
name
,
const
QString
&
comment
,
const
QString
&
iconName
)
KPageWidgetItem
*
KontactSettings
DialogPrivate
::
createPageItem
(
KPageWidgetItem
*
parentItem
,
const
QString
&
name
,
const
QString
&
comment
,
const
QString
&
iconName
)
{
Q_Q
(
Dialog
);
Q_Q
(
KontactSettings
Dialog
);
auto
page
=
new
QWidget
(
q
);
auto
iconLabel
=
new
QLabel
(
page
);
...
...
@@ -88,9 +88,9 @@ KPageWidgetItem *DialogPrivate::createPageItem(KPageWidgetItem *parentItem, cons
return
(
item
);
}
void
DialogPrivate
::
createDialogFromServices
()
void
KontactSettings
DialogPrivate
::
createDialogFromServices
()
{
Q_Q
(
Dialog
);
Q_Q
(
KontactSettings
Dialog
);
for
(
const
auto
&
pair
:
std
::
as_const
(
componentsMetaData
))
{
const
KPluginMetaData
&
parentComponentMetaData
=
pair
.
first
;
...
...
@@ -102,7 +102,7 @@ void DialogPrivate::createDialogFromServices()
}
}
QObject
::
connect
(
q
,
QOverload
<
const
QByteArray
&>::
of
(
&
KCMultiDialog
::
configCommitted
),
q
,
[](
const
QByteArray
&
componentName
)
{
QObject
::
connect
(
q
,
QOverload
<
const
QByteArray
&>::
of
(
&
Kontact
KCMultiDialog
::
configCommitted
),
q
,
[](
const
QByteArray
&
componentName
)
{
KSharedConfig
::
Ptr
config
=
KSharedConfig
::
openConfig
(
QString
::
fromLatin1
(
componentName
)
+
QLatin1String
(
"rc"
));
config
->
reparseConfiguration
();
});
...
...
@@ -110,4 +110,4 @@ void DialogPrivate::createDialogFromServices()
}
// namespace
#include
"moc_dialog.cpp"
#include
"moc_
kontactsettings
dialog.cpp"
src/ksettingsdialog/dialog.h
→
src/ksettingsdialog/
kontactsettings
dialog.h
View file @
6c6808fa
...
...
@@ -9,21 +9,21 @@
#ifndef KSETTINGS_DIALOG_H
#define KSETTINGS_DIALOG_H
#include
"
./
kcmultidialog.h"
#include
"
kontact
kcmultidialog.h"
namespace
KSettings
{
class
DialogPrivate
;
class
KontactSettings
DialogPrivate
;
class
Dialog
:
public
KCMultiDialog
class
KontactSettings
Dialog
:
public
Kontact
KCMultiDialog
{
friend
class
PageNode
;
Q_DECLARE_PRIVATE
(
Dialog
)
Q_DECLARE_PRIVATE
(
KontactSettings
Dialog
)
Q_OBJECT
public:
explicit
Dialog
(
QWidget
*
parent
=
nullptr
);
explicit
KontactSettings
Dialog
(
QWidget
*
parent
=
nullptr
);
~
Dialog
()
override
;
~
KontactSettings
Dialog
()
override
;
/**
* Adds a page with parentPluginMetaData used for title & icon of the component page and pluginMetaData for it's subpages
...
...
src/ksettingsdialog/dialog_p.h
→
src/ksettingsdialog/
kontactsettings
dialog_p.h
View file @
6c6808fa
...
...
@@ -9,9 +9,9 @@
#ifndef KSETTINGS_DIALOG_P_H
#define KSETTINGS_DIALOG_P_H
#include
"dialog.h"
#include
"kcmoduleinfo.h"
#include
"kcmultidialog_p.h"
#include
"kontactkcmultidialog_p.h"
#include
"kontactsettingsdialog.h"
#include
<QHash>
#include
<QSet>
...
...
@@ -23,12 +23,12 @@
namespace
KSettings
{
class
DialogPrivate
:
public
KCMultiDialogPrivate
class
KontactSettings
DialogPrivate
:
public
Kontact
KCMultiDialogPrivate
{
friend
class
PageNode
;
Q_DECLARE_PUBLIC
(
Dialog
)
Q_DECLARE_PUBLIC
(
KontactSettings
Dialog
)
protected:
DialogPrivate
(
Dialog
*
parent
);
KontactSettingsDialogPrivate
(
KontactSettings
Dialog
*
parent
);
QStringList
registeredComponents
;
QList
<
QPair
<
KPluginMetaData
,
QVector
<
KPluginMetaData
>>>
componentsMetaData
;
...
...
src/mainwindow.cpp
View file @
6c6808fa
...
...
@@ -714,7 +714,7 @@ void MainWindow::slotPreferences()
static
Kontact
::
KontactConfigureDialog
*
dlg
=
nullptr
;
if
(
!
dlg
)
{
dlg
=
new
Kontact
::
KontactConfigureDialog
(
this
);
connect
(
dlg
,
&
KSettings
::
Dialog
::
configCommitted
,
this
,
[
this
](
const
QByteArray
&
componentName
)
{
connect
(
dlg
,
&
KSettings
::
KontactSettings
Dialog
::
configCommitted
,
this
,
[
this
](
const
QByteArray
&
componentName
)
{
if
(
componentName
==
QByteArrayLiteral
(
"kontact"
))
{
MainWindow
::
updateConfig
();
}
...
...
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