Skip to content

Commit

Permalink
fixes to title check of which method is being used
Browse files Browse the repository at this point in the history
  • Loading branch information
dannagle committed Oct 29, 2024
1 parent 14c8a44 commit 6ed240f
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/persistentconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ void PersistentConnection::init()
if(sendPacket.isDTLS()){
tcpOrSSL = "DTLS";
}
QDEBUGVAR(tcpOrSSL);
setWindowTitle(tcpOrSSL + "://" + sendPacket.toIP + ":" + QString::number(sendPacket.port));


Expand Down Expand Up @@ -275,17 +276,23 @@ void PersistentConnection::refreshTimerTimeout()
qint64 diff = startTime.msecsTo(QDateTime::currentDateTime());
QString winTitle = windowTitle();
if (sendPacket.isDTLS()){
if(winTitle.startsWith("TCP://")){
if(dthread->handShakeDone){
winTitle.replace("TCP://", "DTLS://");
setWindowTitle(winTitle);
}
if(dthread->handShakeDone){
winTitle.replace("TCP://", "DTLS://");
winTitle.replace("SSL://", "DTLS://");
} else {
winTitle.replace("SSL://", "TCP://");
winTitle.replace("DTLS://", "TCP://");
}
} else{
winTitle.replace("TCP://", "SSL://");
setWindowTitle(winTitle);
if(sendPacket.isSSL()) {
winTitle.replace("TCP://", "SSL://");
} else {
winTitle.replace("DTLS://", "TCP://");
winTitle.replace("SSL://", "TCP://");
}
}

setWindowTitle(winTitle);



Expand Down

0 comments on commit 6ed240f

Please sign in to comment.