Merge branch 'seezer'
[quassel.git] / src / core / core.cpp
index f9f8673..31a409f 100644 (file)
@@ -55,6 +55,9 @@ Core::Core() : storage(0) {
 
   if(!_storageBackends.count()) {
     qWarning() << qPrintable(tr("Could not initialize any storage backend! Exiting..."));
+    qWarning() << qPrintable(tr("Currently, Quassel only supports SQLite3. You need to build your\n"
+                                "Qt library with the sqlite plugin enabled in order for quasselcore\n"
+                                "to work."));
     exit(1); // TODO make this less brutal (especially for mono client -> popup)
   }
   connect(&_storageSyncTimer, SIGNAL(timeout()), this, SLOT(syncStorage()));
@@ -309,6 +312,11 @@ QList<BufferInfo> Core::requestBuffers(UserId user) {
   return instance()->storage->requestBuffers(user);
 }
 
+QList<BufferId> Core::requestBufferIdsForNetwork(UserId user, NetworkId networkId) {
+  QMutexLocker locker(&mutex);
+  return instance()->storage->requestBufferIdsForNetwork(user, networkId);
+}
+
 bool Core::removeBuffer(const UserId &user, const BufferId &bufferId) {
   QMutexLocker locker(&mutex);
   return instance()->storage->removeBuffer(user, bufferId);
@@ -333,7 +341,7 @@ QHash<BufferId, MsgId> Core::bufferLastSeenMsgIds(UserId user) {
 
 bool Core::startListening(uint port) {
   if(!server.listen(QHostAddress::Any, port)) {
-    qWarning(qPrintable(QString("Could not open GUI client port %1: %2").arg(port).arg(server.errorString())));
+    qWarning("%s", qPrintable(QString("Could not open GUI client port %1: %2").arg(port).arg(server.errorString())));
     return false;
   }
   qDebug() << "Listening for GUI clients on port" << server.serverPort();