X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=31a409f51b9b9b6588b2115bec32f76db6849850;hp=ebfe4914ce386a3168038a5315f858be175c382a;hb=bf01681e9e6108517bfa997422b84e04b801a40a;hpb=c8f0fad36b10552494f8ec3c3a45b52a3f0d2663 diff --git a/src/core/core.cpp b/src/core/core.cpp index ebfe4914..31a409f5 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -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 Core::requestBuffers(UserId user) { return instance()->storage->requestBuffers(user); } +QList 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 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(); @@ -386,8 +394,8 @@ void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) { QVariantMap reply; // Just version information -- check it! - if(msg.contains("ClientBuild") && msg["ClientBuild"].toUInt() < 732 - || !msg.contains("ClientBuild") && msg["ProtocolVersion"].toUInt() < Global::coreNeedsProtocol) { + if((msg.contains("ClientBuild") && msg["ClientBuild"].toUInt() < 732) + || (!msg.contains("ClientBuild") && msg["ProtocolVersion"].toUInt() < Global::coreNeedsProtocol)) { reply["MsgType"] = "ClientInitReject"; reply["Error"] = tr("Your Quassel Client is too old!
" "This core needs at least client/core protocol version %1.
"