1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Version 1.3.0

This commit is contained in:
nowrep 2012-07-11 18:31:23 +02:00
parent 014fa12159
commit c471c0e882
6 changed files with 44 additions and 12 deletions

View File

@ -1,5 +1,5 @@
Version 1.3.0 Version 1.3.0
* not released yet * released 11 July 2012
* new Ukrainian translation * new Ukrainian translation
* new plugins: GreaseMonkey and PIM (Personal Information Manager) * new plugins: GreaseMonkey and PIM (Personal Information Manager)
* new command line option to open new window with url * new command line option to open new window with url

View File

@ -58,7 +58,7 @@ You need to specify path to `macdeployqt` only if it is not in PATH.
Current version Current version
---------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------
The current released version of QupZilla is 1.2.0. You can download precompiled packages The current released version of QupZilla is 1.3.0. You can download precompiled packages
and the sources from the download section at [homepage](http://www.qupzilla.com/download). and the sources from the download section at [homepage](http://www.qupzilla.com/download).
However, if you want the latest revision, just take the latest code snapshot either by However, if you want the latest revision, just take the latest code snapshot either by
downloading a tarball or running: downloading a tarball or running:

View File

@ -72,6 +72,7 @@ void ProfileUpdater::updateProfile(const QString &current, const QString &profil
update100rc1(); update100rc1();
update100(); update100();
update118(); update118();
update120();
return; return;
} }
@ -79,27 +80,37 @@ void ProfileUpdater::updateProfile(const QString &current, const QString &profil
update100rc1(); update100rc1();
update100(); update100();
update118(); update118();
update120();
return; return;
} }
if (profileVersion == Updater::parseVersionFromString("1.0.0")) { if (profileVersion == Updater::parseVersionFromString("1.0.0")) {
update100(); update100();
update118(); update118();
update120();
return; return;
} }
if (profileVersion == Updater::parseVersionFromString("1.1.0")) { if (profileVersion == Updater::parseVersionFromString("1.1.0")) {
// Do nothing, nothing changed update118();
update120();
return; return;
} }
if (profileVersion == Updater::parseVersionFromString("1.1.5")) { if (profileVersion == Updater::parseVersionFromString("1.1.5")) {
// Do nothing, nothing changed update118();
update120();
return; return;
} }
if (profileVersion == Updater::parseVersionFromString("1.1.8")) { if (profileVersion == Updater::parseVersionFromString("1.1.8")) {
update118(); update118();
update120();
return;
}
if (profileVersion == Updater::parseVersionFromString("1.2.0")) {
update120();
return; return;
} }
@ -150,7 +161,6 @@ void ProfileUpdater::update100rc1()
query.exec("ALTER TABLE bookmarks ADD COLUMN toolbar_position NUMERIC"); query.exec("ALTER TABLE bookmarks ADD COLUMN toolbar_position NUMERIC");
query.exec("UPDATE bookmarks SET toolbar_position=0"); query.exec("UPDATE bookmarks SET toolbar_position=0");
} }
void ProfileUpdater::update100() void ProfileUpdater::update100()
@ -171,3 +181,24 @@ void ProfileUpdater::update118()
QSqlQuery query; QSqlQuery query;
query.exec("ALTER TABLE folders ADD COLUMN parent TEXT"); query.exec("ALTER TABLE folders ADD COLUMN parent TEXT");
} }
void ProfileUpdater::update120()
{
std::cout << "QupZilla: Upgrading profile version from 1.2.0..." << std::endl;
mApp->connectDatabase();
QSqlDatabase db = QSqlDatabase::database();
db.transaction();
// This is actually just renaming bookmarks.toolbar_position to bookmarks.position
QSqlQuery query;
query.exec("ALTER TABLE bookmarks RENAME TO tmp_bookmarks");
query.exec("CREATE TABLE bookmarks (icon TEXT, folder TEXT, id INTEGER PRIMARY KEY, title VARCHAR(200), url VARCHAR(200), position NUMERIC)");
query.exec("INSERT INTO bookmarks(icon, folder, id, title, url, position)"
"SELECT icon, folder, id, title, url, toolbar_position FROM tmp_bookmarks");
query.exec("DROP TABLE tmp_bookmarks");
query.exec("CREATE INDEX bookmarksTitle ON bookmarks(title ASC)");
query.exec("CREATE INDEX bookmarksUrl ON bookmarks(url ASC)");
db.commit();
}

View File

@ -36,6 +36,7 @@ private:
void update100rc1(); void update100rc1();
void update100(); void update100();
void update118(); void update118();
void update120();
QString m_profilePath; QString m_profilePath;
}; };

View File

@ -79,7 +79,7 @@
#include <QWebHistory> #include <QWebHistory>
#include <QMessageBox> #include <QMessageBox>
const QString QupZilla::VERSION = "1.2.0"; const QString QupZilla::VERSION = "1.3.0";
const QString QupZilla::BUILDTIME = __DATE__" "__TIME__; const QString QupZilla::BUILDTIME = __DATE__" "__TIME__;
const QString QupZilla::AUTHOR = "David Rosca"; const QString QupZilla::AUTHOR = "David Rosca";
const QString QupZilla::COPYRIGHT = "2010-2012"; const QString QupZilla::COPYRIGHT = "2010-2012";

View File

@ -142,12 +142,12 @@ void BookmarksToolbar::moveRight()
Bookmark bookmarkRight = buttonRight->data().value<Bookmark>(); Bookmark bookmarkRight = buttonRight->data().value<Bookmark>();
QSqlQuery query; QSqlQuery query;
query.prepare("UPDATE bookmarks SET toolbar_position=? WHERE id=?"); query.prepare("UPDATE bookmarks SET position=? WHERE id=?");
query.addBindValue(index + 1); query.addBindValue(index + 1);
query.addBindValue(bookmark.id); query.addBindValue(bookmark.id);
mApp->dbWriter()->executeQuery(query); mApp->dbWriter()->executeQuery(query);
query.prepare("UPDATE bookmarks SET toolbar_position=? WHERE id=?"); query.prepare("UPDATE bookmarks SET position=? WHERE id=?");
query.addBindValue(index); query.addBindValue(index);
query.addBindValue(bookmarkRight.id); query.addBindValue(bookmarkRight.id);
mApp->dbWriter()->executeQuery(query); mApp->dbWriter()->executeQuery(query);
@ -179,12 +179,12 @@ void BookmarksToolbar::moveLeft()
Bookmark bookmarkLeft = buttonLeft->data().value<Bookmark>(); Bookmark bookmarkLeft = buttonLeft->data().value<Bookmark>();
QSqlQuery query; QSqlQuery query;
query.prepare("UPDATE bookmarks SET toolbar_position=? WHERE id=?"); query.prepare("UPDATE bookmarks SET position=? WHERE id=?");
query.addBindValue(index - 1); query.addBindValue(index - 1);
query.addBindValue(bookmark.id); query.addBindValue(bookmark.id);
mApp->dbWriter()->executeQuery(query); mApp->dbWriter()->executeQuery(query);
query.prepare("UPDATE bookmarks SET toolbar_position=? WHERE id=?"); query.prepare("UPDATE bookmarks SET position=? WHERE id=?");
query.addBindValue(index); query.addBindValue(index);
query.addBindValue(bookmarkLeft.id); query.addBindValue(bookmarkLeft.id);
mApp->dbWriter()->executeQuery(query); mApp->dbWriter()->executeQuery(query);
@ -419,7 +419,7 @@ void BookmarksToolbar::addBookmark(const BookmarksModel::Bookmark &bookmark)
m_layout->insertWidget(indexForBookmark, button); m_layout->insertWidget(indexForBookmark, button);
QSqlQuery query; QSqlQuery query;
query.prepare("UPDATE bookmarks SET toolbar_position=? WHERE id=?"); query.prepare("UPDATE bookmarks SET position=? WHERE id=?");
query.addBindValue(indexForBookmark); query.addBindValue(indexForBookmark);
query.addBindValue(bookmark.id); query.addBindValue(bookmark.id);
mApp->dbWriter()->executeQuery(query); mApp->dbWriter()->executeQuery(query);
@ -482,7 +482,7 @@ void BookmarksToolbar::bookmarkEdited(const BookmarksModel::Bookmark &before, co
void BookmarksToolbar::refreshBookmarks() void BookmarksToolbar::refreshBookmarks()
{ {
QSqlQuery query; QSqlQuery query;
query.exec("SELECT id, title, url, icon FROM bookmarks WHERE folder='bookmarksToolbar' ORDER BY toolbar_position"); query.exec("SELECT id, title, url, icon FROM bookmarks WHERE folder='bookmarksToolbar' ORDER BY position");
while (query.next()) { while (query.next()) {
Bookmark bookmark; Bookmark bookmark;
bookmark.id = query.value(0).toInt(); bookmark.id = query.value(0).toInt();