}
if(!db.commit()) {
- qWarning() << "PostgreSqlStorage::updateNetwork(): commiting data failed!";
+ qWarning() << "PostgreSqlStorage::createNetwork(): commiting data failed!";
qWarning() << " -" << qPrintable(db.lastError().text());
return NetworkId();
}
void PostgreSqlStorage::bindNetworkInfo(QSqlQuery &query, const NetworkInfo &info) {
query.bindValue(":networkname", info.networkName);
- query.bindValue(":identityid", info.identity.toInt());
+ query.bindValue(":identityid", info.identity.isValid() ? info.identity.toInt() : QVariant());
query.bindValue(":encodingcodec", QString(info.codecForEncoding));
query.bindValue(":decodingcodec", QString(info.codecForDecoding));
query.bindValue(":servercodec", QString(info.codecForServer));
return false;
case 1:
db.commit();
- return false;
+ return true;
default:
// there was more then one buffer deleted...
qWarning() << "PostgreSqlStorage::removeBuffer(): Userid" << user << "BufferId" << "caused deletion of" << numRows << "Buffers! Rolling back transaction...";
return false;
case 1:
db.commit();
- return false;
+ return true;
default:
// there was more then one buffer deleted...
qWarning() << "PostgreSqlStorage::renameBuffer(): Userid" << user << "BufferId" << "affected" << numRows << "Buffers! Rolling back transaction...";