1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-19 04:10:03 +02:00

gui/SearchWindow: Use QFutureWatcher instead of QThread.

By removing the call to QThread::create() that requires version >= 5.11 we can have a lower version as requirement.

This is useful because a lot of systems don't ship with 5.11 as default.
This commit is contained in:
Henrik Hautakoski 2020-04-10 10:45:19 +02:00
parent 8cb3fad9b1
commit 3c21e27f45
3 changed files with 13 additions and 32 deletions

View file

@ -31,18 +31,16 @@
#include <QLineEdit>
#include <QCheckBox>
#include <QGridLayout>
#include <QFutureWatcher>
#include <QWidget>
#include <eoskeygen/key_search_result.h>
#include <eoskeygen/key_search.h>
class QThread;
class SearchWindow : public QWidget, public eoskeygen::IKeySearchResult
{
Q_OBJECT
public:
explicit SearchWindow(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~SearchWindow();
void onResult(const struct libeosio::ec_keypair* key, const struct eoskeygen::KeySearch::result& result);
@ -70,7 +68,7 @@ signals:
private:
// Search worker thread.
QThread* m_worker;
QFutureWatcher<void> m_worker;
eoskeygen::KeySearch m_ksearch;