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
Maui
Vvave
Commits
3c562d17
Commit
3c562d17
authored
Jun 20, 2019
by
camilo higuita
Browse files
polish
parent
1c3f0e52
Changes
1
Hide whitespace changes
Inline
Side-by-side
vvave.cpp
View file @
3c562d17
...
...
@@ -59,16 +59,15 @@ vvave::~vvave() {}
void
vvave
::
runBrain
()
{
QFutureWatcher
<
void
>
*
watcher
=
new
QFutureWatcher
<
void
>
;
QObject
::
connect
(
watcher
,
&
QFutureWatcher
<
void
>::
finished
,
watcher
,
&
QFutureWatcher
<
void
>::
deleteLater
);
QObject
::
connect
(
qApp
,
&
QCoreApplication
::
aboutToQuit
,
[
=
]()
{
if
(
watcher
)
watcher
->
future
().
waitForFinished
();
});
//
QObject::connect(qApp, &QCoreApplication::aboutToQuit, [=]()
//
{
//
if(watcher
!= nullptr
)
//
watcher->future().waitForFinished();
//
});
auto
func
=
[
=
]()
{
...
...
@@ -107,7 +106,7 @@ void vvave::checkCollection(const QStringList &paths, std::function<void(uint)>
cb
(
newTracks
);
watcher
->
deleteLater
();
});
const
auto
func
=
[
&
paths
]()
->
uint
const
auto
func
=
[
=
]()
->
uint
{
auto
newPaths
=
paths
;
...
...
@@ -147,7 +146,7 @@ void vvave::scanDir(const QStringList &paths)
this
->
checkCollection
(
paths
,
[
=
](
uint
size
)
{
emit
this
->
refreshTables
(
size
);
//
runBrain();
this
->
runBrain
();
});
}
...
...
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