Ignore:
Timestamp:
06/23/11 23:30:13 (12 years ago)
Author:
gregor herrmann <gregoa@…>
Branches:
master, qt5
Children:
52d0741
Parents:
8fdfc63
Message:

Move config and sqlite database. They are both at the xdg-specified locations now:
~/.local/share/data/Toastfreeware/ConfClerk/ConfClerk.sqlite
~/.config/Toastfreeware/ConfClerk.conf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r8fdfc63 r9f97eaf  
    2626
    2727#include <QDir>
     28#include <QDesktopServices>
    2829#include "sqlengine.h"
    2930#include <track.h>
     
    7778{
    7879    QString databaseName;
    79     if(!QDir::home().exists(".fosdem"))
    80         QDir::home().mkdir(".fosdem");
    81     databaseName = QDir::homePath() + "/.fosdem/" + "fosdem.sqlite";
     80    QString dataDirName;
     81    dataDirName = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
     82    QDir dataDir = QDir(dataDirName).absolutePath();
     83    if(!dataDir.exists())
     84        dataDir.mkpath(dataDirName);
     85    databaseName = dataDirName + "ConfClerk.sqlite";
    8286    login("QSQLITE",databaseName);
    8387}
Note: See TracChangeset for help on using the changeset viewer.