mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-23 01:10:39 -05:00
Fix compilation with Qt older then 5.10
This commit is contained in:
parent
ea86fe2615
commit
367c5182cf
4 changed files with 116 additions and 5 deletions
|
|
@ -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 );
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue