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
KOrganizer
Commits
e071cde4
Commit
e071cde4
authored
Oct 12, 2020
by
Laurent Montel
😁
Browse files
Modernize code
parent
0d9426cc
Changes
18
Hide whitespace changes
Inline
Side-by-side
korgac/alarmdialog.cpp
View file @
e071cde4
...
...
@@ -260,7 +260,7 @@ AlarmDialog::AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *par
QWidget
*
suspendBox
=
new
QWidget
(
topBox
);
QHBoxLayout
*
suspendBoxHBoxLayout
=
new
QHBoxLayout
(
suspendBox
);
suspendBoxHBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
suspendBoxHBoxLayout
->
setContentsMargins
(
{}
);
topLayout
->
addWidget
(
suspendBox
);
QLabel
*
l
=
new
QLabel
(
i18nc
(
"@label:spinbox"
,
"Suspend &duration:"
),
suspendBox
);
...
...
src/actionmanager.cpp
View file @
e071cde4
...
...
@@ -221,7 +221,6 @@ void ActionManager::createCalendarAkonadi()
void
ActionManager
::
initActions
()
{
QAction
*
action
=
nullptr
;
/*************************** FILE MENU **********************************/
...
...
@@ -257,6 +256,7 @@ void ActionManager::initActions()
mACollection
->
addAction
(
QStringLiteral
(
"import_icalendar"
),
mImportAction
);
connect
(
mImportAction
,
&
QAction
::
triggered
,
this
,
&
ActionManager
::
file_import
);
QAction
*
action
=
nullptr
;
/** Get Hot New Stuff Action **/
//TODO: Icon
if
(
KAuthorized
::
authorize
(
QStringLiteral
(
"ghns"
)))
{
...
...
src/akonadicollectionview.cpp
View file @
e071cde4
...
...
@@ -111,7 +111,7 @@ private Q_SLOTS:
}
private:
QAbstractItemModel
*
mCheckableProxy
=
nullptr
;
QAbstractItemModel
*
const
mCheckableProxy
;
};
/**
...
...
@@ -409,7 +409,7 @@ AkonadiCollectionView::AkonadiCollectionView(CalendarView *view, bool hasContext
mManagerShowCollectionProperties
=
new
ManageShowCollectionProperties
(
this
,
this
);
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
topLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
setContentsMargins
(
{}
);
QLineEdit
*
searchCol
=
new
QLineEdit
(
this
);
searchCol
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Set search keyword"
));
...
...
src/calendarview.cpp
View file @
e071cde4
...
...
@@ -135,7 +135,7 @@ CalendarView::CalendarView(QWidget *parent)
mDateChecker
=
new
DateChecker
(
this
);
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
topLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
setContentsMargins
(
{}
);
// create the main layout frames.
mPanner
=
new
QSplitter
(
Qt
::
Horizontal
,
this
);
...
...
@@ -157,15 +157,15 @@ CalendarView::CalendarView(QWidget *parent)
mEventViewerBox
=
new
QWidget
(
mLeftSplitter
);
QVBoxLayout
*
mEventViewerBoxVBoxLayout
=
new
QVBoxLayout
(
mEventViewerBox
);
mEventViewerBoxVBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mEventViewerBoxVBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mEventViewerBoxVBoxLayout
->
setContentsMargins
(
{}
);
mEventViewerBoxVBoxLayout
->
setContentsMargins
(
{}
);
mEventViewer
=
new
CalendarSupport
::
IncidenceViewer
(
mCalendar
.
data
(),
mEventViewerBox
);
mEventViewer
->
setObjectName
(
QStringLiteral
(
"EventViewer"
));
mEventViewerBoxVBoxLayout
->
addWidget
(
mEventViewer
);
QWidget
*
rightBox
=
new
QWidget
(
mPanner
);
QVBoxLayout
*
rightBoxVBoxLayout
=
new
QVBoxLayout
(
rightBox
);
rightBoxVBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
rightBoxVBoxLayout
->
setContentsMargins
(
{}
);
mNavigatorBar
=
new
NavigatorBar
(
rightBox
);
rightBoxVBoxLayout
->
addWidget
(
mNavigatorBar
);
mRightFrame
=
new
QStackedWidget
(
rightBox
);
...
...
src/dialog/searchdialog.cpp
View file @
e071cde4
...
...
@@ -45,7 +45,7 @@ SearchDialog::SearchDialog(CalendarView *calendarview)
// Results list view
QVBoxLayout
*
layout
=
new
QVBoxLayout
;
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
listView
=
new
EventViews
::
ListView
(
m_calendarview
->
calendar
(),
this
);
layout
->
addWidget
(
listView
);
m_ui
->
listViewFrame
->
setLayout
(
layout
);
...
...
src/kcmdesignerfields.cpp
View file @
e071cde4
...
...
@@ -277,7 +277,7 @@ void KCMDesignerFields::defaults()
void
KCMDesignerFields
::
initGUI
()
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
bool
noDesigner
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"designer"
)).
isEmpty
();
...
...
src/korganizer_part.cpp
View file @
e071cde4
...
...
@@ -60,7 +60,7 @@ KOrganizerPart::KOrganizerPart(QWidget *parentWidget, QObject *parent, const QVa
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
canvas
);
topLayout
->
addWidget
(
mView
);
topLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
setContentsMargins
(
{}
);
connect
(
mView
,
&
CalendarView
::
incidenceSelected
,
this
,
&
KOrganizerPart
::
slotChangeInfo
);
...
...
src/prefs/koprefsdialoggroupscheduling.cpp
View file @
e071cde4
...
...
@@ -26,7 +26,7 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling(QWidget *parent)
topTopLayout
->
addWidget
(
topFrame
);
QGridLayout
*
topLayout
=
new
QGridLayout
(
topFrame
);
topLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
setContentsMargins
(
{}
);
Korganizer
::
KPrefsWidBool
*
useGroupwareBool
=
addWidBool
(
...
...
@@ -43,7 +43,7 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling(QWidget *parent)
MailTransport
::
TransportManagementWidget
*
tmw
=
new
MailTransport
::
TransportManagementWidget
(
topFrame
);
tmw
->
layout
()
->
setContentsMargins
(
0
,
0
,
0
,
0
);
tmw
->
layout
()
->
setContentsMargins
(
{}
);
topLayout
->
addWidget
(
tmw
,
3
,
0
,
1
,
2
);
load
();
}
...
...
src/prefs/koprefsdialogplugins.cpp
View file @
e071cde4
...
...
@@ -73,7 +73,7 @@ KOPrefsDialogPlugins::KOPrefsDialogPlugins(QWidget *parent)
QWidget
*
buttonRow
=
new
QWidget
(
this
);
QBoxLayout
*
buttonRowLayout
=
new
QHBoxLayout
(
buttonRow
);
buttonRowLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
buttonRowLayout
->
setContentsMargins
(
{}
);
mConfigureButton
=
new
QPushButton
(
buttonRow
);
KGuiItem
::
assign
(
mConfigureButton
,
KGuiItem
(
i18nc
(
"@action:button"
,
"Configure &Plugin..."
),
QStringLiteral
(
"configure"
),
QString
(),
...
...
src/prefs/koprefsdialogtime.cpp
View file @
e071cde4
...
...
@@ -66,7 +66,7 @@ KOPrefsDialogTime::KOPrefsDialogTime(QWidget *parent)
// holiday region selection
QWidget
*
holidayRegBox
=
new
QWidget
(
regionalPage
);
QHBoxLayout
*
holidayRegBoxHBoxLayout
=
new
QHBoxLayout
(
holidayRegBox
);
holidayRegBoxHBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
holidayRegBoxHBoxLayout
->
setContentsMargins
(
{}
);
holidaysLayout
->
addWidget
(
holidayRegBox
,
1
,
0
,
1
,
2
);
QLabel
*
holidayLabel
=
new
QLabel
(
i18nc
(
"@label"
,
"Use holiday region:"
),
holidayRegBox
);
...
...
src/prefs/koprefsuserfeedback.cpp
View file @
e071cde4
...
...
@@ -38,7 +38,7 @@ KOPrefsUserFeedBack::KOPrefsUserFeedBack(QWidget *parent, const QVariantList &ar
about
->
addAuthor
(
i18n
(
"Laurent Montel"
),
QString
(),
QStringLiteral
(
"montel@kde.org"
));
setAboutData
(
about
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
mUserFeedbackWidget
=
new
KUserFeedback
::
FeedbackConfigWidget
(
this
);
connect
(
mUserFeedbackWidget
,
&
KUserFeedback
::
FeedbackConfigWidget
::
configurationChanged
,
this
,
&
KOPrefsUserFeedBack
::
markAsChanged
);
...
...
src/views/agendaview/koagendaview.cpp
View file @
e071cde4
...
...
@@ -46,7 +46,7 @@ KOAgendaView::KOAgendaView(QWidget *parent, bool isSideBySide)
,
d
(
new
Private
(
isSideBySide
,
this
))
{
QHBoxLayout
*
layout
=
new
QHBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
layout
->
addWidget
(
d
->
mAgendaView
);
connect
(
d
->
mAgendaView
,
&
EventViews
::
AgendaView
::
zoomViewHorizontally
,
...
...
src/views/collectionview/reparentingmodel.cpp
View file @
e071cde4
...
...
@@ -16,9 +16,7 @@
*/
ReparentingModel
::
Node
::
Node
(
ReparentingModel
&
model
)
:
parent
(
nullptr
)
,
personModel
(
model
)
,
mIsSourceNode
(
false
)
:
personModel
(
model
)
{
}
...
...
src/views/collectionview/reparentingmodel.h
View file @
e071cde4
...
...
@@ -47,7 +47,7 @@ public:
QVector
<
Ptr
>
children
;
Node
*
parent
=
nullptr
;
ReparentingModel
&
personModel
;
bool
mIsSourceNode
;
bool
mIsSourceNode
=
false
;
};
struct
NodeManager
{
...
...
src/views/monthview/monthview.cpp
View file @
e071cde4
...
...
@@ -21,7 +21,7 @@ MonthView::MonthView(QWidget *parent)
:
KOEventView
(
parent
)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
mMonthView
=
new
EventViews
::
MonthView
(
EventViews
::
MonthView
::
Visible
,
this
);
mMonthView
->
setPreferences
(
KOPrefs
::
instance
()
->
eventViewsPreferences
());
layout
->
addWidget
(
mMonthView
);
...
...
src/views/timelineview/kotimelineview.cpp
View file @
e071cde4
...
...
@@ -20,7 +20,7 @@ KOTimelineView::KOTimelineView(QWidget *parent)
:
KOEventView
(
parent
)
{
QVBoxLayout
*
vbox
=
new
QVBoxLayout
(
this
);
vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vbox
->
setContentsMargins
(
{}
);
mTimeLineView
=
new
EventViews
::
TimelineView
(
this
);
vbox
->
addWidget
(
mTimeLineView
);
mEventPopup
=
eventPopup
();
...
...
src/widgets/kdatenavigator.cpp
View file @
e071cde4
...
...
@@ -25,7 +25,7 @@ KDateNavigator::KDateNavigator(QWidget *parent)
,
mBaseDate
(
1970
,
1
,
1
)
{
QGridLayout
*
topLayout
=
new
QGridLayout
(
this
);
topLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
setContentsMargins
(
{}
);
topLayout
->
setSpacing
(
0
);
mNavigatorBar
=
new
NavigatorBar
(
this
);
...
...
src/widgets/navigatorbar.cpp
View file @
e071cde4
...
...
@@ -64,7 +64,7 @@ NavigatorBar::NavigatorBar(QWidget *parent) : QWidget(parent)
// set up control frame layout
QHBoxLayout
*
ctrlLayout
=
new
QHBoxLayout
(
this
);
ctrlLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
ctrlLayout
->
setContentsMargins
(
{}
);
ctrlLayout
->
addWidget
(
mPrevYear
);
ctrlLayout
->
addWidget
(
mPrevMonth
);
ctrlLayout
->
addStretch
();
...
...
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