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
PimCommon
Commits
06ae9ac5
Commit
06ae9ac5
authored
Oct 21, 2021
by
Laurent Montel
😁
Browse files
Const'ify pointer + use {}
parent
d4a00d22
Pipeline
#90264
passed with stage
in 11 minutes and 20 seconds
Changes
23
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/pimcommon/configureplugins/configurepluginslistwidget.cpp
View file @
06ae9ac5
...
...
@@ -20,12 +20,12 @@
using
namespace
PimCommon
;
ConfigurePluginsListWidget
::
ConfigurePluginsListWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mListWidget
(
new
QTreeWidget
(
this
))
{
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
mListWidget
=
new
QTreeWidget
(
this
);
mListWidget
->
setSortingEnabled
(
true
);
mListWidget
->
sortItems
(
0
,
Qt
::
AscendingOrder
);
mListWidget
->
setObjectName
(
QStringLiteral
(
"listwidget"
));
...
...
src/pimcommon/configureplugins/configurepluginslistwidget.h
View file @
06ae9ac5
...
...
@@ -68,7 +68,7 @@ protected:
void
resetToUserSettings
(
const
QVector
<
PluginItem
*>
&
items
);
void
changeState
(
const
QVector
<
PluginItem
*>
&
items
);
QTreeWidget
*
mListWidget
=
nullptr
;
QTreeWidget
*
const
mListWidget
;
private:
KTreeWidgetSearchLineWidget
*
mTreeWidgetSearchLineEdit
=
nullptr
;
...
...
src/pimcommon/configureplugins/configurepluginswidget.cpp
View file @
06ae9ac5
...
...
@@ -38,7 +38,7 @@ ConfigurePluginsWidget::~ConfigurePluginsWidget()
void
ConfigurePluginsWidget
::
initLayout
(
ConfigurePluginsListWidget
*
configurePluginListWidget
)
{
auto
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
mMessageWidget
=
new
KMessageWidget
(
i18n
(
"Restart is necessary for applying the changes."
),
this
);
mMessageWidget
->
setObjectName
(
QStringLiteral
(
"mMessageWidget"
));
...
...
src/pimcommon/logactivities/logactivitiesdialog.cpp
View file @
06ae9ac5
...
...
@@ -21,16 +21,16 @@ using namespace PimCommon;
LogActivitiesDialog
::
LogActivitiesDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
,
mLogWidget
(
new
LogActivitiesWidget
(
this
))
,
mEnableLogActivities
(
new
QCheckBox
(
i18n
(
"Log activities"
),
this
))
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Log activities"
));
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mLogWidget
=
new
LogActivitiesWidget
(
this
);
mLogWidget
->
setObjectName
(
QStringLiteral
(
"logwidget"
));
mainLayout
->
addWidget
(
mLogWidget
);
mEnableLogActivities
=
new
QCheckBox
(
i18n
(
"Log activities"
),
this
);
mEnableLogActivities
->
setObjectName
(
QStringLiteral
(
"enablelogactivities"
));
mainLayout
->
addWidget
(
mEnableLogActivities
);
connect
(
mEnableLogActivities
,
&
QCheckBox
::
toggled
,
this
,
&
LogActivitiesDialog
::
slotEnableLogActivities
);
...
...
src/pimcommon/logactivities/logactivitiesdialog.h
View file @
06ae9ac5
...
...
@@ -35,9 +35,9 @@ private:
void
slotEnableLogActivities
(
bool
state
);
void
slotActivityTextChanged
(
bool
changed
);
LogActivitiesWidget
*
mLogWidget
=
nullptr
;
LogActivitiesWidget
*
const
mLogWidget
;
QPushButton
*
mClearButton
=
nullptr
;
QCheckBox
*
mEnableLogActivities
=
nullptr
;
QCheckBox
*
const
mEnableLogActivities
;
QPushButton
*
mSaveButton
=
nullptr
;
QPushButton
*
mShareButton
=
nullptr
;
};
...
...
src/pimcommon/logactivities/logactivitieswidget.cpp
View file @
06ae9ac5
...
...
@@ -12,12 +12,12 @@ using namespace PimCommon;
LogActivitiesWidget
::
LogActivitiesWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mLog
(
new
KPIMTextEdit
::
PlainTextEditorWidget
(
this
))
{
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mLog
=
new
KPIMTextEdit
::
PlainTextEditorWidget
(
this
);
mLog
->
setObjectName
(
QStringLiteral
(
"log"
));
mLog
->
setReadOnly
(
true
);
mainLayout
->
addWidget
(
mLog
);
...
...
src/pimcommon/logactivities/logactivitieswidget.h
View file @
06ae9ac5
...
...
@@ -31,7 +31,7 @@ Q_SIGNALS:
private:
void
slotTextChanged
();
KPIMTextEdit
::
PlainTextEditorWidget
*
mLog
=
nullptr
;
KPIMTextEdit
::
PlainTextEditorWidget
*
const
mLog
;
};
}
src/pimcommon/templatewidgets/templateeditdialog.cpp
View file @
06ae9ac5
...
...
@@ -45,7 +45,7 @@ TemplateEditDialog::TemplateEditDialog(QWidget *parent, bool defaultTemplate)
mainLayout
->
addWidget
(
buttonBox
);
auto
vbox
=
new
QVBoxLayout
;
vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vbox
->
setContentsMargins
(
{}
);
auto
hbox
=
new
QHBoxLayout
;
auto
label
=
new
QLabel
(
i18n
(
"Name:"
));
...
...
src/pimcommon/translator/translatordebugdialog.cpp
View file @
06ae9ac5
...
...
@@ -17,6 +17,7 @@
TranslatorDebugDialog
::
TranslatorDebugDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
,
mEdit
(
new
KPIMTextEdit
::
PlainTextEditorWidget
(
this
))
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Translator Debug"
));
auto
mainLayout
=
new
QVBoxLayout
(
this
);
...
...
@@ -29,7 +30,6 @@ TranslatorDebugDialog::TranslatorDebugDialog(QWidget *parent)
mUser1Button
->
setText
(
i18n
(
"Save As..."
));
connect
(
mUser1Button
,
&
QPushButton
::
clicked
,
this
,
&
TranslatorDebugDialog
::
slotSaveAs
);
mEdit
=
new
KPIMTextEdit
::
PlainTextEditorWidget
(
this
);
mEdit
->
setReadOnly
(
true
);
mainLayout
->
addWidget
(
mEdit
);
mainLayout
->
addWidget
(
buttonBox
);
...
...
src/pimcommon/translator/translatordebugdialog.h
View file @
06ae9ac5
...
...
@@ -25,7 +25,7 @@ private:
void
slotSaveAs
();
void
readConfig
();
void
writeConfig
();
KPIMTextEdit
::
PlainTextEditorWidget
*
mEdit
=
nullptr
;
KPIMTextEdit
::
PlainTextEditorWidget
*
const
mEdit
;
QPushButton
*
mUser1Button
=
nullptr
;
};
src/pimcommon/translator/translatorwidget.cpp
View file @
06ae9ac5
...
...
@@ -204,7 +204,7 @@ void TranslatorWidget::init()
connect
(
d
->
abstractTranslator
,
&
PimCommon
::
GoogleTranslator
::
translateFailed
,
this
,
&
TranslatorWidget
::
slotTranslateFailed
);
auto
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
auto
hboxLayout
=
new
QHBoxLayout
;
auto
closeBtn
=
new
QToolButton
(
this
);
closeBtn
->
setObjectName
(
QStringLiteral
(
"close-button"
));
...
...
src/pimcommon/widgets/lineeditwithcompleterng.cpp
View file @
06ae9ac5
...
...
@@ -15,9 +15,9 @@ using namespace PimCommon;
#define MAX_COMPLETION_ITEMS 20
LineEditWithCompleterNg
::
LineEditWithCompleterNg
(
QWidget
*
parent
)
:
QLineEdit
(
parent
)
,
mCompleterListModel
(
new
QStringListModel
(
this
))
{
auto
completer
=
new
QCompleter
(
this
);
mCompleterListModel
=
new
QStringListModel
(
this
);
completer
->
setCaseSensitivity
(
Qt
::
CaseInsensitive
);
completer
->
setModel
(
mCompleterListModel
);
setCompleter
(
completer
);
...
...
src/pimcommon/widgets/lineeditwithcompleterng.h
View file @
06ae9ac5
...
...
@@ -31,7 +31,7 @@ public Q_SLOTS:
void
slotClearHistory
();
private:
QStringListModel
*
mCompleterListModel
=
nullptr
;
QStringListModel
*
const
mCompleterListModel
;
QStringList
mListCompetion
;
};
}
src/pimcommon/widgets/simplestringlisteditor.cpp
View file @
06ae9ac5
...
...
@@ -73,7 +73,7 @@ SimpleStringListEditor::SimpleStringListEditor(QWidget *parent,
setAddDialogLabel
(
addDialogLabel
);
setSizePolicy
(
QSizePolicy
::
MinimumExpanding
,
QSizePolicy
::
MinimumExpanding
);
auto
hlay
=
new
QHBoxLayout
(
this
);
hlay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hlay
->
setContentsMargins
(
{}
);
d
->
mListBox
=
new
QListWidget
(
this
);
...
...
src/pimcommonakonadi/acl/aclentrydialog.cpp
View file @
06ae9ac5
...
...
@@ -79,7 +79,7 @@ AclEntryDialog::AclEntryDialog(QWidget *parent)
mainLayout
->
addWidget
(
buttonBox
);
auto
layout
=
new
QGridLayout
(
page
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
auto
label
=
new
QLabel
(
i18n
(
"&User identifier:"
),
page
);
layout
->
addWidget
(
label
,
0
,
0
);
...
...
src/pimcommonakonadi/acl/collectionaclpage.cpp
View file @
06ae9ac5
...
...
@@ -40,7 +40,7 @@ CollectionAclPage::~CollectionAclPage() = default;
void
CollectionAclPage
::
init
()
{
auto
layout
=
new
QHBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
d
->
mCollectionAclWidget
=
new
CollectionAclWidget
(
this
);
layout
->
addWidget
(
d
->
mCollectionAclWidget
);
}
...
...
src/pimcommonakonadi/acl/collectionaclwidget.cpp
View file @
06ae9ac5
...
...
@@ -86,7 +86,7 @@ CollectionAclWidget::CollectionAclWidget(QWidget *parent)
auto
buttonBox
=
new
QWidget
;
auto
buttonBoxVBoxLayout
=
new
QVBoxLayout
(
buttonBox
);
buttonBoxVBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
buttonBoxVBoxLayout
->
setContentsMargins
(
{}
);
layout
->
addWidget
(
buttonBox
);
auto
button
=
new
ActionButton
(
buttonBox
);
...
...
src/pimcommonakonadi/addressline/blacklistbaloocompletion/blacklistbalooemailcompletionwidget.cpp
View file @
06ae9ac5
...
...
@@ -106,7 +106,7 @@ BlackListBalooEmailCompletionWidget::BlackListBalooEmailCompletionWidget(QWidget
searchLineLayout
->
addWidget
(
mSearchInResultLineEdit
);
auto
excludeDomainLayout
=
new
QHBoxLayout
;
excludeDomainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
excludeDomainLayout
->
setContentsMargins
(
{}
);
mainLayout
->
addLayout
(
excludeDomainLayout
);
auto
excludeDomainLabel
=
new
QLabel
(
i18n
(
"Exclude domain names:"
),
this
);
...
...
src/pimcommonakonadi/addressline/completionorder/completionorderwidget.cpp
View file @
06ae9ac5
...
...
@@ -235,7 +235,7 @@ CompletionOrderWidget::CompletionOrderWidget(QWidget *parent)
auto
page
=
new
QWidget
(
this
);
auto
pageHBoxLayout
=
new
QHBoxLayout
(
page
);
pageHBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
pageHBoxLayout
->
setContentsMargins
(
{}
);
hbox
->
addWidget
(
page
);
mListView
=
new
QTreeWidget
(
page
);
mListView
->
setObjectName
(
QStringLiteral
(
"listview"
));
...
...
@@ -250,7 +250,7 @@ CompletionOrderWidget::CompletionOrderWidget(QWidget *parent)
auto
upDownBox
=
new
QWidget
(
page
);
auto
upDownBoxVBoxLayout
=
new
QVBoxLayout
(
upDownBox
);
upDownBoxVBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
upDownBoxVBoxLayout
->
setContentsMargins
(
{}
);
pageHBoxLayout
->
addWidget
(
upDownBox
);
mUpButton
=
new
QPushButton
(
upDownBox
);
upDownBoxVBoxLayout
->
addWidget
(
mUpButton
);
...
...
src/pimcommonakonadi/folderdialog/checkedcollectionwidget.cpp
View file @
06ae9ac5
...
...
@@ -40,7 +40,7 @@ CheckedCollectionWidget::CheckedCollectionWidget(const QString &mimetype, QWidge
,
d
(
new
PimCommon
::
CheckedCollectionWidgetPrivate
)
{
auto
vbox
=
new
QVBoxLayout
(
this
);
vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vbox
->
setContentsMargins
(
{}
);
// Create a new change recorder.
auto
monitor
=
new
Akonadi
::
Monitor
(
this
);
...
...
Prev
1
2
Next
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