Fix compilation with Qt older then 5.10

This commit is contained in:
Gioacchino Mazzurco 2018-11-01 14:51:57 +01:00
parent ea86fe2615
commit 367c5182cf
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
4 changed files with 116 additions and 5 deletions

View file

@ -32,8 +32,10 @@
#include "gui/settings/rsharesettings.h"
#include "gui/feeds/SubFileItem.h"
#include "gui/notifyqt.h"
#include <algorithm>
#include "util/DateTime.h"
#include "util/qtthreadsutils.h"
#include <algorithm>
#define CHAN_DEFAULT_IMAGE ":/images/channels.png"
@ -661,14 +663,17 @@ void GxsChannelPostsWidget::toggleAutoDownload()
return;
}
QMetaObject::invokeMethod(this, [=]()
RsQThreadUtils::postToObject( [=]()
{
/* Here it goes any code you want to be executed on the Qt Gui
* thread, for example to update the data model with new information
* after a blocking call to RetroShare API complete, note that
* Qt::QueuedConnection is important!
*/
}, Qt::QueuedConnection);
std::cerr << __PRETTY_FUNCTION__ << " Has been executed on GUI "
<< "thread but was scheduled by async thread" << std::endl;
}, this );
});
}