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
libkdepim
Commits
7a576304
Commit
7a576304
authored
Jun 21, 2021
by
Laurent Montel
😁
Browse files
Use std::chrono_literals
parent
7709e808
Pipeline
#66886
passed with stage
in 3 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/libkdepim/progresswidget/progressdialog.cpp
View file @
7a576304
...
...
@@ -23,6 +23,9 @@
#include <QScrollBar>
#include <QTimer>
#include <QVBoxLayout>
#include <chrono>
using
namespace
std
::
chrono_literals
;
using
namespace
KPIM
;
static
const
int
MAX_LABEL_WIDTH
=
650
;
...
...
@@ -378,7 +381,7 @@ void ProgressDialog::slotTransactionAdded(ProgressItem *item)
mTransactionsToListviewItems
.
insert
(
item
,
ti
);
}
if
(
first
&&
mWasLastShown
)
{
QTimer
::
singleShot
(
1
000
,
this
,
&
ProgressDialog
::
slotShow
);
QTimer
::
singleShot
(
1
s
,
this
,
&
ProgressDialog
::
slotShow
);
}
}
}
...
...
@@ -389,13 +392,13 @@ void ProgressDialog::slotTransactionCompleted(ProgressItem *item)
if
(
TransactionItem
*
ti
=
mTransactionsToListviewItems
.
value
(
item
))
{
mTransactionsToListviewItems
.
remove
(
item
);
ti
->
setItemComplete
();
QTimer
::
singleShot
(
3
000
,
ti
,
&
QObject
::
deleteLater
);
QTimer
::
singleShot
(
3
s
,
ti
,
&
QObject
::
deleteLater
);
// see the slot for comments as to why that works
connect
(
ti
,
&
QObject
::
destroyed
,
mScrollView
,
&
TransactionItemView
::
slotLayoutFirstItem
);
}
// This was the last item, hide.
if
(
mTransactionsToListviewItems
.
empty
())
{
QTimer
::
singleShot
(
3
000
,
this
,
&
ProgressDialog
::
slotHide
);
QTimer
::
singleShot
(
3
s
,
this
,
&
ProgressDialog
::
slotHide
);
}
}
...
...
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