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
PIM MailCommon
Commits
6572d149
Commit
6572d149
authored
Aug 30, 2021
by
Laurent Montel
😁
Browse files
Use qOverload directly (scripted)
parent
f7059877
Pipeline
#77324
passed with stage
in 32 minutes and 38 seconds
Changes
17
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/filter/dialog/selectthunderbirdfilterfileswidget.cpp
View file @
6572d149
...
...
@@ -18,8 +18,8 @@ SelectThunderbirdFilterFilesWidget::SelectThunderbirdFilterFilesWidget(const QSt
,
ui
(
new
Ui
::
SelectThunderbirdFilterFilesWidget
)
{
ui
->
setupUi
(
this
);
connect
(
ui
->
buttonGroup
,
Q
Overload
<
QAbstractButton
*>
::
of
(
&
QButtonGroup
::
buttonClicked
),
this
,
&
SelectThunderbirdFilterFilesWidget
::
slotButtonClicked
);
connect
(
ui
->
profiles
,
Q
Overload
<
int
>
::
of
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
SelectThunderbirdFilterFilesWidget
::
slotProfileChanged
);
connect
(
ui
->
buttonGroup
,
q
Overload
<
QAbstractButton
*>
(
&
QButtonGroup
::
buttonClicked
),
this
,
&
SelectThunderbirdFilterFilesWidget
::
slotButtonClicked
);
connect
(
ui
->
profiles
,
q
Overload
<
int
>
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
SelectThunderbirdFilterFilesWidget
::
slotProfileChanged
);
ui
->
listFiles
->
setSelectionMode
(
QAbstractItemView
::
MultiSelection
);
QString
defaultProfile
;
...
...
src/filter/filteractions/filteractionaddheader.cpp
View file @
6572d149
...
...
@@ -85,7 +85,7 @@ QWidget *FilterActionAddHeader::createParamWidget(QWidget *parent) const
layout
->
addWidget
(
lineEdit
,
1
);
setParamWidgetValue
(
widget
);
connect
(
comboBox
,
Q
Overload
<
int
>
::
of
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionAddHeader
::
filterActionModified
);
connect
(
comboBox
,
q
Overload
<
int
>
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionAddHeader
::
filterActionModified
);
connect
(
comboBox
->
lineEdit
(),
&
QLineEdit
::
textChanged
,
this
,
&
FilterAction
::
filterActionModified
);
connect
(
lineEdit
,
&
QLineEdit
::
textChanged
,
this
,
&
FilterActionAddHeader
::
filterActionModified
);
...
...
src/filter/filteractions/filteractionaddtag.cpp
View file @
6572d149
...
...
@@ -39,7 +39,7 @@ QWidget *FilterActionAddTag::createParamWidget(QWidget *parent) const
}
setParamWidgetValue
(
mComboBox
);
connect
(
mComboBox
,
Q
Overload
<
int
>
::
of
(
&
QComboBox
::
currentIndexChanged
),
this
,
&
FilterActionAddTag
::
filterActionModified
);
connect
(
mComboBox
,
q
Overload
<
int
>
(
&
QComboBox
::
currentIndexChanged
),
this
,
&
FilterActionAddTag
::
filterActionModified
);
return
mComboBox
;
}
...
...
src/filter/filteractions/filteractionaddtoaddressbook.cpp
View file @
6572d149
...
...
@@ -132,8 +132,8 @@ QWidget *FilterActionAddToAddressBook::createParamWidget(QWidget *parent) const
i18n
(
"This defines the preferred address book.
\n
"
"If it is not accessible, the filter will fallback to the default address book."
));
layout
->
addWidget
(
collectionComboBox
,
1
,
2
);
connect
(
headerCombo
,
Q
Overload
<
int
>
::
of
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionAddToAddressBook
::
filterActionModified
);
connect
(
collectionComboBox
,
Q
Overload
<
int
>
::
of
(
&
Akonadi
::
CollectionComboBox
::
activated
),
this
,
&
FilterActionAddToAddressBook
::
filterActionModified
);
connect
(
headerCombo
,
q
Overload
<
int
>
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionAddToAddressBook
::
filterActionModified
);
connect
(
collectionComboBox
,
q
Overload
<
int
>
(
&
Akonadi
::
CollectionComboBox
::
activated
),
this
,
&
FilterActionAddToAddressBook
::
filterActionModified
);
connect
(
categoryEdit
,
&
Akonadi
::
TagWidget
::
selectionChanged
,
this
,
&
FilterActionAddToAddressBook
::
filterActionModified
);
setParamWidgetValue
(
widget
);
...
...
@@ -203,7 +203,7 @@ void FilterActionAddToAddressBook::applyParamWidgetValue(QWidget *paramWidget)
if
(
collection
.
isValid
())
{
mCollectionId
=
collection
.
id
();
connect
(
collectionComboBox
,
Q
Overload
<
int
>
::
of
(
&
Akonadi
::
CollectionComboBox
::
currentIndexChanged
),
q
Overload
<
int
>
(
&
Akonadi
::
CollectionComboBox
::
currentIndexChanged
),
this
,
&
FilterActionAddToAddressBook
::
filterActionModified
);
}
else
{
...
...
src/filter/filteractions/filteractionforward.cpp
View file @
6572d149
...
...
@@ -110,7 +110,7 @@ QWidget *FilterActionForward::createParamWidget(QWidget *parent) const
templateCombo
->
setEnabled
(
templateCombo
->
count
()
>
1
);
templateCombo
->
setToolTip
(
i18n
(
"The template used when forwarding"
));
templateCombo
->
setWhatsThis
(
i18n
(
"Set the forwarding template that will be used with this filter."
));
connect
(
templateCombo
,
Q
Overload
<
int
>
::
of
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionForward
::
filterActionModified
);
connect
(
templateCombo
,
q
Overload
<
int
>
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionForward
::
filterActionModified
);
connect
(
addressRequester
,
&
Akonadi
::
EmailAddressRequester
::
textChanged
,
this
,
&
FilterActionForward
::
filterActionModified
);
return
addressAndTemplate
;
...
...
src/filter/filteractions/filteractionremoveheader.cpp
View file @
6572d149
...
...
@@ -34,7 +34,7 @@ QWidget *FilterActionRemoveHeader::createParamWidget(QWidget *parent) const
comboBox
->
setMinimumWidth
(
50
);
comboBox
->
setInsertPolicy
(
QComboBox
::
InsertAtBottom
);
setParamWidgetValue
(
comboBox
);
connect
(
comboBox
,
Q
Overload
<
int
>
::
of
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionRemoveHeader
::
filterActionModified
);
connect
(
comboBox
,
q
Overload
<
int
>
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionRemoveHeader
::
filterActionModified
);
connect
(
comboBox
->
lineEdit
(),
&
QLineEdit
::
textChanged
,
this
,
&
FilterAction
::
filterActionModified
);
return
comboBox
;
...
...
src/filter/filteractions/filteractionrewriteheader.cpp
View file @
6572d149
...
...
@@ -130,7 +130,7 @@ QWidget *FilterActionRewriteHeader::createParamWidget(QWidget *parent) const
layout
->
addWidget
(
lineEdit
,
1
);
setParamWidgetValue
(
widget
);
connect
(
comboBox
,
Q
Overload
<
int
>
::
of
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionRewriteHeader
::
filterActionModified
);
connect
(
comboBox
,
q
Overload
<
int
>
(
&
KComboBox
::
currentIndexChanged
),
this
,
&
FilterActionRewriteHeader
::
filterActionModified
);
connect
(
comboBox
->
lineEdit
(),
&
QLineEdit
::
textChanged
,
this
,
&
FilterAction
::
filterActionModified
);
connect
(
regExpLineEdit
,
&
KLineEdit
::
textChanged
,
this
,
&
FilterActionRewriteHeader
::
filterActionModified
);
connect
(
lineEdit
,
&
KLineEdit
::
textChanged
,
this
,
&
FilterActionRewriteHeader
::
filterActionModified
);
...
...
src/filter/filteractions/filteractionsetidentity.cpp
View file @
6572d149
...
...
@@ -93,7 +93,7 @@ QWidget *FilterActionSetIdentity::createParamWidget(QWidget *parent) const
comboBox
->
setObjectName
(
QStringLiteral
(
"identitycombobox"
));
comboBox
->
setCurrentIdentity
(
mParameter
);
connect
(
comboBox
,
Q
Overload
<
int
>
::
of
(
&
KIdentityManagement
::
IdentityCombo
::
currentIndexChanged
),
this
,
&
FilterActionSetIdentity
::
filterActionModified
);
connect
(
comboBox
,
q
Overload
<
int
>
(
&
KIdentityManagement
::
IdentityCombo
::
currentIndexChanged
),
this
,
&
FilterActionSetIdentity
::
filterActionModified
);
return
comboBox
;
}
...
...
src/filter/filteractions/filteractionsettransport.cpp
View file @
6572d149
...
...
@@ -28,10 +28,7 @@ QWidget *FilterActionSetTransport::createParamWidget(QWidget *parent) const
auto
transportCombobox
=
new
MailTransport
::
TransportComboBox
(
parent
);
transportCombobox
->
setObjectName
(
QStringLiteral
(
"transportcombobox"
));
setParamWidgetValue
(
transportCombobox
);
connect
(
transportCombobox
,
QOverload
<
int
>::
of
(
&
MailTransport
::
TransportComboBox
::
currentIndexChanged
),
this
,
&
FilterActionSetTransport
::
filterActionModified
);
connect
(
transportCombobox
,
qOverload
<
int
>
(
&
MailTransport
::
TransportComboBox
::
currentIndexChanged
),
this
,
&
FilterActionSetTransport
::
filterActionModified
);
return
transportCombobox
;
}
...
...
src/filter/filteractions/filteractionwidget.cpp
View file @
6572d149
...
...
@@ -152,11 +152,11 @@ FilterActionWidget::FilterActionWidget(QWidget *parent)
setFocusProxy
(
d
->
mComboBox
);
// now connect the combo box and the widget stack
connect
(
d
->
mComboBox
,
Q
Overload
<
int
>
::
of
(
&
QComboBox
::
activated
),
this
,
[
this
](
int
index
)
{
connect
(
d
->
mComboBox
,
q
Overload
<
int
>
(
&
QComboBox
::
activated
),
this
,
[
this
](
int
index
)
{
d
->
slotFilterTypeChanged
(
index
);
});
connect
(
d
->
mComboBox
,
Q
Overload
<
int
>
::
of
(
&
QComboBox
::
activated
),
this
,
&
FilterActionWidget
::
filterModified
);
connect
(
d
->
mComboBox
,
q
Overload
<
int
>
(
&
QComboBox
::
activated
),
this
,
&
FilterActionWidget
::
filterModified
);
connect
(
d
->
mAdd
,
&
QPushButton
::
clicked
,
this
,
[
this
]()
{
d
->
slotAddWidget
();
...
...
src/filter/filteractions/filteractionwithstringlist.cpp
View file @
6572d149
...
...
@@ -24,7 +24,7 @@ QWidget *FilterActionWithStringList::createParamWidget(QWidget *parent) const
comboBox
->
setEditable
(
false
);
comboBox
->
addItems
(
mParameterList
);
setParamWidgetValue
(
comboBox
);
connect
(
comboBox
,
Q
Overload
<
int
>
::
of
(
&
QComboBox
::
currentIndexChanged
),
this
,
&
FilterActionWithStringList
::
filterActionModified
);
connect
(
comboBox
,
q
Overload
<
int
>
(
&
QComboBox
::
currentIndexChanged
),
this
,
&
FilterActionWithStringList
::
filterActionModified
);
return
comboBox
;
}
...
...
src/filter/kmfilterdialog.cpp
View file @
6572d149
...
...
@@ -347,8 +347,8 @@ KMFilterDialog::KMFilterDialog(const QList<KActionCollection *> &actionCollectio
connect
(
mFilterList
,
&
KMFilterListBox
::
filterUpdated
,
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mFilterList
,
&
KMFilterListBox
::
filterOrderAltered
,
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mPatternEdit
,
&
MailCommon
::
SearchPatternEdit
::
patternChanged
,
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mActionLister
,
Q
Overload
<
QWidget
*>
::
of
(
&
FilterActionWidgetLister
::
widgetAdded
),
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mActionLister
,
Q
Overload
<
QWidget
*>
::
of
(
&
FilterActionWidgetLister
::
widgetRemoved
),
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mActionLister
,
q
Overload
<
QWidget
*>
(
&
FilterActionWidgetLister
::
widgetAdded
),
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mActionLister
,
q
Overload
<
QWidget
*>
(
&
FilterActionWidgetLister
::
widgetRemoved
),
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mActionLister
,
&
MailCommon
::
FilterActionWidgetLister
::
filterModified
,
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
connect
(
mActionLister
,
&
MailCommon
::
FilterActionWidgetLister
::
clearWidgets
,
this
,
&
KMFilterDialog
::
slotDialogUpdated
);
KConfigGroup
myGroup
(
KernelIf
->
config
(),
"Geometry"
);
...
...
src/filter/tests/filterimporterexportergui.cpp
View file @
6572d149
...
...
@@ -56,7 +56,7 @@ FilterImporterExporterGui::FilterImporterExporterGui(QWidget *parent)
act
=
new
QAction
(
QStringLiteral
(
"GMail filters"
),
this
);
act
->
setData
(
QVariant
::
fromValue
(
MailCommon
::
FilterImporterExporter
::
GmailFilter
));
menuFilter
->
addAction
(
act
);
connect
(
menuFilter
,
Q
Overload
<
QAction
*>
::
of
(
&
QMenu
::
triggered
),
this
,
&
FilterImporterExporterGui
::
slotImportFilter
);
connect
(
menuFilter
,
q
Overload
<
QAction
*>
(
&
QMenu
::
triggered
),
this
,
&
FilterImporterExporterGui
::
slotImportFilter
);
mTextEdit
=
new
QTextEdit
;
mTextEdit
->
setReadOnly
(
true
);
...
...
src/folder/folderselectiondialog.cpp
View file @
6572d149
...
...
@@ -110,7 +110,7 @@ FolderSelectionDialog::FolderSelectionDialog(QWidget *parent, SelectionFolderOpt
connect
(
d
->
folderTreeWidget
->
folderTreeWidgetProxyModel
(),
&
QAbstractItemModel
::
rowsInserted
,
this
,
&
FolderSelectionDialog
::
rowsInserted
);
connect
(
d
->
folderTreeWidget
->
folderTreeView
(),
Q
Overload
<
const
QModelIndex
&>
::
of
(
&
QAbstractItemView
::
doubleClicked
),
q
Overload
<
const
QModelIndex
&>
(
&
QAbstractItemView
::
doubleClicked
),
this
,
&
FolderSelectionDialog
::
slotDoubleClick
);
...
...
src/folder/foldersettings.cpp
View file @
6572d149
...
...
@@ -57,7 +57,7 @@ FolderSettings::FolderSettings(const Akonadi::Collection &col, bool writeconfig)
mIdentity
=
KernelIf
->
identityManager
()
->
defaultIdentity
().
uoid
();
readConfig
();
connect
(
KernelIf
->
identityManager
(),
Q
Overload
<>
::
of
(
&
KIdentityManagement
::
IdentityManager
::
changed
),
this
,
&
FolderSettings
::
slotIdentitiesChanged
);
connect
(
KernelIf
->
identityManager
(),
q
Overload
<>
(
&
KIdentityManagement
::
IdentityManager
::
changed
),
this
,
&
FolderSettings
::
slotIdentitiesChanged
);
}
FolderSettings
::~
FolderSettings
()
...
...
src/search/searchpatternedit.cpp
View file @
6572d149
...
...
@@ -613,7 +613,7 @@ void SearchPatternEdit::initLayout(SearchPatternEditOptions options, SearchModeT
}
//------------connect a few signals
connect
(
bg
,
Q
Overload
<
QAbstractButton
*>
::
of
(
&
QButtonGroup
::
buttonClicked
),
this
,
&
SearchPatternEdit
::
slotRadioClicked
);
connect
(
bg
,
q
Overload
<
QAbstractButton
*>
(
&
QButtonGroup
::
buttonClicked
),
this
,
&
SearchPatternEdit
::
slotRadioClicked
);
//------------the list of SearchRuleWidget's
mRuleLister
=
new
SearchRuleWidgetLister
(
this
,
options
,
modeType
);
...
...
@@ -632,8 +632,8 @@ void SearchPatternEdit::initLayout(SearchPatternEditOptions options, SearchModeT
qCDebug
(
MAILCOMMON_LOG
)
<<
"No first SearchRuleWidget, though slotClear() has been called!"
;
}
connect
(
mRuleLister
,
Q
Overload
<
QWidget
*>
::
of
(
&
SearchRuleWidgetLister
::
widgetAdded
),
this
,
&
SearchPatternEdit
::
slotRuleAdded
);
connect
(
mRuleLister
,
Q
Overload
<>
::
of
(
&
SearchRuleWidgetLister
::
widgetRemoved
),
this
,
&
SearchPatternEdit
::
patternChanged
);
connect
(
mRuleLister
,
q
Overload
<
QWidget
*>
(
&
SearchRuleWidgetLister
::
widgetAdded
),
this
,
&
SearchPatternEdit
::
slotRuleAdded
);
connect
(
mRuleLister
,
q
Overload
<>
(
&
SearchRuleWidgetLister
::
widgetRemoved
),
this
,
&
SearchPatternEdit
::
patternChanged
);
connect
(
mRuleLister
,
&
KPIM
::
KWidgetLister
::
clearWidgets
,
this
,
&
SearchPatternEdit
::
patternChanged
);
layout
->
addRow
(
mRuleLister
);
...
...
src/snippets/snippetwidget.cpp
View file @
6572d149
...
...
@@ -62,7 +62,7 @@ SnippetWidget::SnippetWidget(QWidget *parent)
Q_EMIT
textChanged
(
str
);
d
->
wasChanged
=
true
;
});
connect
(
d
->
mUi
.
groupBox
,
Q
Overload
<
int
>
::
of
(
&
QComboBox
::
currentIndexChanged
),
this
,
[
this
](
int
index
)
{
connect
(
d
->
mUi
.
groupBox
,
q
Overload
<
int
>
(
&
QComboBox
::
currentIndexChanged
),
this
,
[
this
](
int
index
)
{
Q_EMIT
groupChanged
(
index
);
d
->
wasChanged
=
true
;
});
...
...
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