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
KAddressBook
Commits
a6ce1b74
Commit
a6ce1b74
authored
Mar 08, 2022
by
Laurent Montel
😁
Browse files
const'ify pointer
parent
1a17bfcd
Pipeline
#146771
failed with stage
in 54 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kontactplugin/kaddressbook_plugin.h
View file @
a6ce1b74
...
...
@@ -33,7 +33,7 @@ class KAddressBookPlugin : public KontactInterface::Plugin
Q_OBJECT
public:
KAddressBookPlugin
(
KontactInterface
::
Core
*
core
,
const
QVariantList
&
);
explicit
KAddressBookPlugin
(
KontactInterface
::
Core
*
core
,
const
QVariantList
&
);
~
KAddressBookPlugin
()
override
;
bool
isRunningStandalone
()
const
override
;
...
...
src/contactswitcher.cpp
View file @
a6ce1b74
...
...
@@ -15,18 +15,18 @@
ContactSwitcher
::
ContactSwitcher
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mNextButton
(
new
QPushButton
(
i18nc
(
"@action:button Next contact"
,
"Next"
),
this
))
,
mPreviousButton
(
new
QPushButton
(
i18nc
(
"@action:button Previous contact"
,
"Previous"
),
this
))
,
mStatusLabel
(
new
QLabel
(
this
))
{
auto
layout
=
new
QHBoxLayout
(
this
);
mPreviousButton
=
new
QPushButton
(
i18nc
(
"@action:button Previous contact"
,
"Previous"
));
mPreviousButton
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Move to the previous contact in the list"
));
mPreviousButton
->
setWhatsThis
(
i18nc
(
"@info:whatsthis"
,
"Press this button to move to the previous contact in the list."
));
mNextButton
=
new
QPushButton
(
i18nc
(
"@action:button Next contact"
,
"Next"
));
mNextButton
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Move to the next contact in the list"
));
mNextButton
->
setWhatsThis
(
i18nc
(
"@info:whatsthis"
,
"Press this button to move to the next contact in the list."
));
mStatusLabel
=
new
QLabel
();
layout
->
addWidget
(
mPreviousButton
);
layout
->
addWidget
(
mNextButton
);
...
...
src/contactswitcher.h
View file @
a6ce1b74
...
...
@@ -55,8 +55,8 @@ private:
void
updateStatus
();
QAbstractItemView
*
mView
=
nullptr
;
QPushButton
*
mNextButton
=
nullptr
;
QPushButton
*
mPreviousButton
=
nullptr
;
QLabel
*
mStatusLabel
=
nullptr
;
QPushButton
*
const
mNextButton
;
QPushButton
*
const
mPreviousButton
;
QLabel
*
const
mStatusLabel
;
};
src/globalcontactmodel.cpp
View file @
a6ce1b74
...
...
@@ -20,14 +20,14 @@
GlobalContactModel
*
GlobalContactModel
::
mInstance
=
nullptr
;
GlobalContactModel
::
GlobalContactModel
()
:
mSession
(
new
Akonadi
::
Session
(
"KAddressBook::GlobalContactSession"
))
,
mMonitor
(
new
Akonadi
::
ChangeRecorder
)
{
mSession
=
new
Akonadi
::
Session
(
"KAddressBook::GlobalContactSession"
);
Akonadi
::
ItemFetchScope
scope
;
scope
.
fetchFullPayload
(
true
);
scope
.
fetchAttribute
<
Akonadi
::
EntityDisplayAttribute
>
();
mMonitor
=
new
Akonadi
::
ChangeRecorder
;
mMonitor
->
setSession
(
mSession
);
mMonitor
->
fetchCollection
(
true
);
mMonitor
->
setItemFetchScope
(
scope
);
...
...
src/globalcontactmodel.h
View file @
a6ce1b74
...
...
@@ -45,8 +45,8 @@ private:
static
GlobalContactModel
*
mInstance
;
Akonadi
::
Session
*
mSession
=
nullptr
;
Akonadi
::
ChangeRecorder
*
mMonitor
=
nullptr
;
Akonadi
::
Session
*
const
mSession
;
Akonadi
::
ChangeRecorder
*
const
mMonitor
;
Akonadi
::
ContactsTreeModel
*
mModel
=
nullptr
;
};
src/kaddressbookpart.h
View file @
a6ce1b74
...
...
@@ -19,7 +19,7 @@ class KAddressBookPart : public KParts::Part
Q_OBJECT
public:
KAddressBookPart
(
QWidget
*
parentWidget
,
QObject
*
parent
,
const
QVariantList
&
);
explicit
KAddressBookPart
(
QWidget
*
parentWidget
,
QObject
*
parent
,
const
QVariantList
&
);
~
KAddressBookPart
()
override
;
public
Q_SLOTS
:
...
...
src/mainwidget.cpp
View file @
a6ce1b74
...
...
@@ -131,11 +131,7 @@ public:
MainWidget
::
MainWidget
(
KXMLGUIClient
*
guiClient
,
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mAllContactsModel
(
nullptr
)
,
mXmlGuiClient
(
guiClient
)
,
mGrantleeThemeManager
(
nullptr
)
,
mQuickSearchAction
(
nullptr
)
,
mServerSideSubscription
(
nullptr
)
{
(
void
)
new
KaddressbookAdaptor
(
this
);
QDBusConnection
::
sessionBus
().
registerObject
(
QStringLiteral
(
"/KAddressBook"
),
this
);
...
...
src/mainwindow.cpp
View file @
a6ce1b74
...
...
@@ -29,8 +29,8 @@
MainWindow
::
MainWindow
()
:
KXmlGuiWindow
(
nullptr
)
,
mMainWidget
(
new
MainWidget
(
this
,
this
))
{
mMainWidget
=
new
MainWidget
(
this
,
this
);
setCentralWidget
(
mMainWidget
);
...
...
src/mainwindow.h
View file @
a6ce1b74
...
...
@@ -33,7 +33,7 @@ private:
void
initActions
();
void
updateHamburgerMenu
();
MainWidget
*
mMainWidget
=
nullptr
;
MainWidget
*
const
mMainWidget
;
KToggleAction
*
mShowMenuBarAction
=
nullptr
;
KHamburgerMenu
*
mHamburgerMenu
=
nullptr
;
};
...
...
src/printing/detailled/detailledstyle.cpp
View file @
a6ce1b74
...
...
@@ -138,7 +138,7 @@ QString contactsToHtml(const KContacts::Addressee::List &contacts, const ColorSe
}
block
.
header
+=
QLatin1Char
(
':'
);
block
.
entries
=
address
.
formatted
Address
(
).
split
(
QLatin1Char
(
'\n'
),
Qt
::
KeepEmptyParts
);
block
.
entries
=
address
.
formatted
(
KContacts
::
AddressFormatStyle
::
Postal
).
split
(
QLatin1Char
(
'\n'
),
Qt
::
KeepEmptyParts
);
blocks
.
append
(
block
);
}
}
...
...
src/printing/ringbinder/ringbinderstyle.cpp
View file @
a6ce1b74
...
...
@@ -78,8 +78,9 @@ static QString contactsToHtml(const KContacts::Addressee::List &contacts, int fi
if
(
fields
&
Addresses
)
{
const
KContacts
::
Address
::
List
addresses
=
contact
.
addresses
();
for
(
const
KContacts
::
Address
&
address
:
addresses
)
{
const
QString
data
=
address
.
formattedAddress
().
replace
(
QLatin1String
(
"
\n\n
"
),
QStringLiteral
(
"
\n
"
)).
replace
(
QLatin1Char
(
'\n'
),
QStringLiteral
(
"<br/>"
));
const
QString
data
=
address
.
formatted
(
KContacts
::
AddressFormatStyle
::
Postal
)
.
replace
(
QLatin1String
(
"
\n\n
"
),
QStringLiteral
(
"
\n
"
))
.
replace
(
QLatin1Char
(
'\n'
),
QStringLiteral
(
"<br/>"
));
const
QString
subBlock
=
QLatin1String
(
"<p style=
\"
margin-top: 0px; margin-left: 20px
\"
>"
)
+
data
+
QLatin1String
(
"</p>"
);
leftBlock
.
append
(
subBlock
);
...
...
src/widgets/quicksearchwidget.cpp
View file @
a6ce1b74
...
...
@@ -20,11 +20,12 @@ using namespace std::chrono_literals;
QuickSearchWidget
::
QuickSearchWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mEdit
(
new
QLineEdit
(
this
))
,
mTimer
(
new
QTimer
(
this
))
{
auto
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
({});
mEdit
=
new
QLineEdit
(
this
);
// If change shortcut changes it in mainwidget
mEdit
->
setClearButtonEnabled
(
true
);
mEdit
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Search contacts in list"
));
...
...
@@ -36,7 +37,6 @@ QuickSearchWidget::QuickSearchWidget(QWidget *parent)
layout
->
addWidget
(
mEdit
);
mTimer
=
new
QTimer
(
this
);
connect
(
mEdit
,
&
QLineEdit
::
textChanged
,
this
,
&
QuickSearchWidget
::
resetTimer
);
connect
(
mTimer
,
&
QTimer
::
timeout
,
this
,
&
QuickSearchWidget
::
delayedTextChanged
);
...
...
src/widgets/quicksearchwidget.h
View file @
a6ce1b74
...
...
@@ -72,7 +72,7 @@ protected:
private:
void
resetTimer
();
void
delayedTextChanged
();
QLineEdit
*
mEdit
=
nullptr
;
QTimer
*
mTimer
=
nullpt
r
;
QLineEdit
*
const
mEdit
;
QTimer
*
const
mTime
r
;
};
Write
Preview
Markdown
is supported
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