Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
libkdepim
Commits
3425d290
Commit
3425d290
authored
Jun 11, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor optimization
parent
86f23452
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/libkdepimakonadi/addressline/completionorder/completionorderwidget.cpp
...adi/addressline/completionorder/completionorderwidget.cpp
+1
-2
src/libkdepimakonadi/addressline/recentaddress/recentaddresswidget.cpp
...akonadi/addressline/recentaddress/recentaddresswidget.cpp
+4
-3
No files found.
src/libkdepimakonadi/addressline/completionorder/completionorderwidget.cpp
View file @
3425d290
...
...
@@ -238,8 +238,7 @@ CompletionOrderWidget::CompletionOrderWidget(QWidget *parent)
new
CompletionOrderEditorAdaptor
(
this
);
QDBusConnection
::
sessionBus
().
registerObject
(
QStringLiteral
(
"/"
),
this
,
QDBusConnection
::
ExportAdaptors
);
QHBoxLayout
*
hbox
=
new
QHBoxLayout
;
setLayout
(
hbox
);
QHBoxLayout
*
hbox
=
new
QHBoxLayout
(
this
);
QWidget
*
page
=
new
QWidget
(
this
);
QHBoxLayout
*
pageHBoxLayout
=
new
QHBoxLayout
(
page
);
...
...
src/libkdepimakonadi/addressline/recentaddress/recentaddresswidget.cpp
View file @
3425d290
...
...
@@ -83,7 +83,7 @@ RecentAddressWidget::~RecentAddressWidget()
void
RecentAddressWidget
::
slotTypedSomething
(
const
QString
&
text
)
{
if
(
mListView
->
currentItem
())
{
if
(
mListView
->
currentItem
()
->
text
()
!=
mLineEdit
->
text
()
&&
!
mLineEdit
->
text
().
isEmpty
()
)
{
if
(
!
mLineEdit
->
text
().
isEmpty
()
&&
mListView
->
currentItem
()
->
text
()
!=
mLineEdit
->
text
())
{
// IMHO changeItem() shouldn't do anything with the value
// of currentItem() ... like changing it or emitting signals ...
// but TT disagree with me on this one (it's been that way since ages ... grrr)
...
...
@@ -136,8 +136,9 @@ void RecentAddressWidget::updateButtonState()
QList
<
QListWidgetItem
*>
selectedItems
=
mListView
->
selectedItems
();
const
int
numberOfElementSelected
(
selectedItems
.
count
());
mRemoveButton
->
setEnabled
(
numberOfElementSelected
);
mNewButton
->
setEnabled
(
numberOfElementSelected
<=
1
);
mLineEdit
->
setEnabled
(
numberOfElementSelected
<=
1
);
bool
enableElement
=
(
numberOfElementSelected
<=
1
);
mNewButton
->
setEnabled
(
enableElement
);
mLineEdit
->
setEnabled
(
enableElement
);
if
(
numberOfElementSelected
==
1
)
{
const
QString
text
=
mListView
->
currentItem
()
->
text
();
...
...
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