~ubuntu-branches/ubuntu/vivid/fbreader/vivid-proposed

« back to all changes in this revision

Viewing changes to fbreader/src/migration/migrate.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Eugene V. Lyubimkin
  • Date: 2008-06-17 23:01:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617230153-a16c45tq69j8geru
Tags: 0.8.17-11
* debian/control:
  - Enhanced all ZLibrary descriptions, not the main one.
  - Done some renaming to use canonical names of libraries and toolkits in
    decriptions, as suggested by developers-reference:
    'qt' -> 'Qt', 'gtk' -> 'GTK+', 'zlibrary' -> 'ZLibrary'.
  - Bump 'Depends' on quilt to (>= 0.24).
* debian/rules:
  - Included quilt makefile instead of quilt makefile instead
    of copy&paste'ing it.
* debian/fbreader.links:
  - Added this file to relay on dh_link's work instead of using 'ln -sf'
    directly in the debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "Migration.h"
23
23
#include "migrate.h"
24
24
 
25
 
void migrateFromOldVersions() {
 
25
MigrationRunnable::MigrationRunnable() :
 
26
        myVersionOption(FBCategoryKey::SYSTEM, "Version", "FBReaderVersion", "0") {
 
27
}
 
28
 
 
29
bool MigrationRunnable::shouldMigrate() const {
 
30
        return myVersionOption.value() < VERSION;
 
31
}
 
32
 
 
33
void MigrationRunnable::run() {
26
34
        Migration_0_8_11().doMigration();
 
35
        Migration_0_8_13().doMigration();
 
36
        Migration_0_8_16().doMigration();
27
37
 
28
 
        ZLStringOption(FBCategoryKey::SYSTEM, "Version", "FBReaderVersion", "0").setValue(VERSION);
 
38
        myVersionOption.setValue(VERSION);
29
39
}