diff --git a/src/Dialog_Update.cpp b/src/Dialog_Update.cpp index 05f48499..03e913d8 100644 --- a/src/Dialog_Update.cpp +++ b/src/Dialog_Update.cpp @@ -87,7 +87,10 @@ UpdateDialog::UpdateDialog(SettingsModel *settings, QWidget *parent) m_firstShow(true), m_updateReadyToInstall(false), m_updaterProcess(NULL), - m_binaryUpdater(lamexp_lookup_tool("wupdate.exe")) + m_binaryUpdater(lamexp_lookup_tool("wupdate.exe")), + m_binaryWGet(lamexp_lookup_tool("wget.exe")), + m_binaryGnuPG(lamexp_lookup_tool("gpgv.exe")), + m_binaryKeys(lamexp_lookup_tool("gpgv.gpg")) { if(m_binaryUpdater.isEmpty()) { @@ -156,7 +159,7 @@ void UpdateDialog::showEvent(QShowEvent *event) { if(!m_thread) { - m_thread = new UpdateCheckThread(m_betaUpdates); + m_thread = new UpdateCheckThread(m_binaryWGet, m_binaryGnuPG, m_binaryKeys, m_betaUpdates); connect(m_thread, SIGNAL(statusChanged(int)), this, SLOT(threadStatusChanged(int))); connect(m_thread, SIGNAL(progressChanged(int)), this, SLOT(threadProgressChanged(int))); connect(m_thread, SIGNAL(messageLogged(QString)), this, SLOT(threadMessageLogged(QString))); @@ -456,7 +459,7 @@ void UpdateDialog::testKnownHosts(void) { ui->statusLabel->setText("Testing all known hosts, this may take a few minutes..."); - if(UpdateCheckThread *testThread = new UpdateCheckThread(m_betaUpdates, true)) + if(UpdateCheckThread *testThread = new UpdateCheckThread(m_binaryWGet, m_binaryGnuPG, m_binaryKeys, m_betaUpdates, true)) { QEventLoop loop; m_logFile->clear(); diff --git a/src/Dialog_Update.h b/src/Dialog_Update.h index accbf970..85a22c35 100644 --- a/src/Dialog_Update.h +++ b/src/Dialog_Update.h @@ -71,6 +71,9 @@ protected: private: Ui::UpdateDialog *ui; //for Qt UIC + const QString m_binaryWGet; + const QString m_binaryGnuPG; + const QString m_binaryKeys; const QString m_binaryUpdater; UpdateCheckThread *m_thread; diff --git a/src/Thread_CheckUpdate.cpp b/src/Thread_CheckUpdate.cpp index e528f886..7eedb273 100644 --- a/src/Thread_CheckUpdate.cpp +++ b/src/Thread_CheckUpdate.cpp @@ -109,8 +109,10 @@ static const char *known_hosts[] = //Taken form: http://www.alexa.com/topsites "http://imgur.com/", "http://en.jd.com/", "http://mirrors.kernel.org/", + "http://lame.sourceforge.net/", "http://www.libav.org/", "http://www.linkedin.com/about-us", + "http://www.linuxmint.com/", "http://www.livedoor.com/", "http://www.livejournal.com/", "http://mail.ru/", @@ -137,10 +139,12 @@ static const char *known_hosts[] = //Taken form: http://www.alexa.com/topsites "http://www.uol.com.br/", "http://www.videohelp.com/", "http://www.videolan.org/", + "http://virtualdub.org/", "http://www.weibo.com/", "http://www.wikipedia.org/", "http://www.winamp.com/", "http://wordpress.com/", + "http://xiph.org/", "http://us.yahoo.com/", "http://www.yandex.ru/", "http://www.youtube.com/", @@ -185,14 +189,14 @@ void UpdateInfo::resetInfo(void) // Constructor & Destructor //////////////////////////////////////////////////////////// -UpdateCheckThread::UpdateCheckThread(const bool betaUpdates, const bool testMode) +UpdateCheckThread::UpdateCheckThread(const QString &binWGet, const QString &binGnuPG, const QString &binKeys, const bool betaUpdates, const bool testMode) : m_updateInfo(new UpdateInfo()), + m_binaryWGet(binWGet), + m_binaryGnuPG(binGnuPG), + m_binaryKeys(binKeys), m_betaUpdates(betaUpdates), m_testMode(testMode), - m_binaryWGet(lamexp_lookup_tool("wget.exe")), - m_binaryGnuPG(lamexp_lookup_tool("gpgv.exe")), - m_binaryKeys(lamexp_lookup_tool("gpgv.gpg")), m_maxProgress(getMaxProgress()) { m_success = false; diff --git a/src/Thread_CheckUpdate.h b/src/Thread_CheckUpdate.h index 6d9a5ae5..4682338b 100644 --- a/src/Thread_CheckUpdate.h +++ b/src/Thread_CheckUpdate.h @@ -62,7 +62,7 @@ public: } update_status_t; - UpdateCheckThread(const bool betaUpdates, const bool testMode = false); + UpdateCheckThread(const QString &binWGet, const QString &binGnuPG, const QString &binKeys, const bool betaUpdates, const bool testMode = false); ~UpdateCheckThread(void); const int getUpdateStatus(void) const { return m_status; }