Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAlarm
Commits
2973ea21
Commit
2973ea21
authored
Mar 10, 2022
by
David Jarvie
Browse files
Code quality fixes
parent
4b131aa7
Pipeline
#147967
passed with stage
in 2 minutes
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/commandoptions.cpp
View file @
2973ea21
...
...
@@ -81,7 +81,7 @@ bool convInterval(const QString& timeParam, KARecurrence::Type&, int& timeInterv
class
CommandOptions
::
Private
{
public:
Private
(
CommandOptions
*
parent
)
explicit
Private
(
CommandOptions
*
parent
)
:
p
(
parent
)
{}
bool
checkCommand
(
Option
,
Command
,
EditAlarmDlg
::
Type
=
EditAlarmDlg
::
NO_TYPE
);
...
...
src/commandoptions.h
View file @
2973ea21
...
...
@@ -39,6 +39,8 @@ public:
QStringList
setOptions
(
QCommandLineParser
*
,
const
QStringList
&
args
);
static
CommandOptions
*
firstInstance
()
{
return
mFirstInstance
;
}
CommandOptions
();
CommandOptions
(
CommandOptions
&
)
=
delete
;
CommandOptions
&
operator
=
(
CommandOptions
&
)
=
delete
;
void
parse
();
void
process
();
Command
command
()
const
{
return
mCommand
;
}
...
...
src/editdlg.cpp
View file @
2973ea21
/*
* editdlg.cpp - dialog to create or modify an alarm or alarm template
* Program: kalarm
* SPDX-FileCopyrightText: 2001-202
1
David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2001-202
2
David Jarvie <djarvie@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
...
...
@@ -906,8 +906,8 @@ void EditAlarmDlg::closeEvent(QCloseEvent* ce)
*/
void
EditAlarmDlg
::
slotResize
()
{
QSize
s
=
mTabScrollGroup
->
adjustSize
(
true
);
s
=
minimumSizeHint
();
mTabScrollGroup
->
adjustSize
(
true
);
const
QSize
s
=
minimumSizeHint
();
if
(
height
()
>
s
.
height
())
{
// Resize to slightly greater than the minimum height.
...
...
src/kalarmapp.cpp
View file @
2973ea21
...
...
@@ -404,7 +404,6 @@ int KAlarmApp::activateInstance(const QStringList& args, const QString& workingD
int
exitCode
=
0
;
// default = success
static
bool
firstInstance
=
true
;
bool
dontRedisplay
=
false
;
CommandOptions
::
Command
command
=
CommandOptions
::
NONE
;
if
(
!
firstInstance
||
!
isSessionRestored
())
{
options
->
process
();
...
...
@@ -412,7 +411,7 @@ int KAlarmApp::activateInstance(const QStringList& args, const QString& workingD
if
(
options
->
simulationTime
().
isValid
())
KAlarm
::
setSimulatedSystemTime
(
options
->
simulationTime
());
#endif
command
=
options
->
command
();
CommandOptions
::
Command
command
=
options
->
command
();
if
(
options
->
disableAll
())
setAlarmsEnabled
(
false
);
// disable alarm monitoring
...
...
src/resourceselector.cpp
View file @
2973ea21
...
...
@@ -285,6 +285,8 @@ void ResourceSelector::selectionChanged()
*/
void
ResourceSelector
::
initActions
(
KActionCollection
*
actions
)
{
if
(
mActionReload
)
return
;
// this function can only be called once
mActionReload
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"view-refresh"
)),
i18nc
(
"@action Reload calendar"
,
"Re&load"
),
this
);
actions
->
addAction
(
QStringLiteral
(
"resReload"
),
mActionReload
);
connect
(
mActionReload
,
&
QAction
::
triggered
,
this
,
&
ResourceSelector
::
reloadResource
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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