projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clang-tidy: Avoid another bogus warning about a potential leak
[quassel.git]
/
src
/
client
/
coreconnection.cpp
diff --git
a/src/client/coreconnection.cpp
b/src/client/coreconnection.cpp
index
b0c4feb
..
4127152
100644
(file)
--- a/
src/client/coreconnection.cpp
+++ b/
src/client/coreconnection.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
6
by the Quassel Project *
+ * Copyright (C) 2005-201
8
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-184,6
+184,15
@@
void CoreConnection::onlineStateChanged(bool isOnline)
}
}
+QPointer<Peer> CoreConnection::peer() const
+{
+ if (_peer) {
+ return _peer;
+ }
+ return _authHandler ? _authHandler->peer() : nullptr;
+}
+
+
bool CoreConnection::isEncrypted() const
{
return _peer && _peer->isSecure();
bool CoreConnection::isEncrypted() const
{
return _peer && _peer->isSecure();
@@
-372,14
+381,13
@@
void CoreConnection::connectToCurrentAccount()
qWarning() << "Cannot connect to internal core in client-only mode!";
return;
}
qWarning() << "Cannot connect to internal core in client-only mode!";
return;
}
- emit startInternalCore();
InternalPeer *peer = new InternalPeer();
_peer = peer;
Client::instance()->signalProxy()->addPeer(peer); // sigproxy will take ownership
InternalPeer *peer = new InternalPeer();
_peer = peer;
Client::instance()->signalProxy()->addPeer(peer); // sigproxy will take ownership
+ emit connectionMsg(tr("Initializing..."));
emit connectToInternalCore(peer);
setState(Connected);
emit connectToInternalCore(peer);
setState(Connected);
-
return;
}
return;
}
@@
-463,9
+471,6
@@
void CoreConnection::onHandshakeComplete(RemotePeer *peer, const Protocol::Sessi
void CoreConnection::internalSessionStateReceived(const Protocol::SessionState &sessionState)
{
updateProgress(100, 100);
void CoreConnection::internalSessionStateReceived(const Protocol::SessionState &sessionState)
{
updateProgress(100, 100);
-
- Client::setCoreFeatures(Quassel::features()); // mono connection...
-
setState(Synchronizing);
syncToCore(sessionState);
}
setState(Synchronizing);
syncToCore(sessionState);
}