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
Unmaintained
KDE Pim
Commits
801013e0
Commit
801013e0
authored
May 16, 2012
by
Laurent Montel
😁
Browse files
Fix Bug 298985 - Log size limit "unlimited" is too small
FIXED-IN: 4.8.4 BUG: 298985
parent
c574530e
Changes
1
Hide whitespace changes
Inline
Side-by-side
mailfilteragent/filterlogdialog.cpp
View file @
801013e0
...
...
@@ -177,7 +177,7 @@ void FilterLogDialog::readConfig()
const
bool
isLogRuleResult
=
group
.
readEntry
(
"LogRuleResult"
,
false
);
const
bool
isLogPatternResult
=
group
.
readEntry
(
"LogPatternResult"
,
false
);
const
bool
isLogAppliedAction
=
group
.
readEntry
(
"LogAppliedAction"
,
false
);
const
int
maxLogSize
=
group
.
readEntry
(
"maxLogSize"
,
0
);
const
int
maxLogSize
=
group
.
readEntry
(
"maxLogSize"
,
-
1
);
if
(
isEnabled
!=
FilterLog
::
instance
()
->
isLogging
()
)
FilterLog
::
instance
()
->
setLogging
(
isEnabled
);
...
...
@@ -239,8 +239,12 @@ void FilterLogDialog::slotLogStateChanged()
// value in the QSpinBox is in KB while it's in Byte in the FilterLog
int
newLogSize
=
FilterLog
::
instance
()
->
maxLogSize
()
/
1024
;
if
(
mLogMemLimitSpin
->
value
()
!=
newLogSize
)
mLogMemLimitSpin
->
setValue
(
newLogSize
);
if
(
mLogMemLimitSpin
->
value
()
!=
newLogSize
)
{
if
(
newLogSize
<=
0
)
mLogMemLimitSpin
->
setValue
(
1
);
else
mLogMemLimitSpin
->
setValue
(
newLogSize
);
}
writeConfig
();
}
...
...
@@ -278,8 +282,10 @@ void FilterLogDialog::slotSwitchLogState()
void
FilterLogDialog
::
slotChangeLogMemLimit
(
int
value
)
{
mTextEdit
->
document
()
->
setMaximumBlockCount
(
0
);
//Reset value
FilterLog
::
instance
()
->
setMaxLogSize
(
value
*
1024
);
if
(
value
==
1
)
//unilimited
FilterLog
::
instance
()
->
setMaxLogSize
(
-
1
);
else
FilterLog
::
instance
()
->
setMaxLogSize
(
value
*
1024
);
}
...
...
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