- qWarning() << qPrintable(tr("Could not initialize any storage backend! Exiting..."));
- qWarning() << qPrintable(tr("Currently, Quassel only supports SQLite3. You need to build your\n"
+ quWarning() << qPrintable(tr("Could not initialize any storage backend! Exiting..."));
+ quWarning() << 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)
"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)
*/
QVariantList activeSessions = s.coreState().toMap()["ActiveSessions"].toList();
if(activeSessions.count() > 0) {
*/
QVariantList activeSessions = s.coreState().toMap()["ActiveSessions"].toList();
if(activeSessions.count() > 0) {
foreach(QVariant v, activeSessions) {
UserId user = v.value<UserId>();
instance()->createSession(user, true);
foreach(QVariant v, activeSessions) {
UserId user = v.value<UserId>();
instance()->createSession(user, true);
return configured = false;
}
if(!storage->init(dbSettings)) {
if(!setup || !(storage->setup(dbSettings) && storage->init(dbSettings))) {
return configured = false;
}
if(!storage->init(dbSettings)) {
if(!setup || !(storage->setup(dbSettings) && storage->init(dbSettings))) {
void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) {
if(!msg.contains("MsgType")) {
// Client is way too old, does not even use the current init format
void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) {
if(!msg.contains("MsgType")) {
// Client is way too old, does not even use the current init format
"This core needs at least client/core protocol version %1.<br>"
"Please consider upgrading your client.").arg(Global::coreNeedsProtocol);
SignalProxy::writeDataToDevice(socket, reply);
"This core needs at least client/core protocol version %1.<br>"
"Please consider upgrading your client.").arg(Global::coreNeedsProtocol);
SignalProxy::writeDataToDevice(socket, reply);
#ifndef QT_NO_OPENSSL
// after we told the client that we are ssl capable we switch to ssl mode
if(supportSsl && msg["UseSsl"].toBool()) {
#ifndef QT_NO_OPENSSL
// after we told the client that we are ssl capable we switch to ssl mode
if(supportSsl && msg["UseSsl"].toBool()) {
connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(sslErrors(const QList<QSslError> &)));
sslSocket->startServerEncryption();
}
connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(sslErrors(const QList<QSslError> &)));
sslSocket->startServerEncryption();
}
#ifndef QT_NO_COMPRESS
if(supportsCompression && msg["UseCompression"].toBool()) {
socket->setProperty("UseCompression", true);
#ifndef QT_NO_COMPRESS
if(supportsCompression && msg["UseCompression"].toBool()) {
socket->setProperty("UseCompression", true);
reply["MsgType"] = "ClientLoginReject";
reply["Error"] = tr("<b>Client not initialized!</b><br>You need to send an init message before trying to login.");
SignalProxy::writeDataToDevice(socket, reply);
reply["MsgType"] = "ClientLoginReject";
reply["Error"] = tr("<b>Client not initialized!</b><br>You need to send an init message before trying to login.");
SignalProxy::writeDataToDevice(socket, reply);
}
reply["MsgType"] = "ClientLoginAck";
SignalProxy::writeDataToDevice(socket, reply);
}
reply["MsgType"] = "ClientLoginAck";
SignalProxy::writeDataToDevice(socket, reply);
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
if(socket) {
// here it's safe to call methods on socket!
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender());
if(socket) {
// here it's safe to call methods on socket!
blocksizes.remove(socket);
clientInfo.remove(socket);
socket->deleteLater();
} else {
// we have to crawl through the hashes and see if we find a victim to remove
blocksizes.remove(socket);
clientInfo.remove(socket);
socket->deleteLater();
} else {
// we have to crawl through the hashes and see if we find a victim to remove
SessionThread *Core::createSession(UserId uid, bool restore) {
if(sessions.contains(uid)) {
SessionThread *Core::createSession(UserId uid, bool restore) {
if(sessions.contains(uid)) {
void Core::socketError(QAbstractSocket::SocketError err) {
QAbstractSocket *socket = qobject_cast<QAbstractSocket *>(sender());
if(socket && err != QAbstractSocket::RemoteHostClosedError)
void Core::socketError(QAbstractSocket::SocketError err) {
QAbstractSocket *socket = qobject_cast<QAbstractSocket *>(sender());
if(socket && err != QAbstractSocket::RemoteHostClosedError)