Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 349669
Collapse All | Expand All

(-)kdesdk-4.5.4/lokalize/src/project/projectmodel.cpp.orig (-16 / +10 lines)
Lines 1233-1253 Link Here
1233
{
1233
{
1234
}
1234
}
1235
1235
1236
static void initDb(QSqlDatabase& db)
1237
{
1238
    QSqlQuery queryMain(db);
1239
    queryMain.exec("PRAGMA encoding = \"UTF-8\"");
1240
    queryMain.exec("CREATE TABLE IF NOT EXISTS metainfo ("
1241
                   "filepath INTEGER PRIMARY KEY ON CONFLICT REPLACE, "// AUTOINCREMENT,"
1242
                   //"filepath TEXT UNIQUE ON CONFLICT REPLACE, "
1243
                   "metainfo BLOB, "//XLIFF markup info, see catalog/catalogstring.h catalog/xliff/*
1244
                   "changedate INTEGER"
1245
                   ")");
1246
1247
    //queryMain.exec("CREATE INDEX IF NOT EXISTS filepath_index ON metainfo ("filepath)");
1248
}
1249
1250
1251
static KFileMetaInfo cachedMetaInfo(const KFileItem& file)
1236
static KFileMetaInfo cachedMetaInfo(const KFileItem& file)
1252
{
1237
{
1253
    QString dbName="metainfocache";
1238
    QString dbName="metainfocache";
Lines 1257-1263 Link Here
1257
        db.setDatabaseName(KStandardDirs::locateLocal("appdata", dbName+".sqlite"));
1242
        db.setDatabaseName(KStandardDirs::locateLocal("appdata", dbName+".sqlite"));
1258
        if (KDE_ISUNLIKELY( !db.open() ))
1243
        if (KDE_ISUNLIKELY( !db.open() ))
1259
            return KFileMetaInfo(file.url());
1244
            return KFileMetaInfo(file.url());
1260
        initDb(db);
1245
        QSqlQuery queryMain(db);
1246
        queryMain.exec("PRAGMA encoding = \"UTF-8\"");
1247
        queryMain.exec("CREATE TABLE IF NOT EXISTS metainfo ("
1248
                       "filepath INTEGER PRIMARY KEY ON CONFLICT REPLACE, "// AUTOINCREMENT,"
1249
                       //"filepath TEXT UNIQUE ON CONFLICT REPLACE, "
1250
                       "metainfo BLOB, "//XLIFF markup info, see catalog/catalogstring.h catalog/xliff/*
1251
                       "changedate INTEGER"
1252
                       ")");
1253
1254
        //queryMain.exec("CREATE INDEX IF NOT EXISTS filepath_index ON metainfo ("filepath)");
1261
    }
1255
    }
1262
    QSqlDatabase db=QSqlDatabase::database(dbName);
1256
    QSqlDatabase db=QSqlDatabase::database(dbName);
1263
    if (!db.isOpen())
1257
    if (!db.isOpen())

Return to bug 349669