More build fixes for windows..

This commit is contained in:
Mark Watkins 2011-12-17 20:36:28 +10:00
parent 6bfdbc74c2
commit bcdd670aef
5 changed files with 10 additions and 5 deletions

View File

@ -89,7 +89,9 @@ void UpdaterWindow::downloadUpdateXML()
{
requestmode=RM_CheckUpdates;
reply=netmanager->get(QNetworkRequest(update_url));
QNetworkRequest req=QNetworkRequest(update_url);
req.setRawHeader("User-Agent", "Wget/1.12 (linux-gnu)");
reply=netmanager->get(req);
ui->plainTextEdit->appendPlainText("Requesting "+update_url.toString());
netmanager->connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this, SLOT(downloadProgress(qint64,qint64)));
dltime.start();
@ -189,7 +191,7 @@ void UpdaterWindow::ParseUpdateXML(QIODevice * dev)
}
if (!release || (VersionString() > release->version)) {
mainwin->Notify("No updates were found for your platform",5000,"SleepyHead Updates");
delay(4000);
sh_delay(4000);
close();
return;
}
@ -276,7 +278,7 @@ void UpdaterWindow::replyFinished(QNetworkReply * reply)
}
ui->plainTextEdit->appendPlainText(QString::number(reply->size())+" bytes received.");
QString filename=QApplication::applicationDirPath()+QDir::separator()+reply->url().toString().section("/",-1);
QString filename=QApplication::applicationDirPath()+QDir::separator()+"update.xml";
qDebug() << filename;
QFile file(filename);
file.open(QFile::WriteOnly);

View File

@ -6,6 +6,7 @@
#include <QTableWidgetItem>
#include <QMenu>
#include <QMainWindow>
#include <QUrl>
#include "version.h"
#include "updateparser.h"

View File

@ -7,7 +7,7 @@
#include "common_gui.h"
#include "qglobal.h"
void delay(int ms)
void sh_delay(int ms)
{
#ifdef Q_WS_WIN32
delay(ms);

View File

@ -10,6 +10,6 @@
#include <QLocale>
Qt::DayOfWeek firstDayOfWeekFromLocale();
void delay(int ms);
void sh_delay(int ms);
#endif

View File

@ -26,6 +26,8 @@ quazip/(un)zip.h files for details, basically it's zlib license.
#include <QtCore/qglobal.h>
#define QUAZIP_BUILD
/**
This is automatically defined when building a static library, but when
including QuaZip sources directly into a project, QUAZIP_STATIC should