Changeset 9f97eaf


Ignore:
Timestamp:
06/23/11 23:30:13 (10 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

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TODO

    r8fdfc63 r9f97eaf  
    2222- add contact info
    2323- .pro: maybe play with install target
     24- manpage
    2425
    2526--
     
    2930- DebConf (2010): http://penta.debconf.org/dc10_schedule/schedule.en.xml
    3031- 27C3: http://events.ccc.de/congress/2010/Fahrplan/schedule.en.xml
     32
     33~/.local/share/data/Toastfreeware/ConfClerk/ConfClerk.sqlite
     34~/.config/Toastfreeware/ConfClerk.conf
  • src/app/appsettings.cpp

    r8fdfc63 r9f97eaf  
    2424const QString PROXY_ISDIRECT_SETTING ("proxyIsDirectConnection");
    2525
    26 QSettings AppSettings::mSettings("Ixonos", "FOSDEM");
     26QSettings AppSettings::mSettings("Toastfreeware", "ConfClerk");
    2727
    2828QString AppSettings::proxyAddress()
  • src/app/main.cpp

    r8fdfc63 r9f97eaf  
    4141    Application::setWindowIcon(QIcon(":/icons/fosdem.png"));
    4242
     43    // needed by QDesktopServices
     44    QCoreApplication::setOrganizationName("Toastfreeware");
     45    QCoreApplication::setApplicationName("ConfClerk");
     46 
    4347    SqlEngine::initialize(); // creates "SQLITE" DB connection
    4448
  • 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.