1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Using new QupZilla site: qupzilla.cc.co from now

This commit is contained in:
nowrep 2011-10-07 17:33:51 +02:00
parent 3c8b08957a
commit 17f80f31b5
3 changed files with 49 additions and 27 deletions

View File

@ -37,6 +37,7 @@
#include "qtwin.h"
#include "mainapplication.h"
#include "webhistoryinterface.h"
#include "globalfunctions.h"
MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cmdActions, int &argc, char **argv)
: QtSingleApplication("QupZillaWebBrowser", argc, argv)
@ -646,16 +647,12 @@ bool MainApplication::checkSettingsDir()
QString homePath = QDir::homePath();
homePath+="/.qupzilla/";
QByteArray rData;
QString profileVersion;
if (QDir(homePath).exists()) {
QFile versionFile(homePath+"version");
versionFile.open(QFile::ReadOnly);
rData = versionFile.readAll();
if (rData.contains(QupZilla::VERSION.toAscii())) {
versionFile.close();
profileVersion = qz_readAllFileContents(homePath + "version");
if (profileVersion == QupZilla::VERSION)
return true;
}
versionFile.close();
#ifdef UNRELEASED_BUILD
return true;
#endif
@ -674,7 +671,7 @@ bool MainApplication::checkSettingsDir()
versionFile.write(QupZilla::VERSION.toAscii());
versionFile.close();
if (rData.contains("1.0.0-b3")) // Data not changed from this version
if (Updater::parseVersionFromString(QupZilla::VERSION) >= Updater::parseVersionFromString("1.0.0-b3") ) // Data not changed from this version
return true;
dir.mkdir("profiles");

View File

@ -61,7 +61,7 @@ const QString QupZilla::VERSION = "1.0.0-rc1";
const QString QupZilla::BUILDTIME = __DATE__" "__TIME__;
const QString QupZilla::AUTHOR = "nowrep";
const QString QupZilla::COPYRIGHT = "2010-2011";
const QString QupZilla::WWWADDRESS = "http://qupzilla.ic.cz";
const QString QupZilla::WWWADDRESS = "http://qupzilla.co.cc";
const QString QupZilla::WIKIADDRESS = "https://github.com/nowrep/QupZilla/wiki";
const QString QupZilla::WEBKITVERSION = qWebKitVersion();

View File

@ -31,14 +31,6 @@ public:
explicit Updater(QupZilla* mainClass, QObject* parent = 0);
~Updater();
signals:
private slots:
void downCompleted(QNetworkReply* reply);
void start();
void downloadNewVersion();
private:
struct Version {
bool isValid;
int majorVersion;
@ -67,11 +59,44 @@ private:
{
return !operator<(other);
}
bool operator==(const Version &other) const
{
if (!this->isValid || !other.isValid)
return false;
return (this->majorVersion == other.majorVersion &&
this->minorVersion == other.minorVersion &&
this->revisionNumber == other.revisionNumber &&
this->specialSymbol == other.specialSymbol);
}
bool operator>=(const Version &other) const
{
if (*this == other)
return true;
return *this > other;
}
bool operator<=(const Version &other) const
{
if (*this == other)
return true;
return *this < other;
}
};
Version parseVersionFromString(const QString &string);
static Version parseVersionFromString(const QString &string);
static bool isBiggerThan_SpecialSymbol(QString one, QString two);
signals:
private slots:
void downCompleted(QNetworkReply* reply);
void start();
void downloadNewVersion();
private:
void startDownloadingUpdateInfo(const QUrl &url);
QupZilla* p_QupZilla;