Subversion Repositories public iLand

Rev

Rev 278 | Rev 504 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 278 Rev 395
Line 50... Line 50...
50
        bool enabled = xml.valueBool(".enabled", false);
50
        bool enabled = xml.valueBool(".enabled", false);
51
        o->setEnabled(enabled);
51
        o->setEnabled(enabled);
52
        if (enabled)
52
        if (enabled)
53
            o->open();
53
            o->open();
54
    }
54
    }
55
    endTransaction(); // just to be sur
-
 
-
 
55
    endTransaction(); // just to be sure
56
}
56
}
57
57
58
Output *OutputManager::find(const QString& tableName)
58
Output *OutputManager::find(const QString& tableName)
59
{
59
{
60
    foreach(Output* p,mOutputs)
60
    foreach(Output* p,mOutputs)
Line 73... Line 73...
73
    qDebug() << "outputs closed";
73
    qDebug() << "outputs closed";
74
    foreach(Output *p, mOutputs)
74
    foreach(Output *p, mOutputs)
75
        p->close();
75
        p->close();
76
}
76
}
77
77
-
 
78
/** start a database transaction.
-
 
79
    do nothing if transaction is already open. */
78
void OutputManager::startTransaction()
80
void OutputManager::startTransaction()
79
{
81
{
80
    if (!mTransactionOpen && GlobalSettings::instance()->dbout().isValid()) {
82
    if (!mTransactionOpen && GlobalSettings::instance()->dbout().isValid()) {
81
        if (GlobalSettings::instance()->dbout().transaction()) {
83
        if (GlobalSettings::instance()->dbout().transaction()) {
82
            qDebug() << "opening transaction";
84
            qDebug() << "opening transaction";