Fix default button behavior in CoreConnectDlg.
[quassel.git] / src / core / sqlitestorage.cpp
index 49476e9..a20640c 100644 (file)
@@ -33,17 +33,19 @@ SqliteStorage::SqliteStorage(QObject *parent)
 SqliteStorage::~SqliteStorage() {
 }
 
-bool SqliteStorage::isAvailable() {
+bool SqliteStorage::isAvailable() const {
   if(!QSqlDatabase::isDriverAvailable("QSQLITE")) return false;
   return true;
 }
 
-QString SqliteStorage::displayName() {
+QString SqliteStorage::displayName() const {
   return QString("SQLite");
 }
 
-QString SqliteStorage::engineName() {
-  return SqliteStorage::displayName();
+QString SqliteStorage::description() const {
+  return tr("SQLite is a file-based database engine that does not require any setup. It is suitable for small and medium-sized "
+            "databases that do not require access via network. Use SQLite if your Quassel Core should store its data on the same machine "
+            "it is running on, and if you only expect a few users to use your core.");
 }
 
 int SqliteStorage::installedSchemaVersion() {
@@ -173,6 +175,7 @@ void SqliteStorage::createBuffer(UserId user, const NetworkId &networkId, const
   query->bindValue(":userid", user.toInt());
   query->bindValue(":networkid", networkId.toInt());
   query->bindValue(":buffername", buffer);
+  query->bindValue(":buffercname", buffer.toLower());
   query->exec();
 
   watchQuery(query);
@@ -182,7 +185,7 @@ BufferInfo SqliteStorage::getBufferInfo(UserId user, const NetworkId &networkId,
   QSqlQuery *query = cachedQuery("select_bufferByName");
   query->bindValue(":networkid", networkId.toInt());
   query->bindValue(":userid", user.toInt());
-  query->bindValue(":buffername", buffer);
+  query->bindValue(":buffercname", buffer.toLower());
   query->exec();
 
   if(!query->first()) {