Fix genversion error in unclean build directories
[quassel.git] / src / core / postgresqlstorage.cpp
index de06aec..0ae2d6d 100644 (file)
@@ -568,6 +568,9 @@ void PostgreSqlStorage::bindNetworkInfo(QSqlQuery &query, const NetworkInfo &inf
   query.bindValue(":useautoidentify", info.useAutoIdentify);
   query.bindValue(":autoidentifyservice", info.autoIdentifyService);
   query.bindValue(":autoidentifypassword", info.autoIdentifyPassword);
+  query.bindValue(":usesasl", info.useSasl);
+  query.bindValue(":saslaccount", info.saslAccount);
+  query.bindValue(":saslpassword", info.saslPassword);
   query.bindValue(":useautoreconnect", info.useAutoReconnect);
   query.bindValue(":autoreconnectinterval", info.autoReconnectInterval);
   query.bindValue(":autoreconnectretries", info.autoReconnectRetries);
@@ -707,6 +710,9 @@ QList<NetworkInfo> PostgreSqlStorage::networks(UserId user) {
     net.autoReconnectRetries = networksQuery.value(13).toInt();
     net.unlimitedReconnectRetries = networksQuery.value(14).toBool();
     net.rejoinChannels = networksQuery.value(15).toBool();
+    net.useSasl = networksQuery.value(16).toBool();
+    net.saslAccount = networksQuery.value(17).toString();
+    net.saslPassword = networksQuery.value(18).toString();
 
     serversQuery.bindValue(":networkid", net.networkId.toInt());
     safeExec(serversQuery);
@@ -907,7 +913,7 @@ BufferInfo PostgreSqlStorage::bufferInfo(UserId user, const NetworkId &networkId
   createQuery.bindValue(":buffertype", (int)type);
   createQuery.bindValue(":buffername", buffer);
   createQuery.bindValue(":buffercname", buffer.toLower());
-  createQuery.bindValue(":joined", type & BufferInfo::ChannelBuffer ? 1 : 0);
+  createQuery.bindValue(":joined", type & BufferInfo::ChannelBuffer ? true : false);
 
   safeExec(createQuery);
 
@@ -1151,7 +1157,7 @@ void PostgreSqlStorage::setBufferMarkerLineMsg(UserId user, const BufferId &buff
 
   query.bindValue(":userid", user.toInt());
   query.bindValue(":bufferid", bufferId.toInt());
-  query.bindValue(":lastseenmsgid", msgId.toInt());
+  query.bindValue(":markerlinemsgid", msgId.toInt());
   safeExec(query);
   watchQuery(query);
 }
@@ -1654,6 +1660,9 @@ bool PostgreSqlMigrationWriter::writeMo(const NetworkMO &network) {
   bindValue(19, network.awaymessage);
   bindValue(20, network.attachperform);
   bindValue(21, network.detachperform);
+  bindValue(22, network.usesasl);
+  bindValue(23, network.saslaccount);
+  bindValue(24, network.saslpassword);
   return exec();
 }