Client can only be disconnected or connected. In the latter state, we guarantee
that the typical connection-specific (syncable) objects at least exist (but may not
be fully synced yet).
It doesn't make much sense API-wise to distinguish between "connected" and "synced" state
of the Client object, as vital objects are created after being connected. In any case,
more detailed information is available via Client::coreConnection().
_messageProcessor(0),
_coreAccountModel(new CoreAccountModel(this)),
_coreConnection(new CoreConnection(_coreAccountModel, this)),
_messageProcessor(0),
_coreAccountModel(new CoreAccountModel(this)),
_coreConnection(new CoreConnection(_coreAccountModel, this)),
_debugLog(&_debugLogBuffer)
{
_signalProxy->synchronize(_ircListHelper);
_debugLog(&_debugLogBuffer)
{
_signalProxy->synchronize(_ircListHelper);
}
bool Client::isConnected() {
}
bool Client::isConnected() {
- return coreConnection()->state() >= CoreConnection::Connected;
-}
-
-bool Client::isSynced() {
- return coreConnection()->state() == CoreConnection::Synchronized;
+ return instance()->_connected;
}
bool Client::internalCore() {
}
bool Client::internalCore() {
// trigger backlog request once all active bufferviews are initialized
connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
// trigger backlog request once all active bufferviews are initialized
connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
emit connected();
emit coreConnectionStateChanged(true);
}
emit connected();
emit coreConnectionStateChanged(true);
}
}
void Client::setDisconnectedFromCore() {
}
void Client::setDisconnectedFromCore() {
emit disconnected();
emit coreConnectionStateChanged(false);
emit disconnected();
emit coreConnectionStateChanged(false);
static inline CoreAccount currentCoreAccount() { return coreConnection()->currentAccount(); }
static bool isConnected();
static inline CoreAccount currentCoreAccount() { return coreConnection()->currentAccount(); }
static bool isConnected();
- static bool isSynced();
static bool internalCore();
static void userInput(const BufferInfo &bufferInfo, const QString &message);
static bool internalCore();
static void userInput(const BufferInfo &bufferInfo, const QString &message);
QHash<NetworkId, Network *> _networks;
QHash<IdentityId, Identity *> _identities;
QHash<NetworkId, Network *> _networks;
QHash<IdentityId, Identity *> _identities;
QString _debugLogBuffer;
QTextStream _debugLog;
QString _debugLogBuffer;
QTextStream _debugLog;
connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(verticalScrollbarChanged(int)));
// only connect if client is synched with a core
connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(verticalScrollbarChanged(int)));
// only connect if client is synched with a core
+ if(Client::isConnected())
connect(Client::ignoreListManager(), SIGNAL(ignoreListChanged()), this, SLOT(invalidateFilter()));
}
connect(Client::ignoreListManager(), SIGNAL(ignoreListChanged()), this, SLOT(invalidateFilter()));
}
case Qt::Key_PageUp:
case Qt::Key_PageDown:
if(!verticalScrollBar()->isVisible()) {
case Qt::Key_PageUp:
case Qt::Key_PageDown:
if(!verticalScrollBar()->isVisible()) {
- scene()->requestBacklog();
- return true;
+ scene()->requestBacklog();
+ return true;