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
Multimedia
Kdenlive
Commits
afcb0a6a
Commit
afcb0a6a
authored
Sep 29, 2022
by
Jean-Baptiste Mardelle
Browse files
Cache data: show warning when it exceeds 1Gb
parent
a6c29d95
Pipeline
#238275
passed with stage
in 10 minutes and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/project/dialogs/temporarydata.cpp
View file @
afcb0a6a
...
...
@@ -175,6 +175,9 @@ TemporaryData::TemporaryData(KdenliveDoc *doc, bool currentProjectOnly, QWidget
"files used for faster editing. Deleting is safe, proxy clips can be recreated if you have the original source clips."
));
connect
(
help_cached
,
&
QToolButton
::
clicked
,
this
,
[
this
]()
{
QToolTip
::
showText
(
QCursor
::
pos
(),
help_cached
->
toolTip
());
});
// Cache info message
cache_info
->
hide
();
processBackupDirectories
();
connect
(
listWidget
,
&
QTreeWidget
::
itemSelectionChanged
,
this
,
&
TemporaryData
::
refreshGlobalPie
);
...
...
@@ -622,6 +625,14 @@ void TemporaryData::gotFolderSize(KJob *job)
listWidget
->
resizeColumnToContents
(
0
);
listWidget
->
resizeColumnToContents
(
1
);
if
(
m_globalDirectories
.
isEmpty
())
{
// Processing done, check total size
if
(
m_totalGlobal
>
1048576000
)
{
// Cache larger than 1 GB, warn
cache_info
->
setText
(
i18n
(
"Your cached data exceeds 1Gb, cleanup is recommended."
));
cache_info
->
animatedShow
();
}
else
{
cache_info
->
animatedHide
();
}
gTotalSize
->
setText
(
KIO
::
convertSize
(
m_totalGlobal
));
listWidget
->
setCurrentItem
(
listWidget
->
topLevelItem
(
0
));
}
else
{
...
...
src/ui/managecache_ui.ui
View file @
afcb0a6a
...
...
@@ -656,6 +656,16 @@
</item>
</layout>
</item>
<item>
<widget
class=
"KMessageWidget"
name=
"cache_info"
>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
</property>
<property
name=
"messageType"
>
<enum>
KMessageWidget::Warning
</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
...
...
@@ -672,6 +682,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>
KMessageWidget
</class>
<extends>
QFrame
</extends>
<header>
kmessagewidget.h
</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
...
...
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