Fix compile errors and warnings

This commit is contained in:
Duke Leto
2021-05-29 12:54:25 -04:00
parent 35593443b5
commit f3c3684f88
2 changed files with 9 additions and 38 deletions

View File

@@ -65,11 +65,12 @@ void ChatModel::addMessage(QString timestamp, ChatItem item)
void ChatModel::showMessages()
{
/*
for(auto &c : this->chatItems)
{
}
*/
}
void ChatModel::addAddressbylabel(QString address, QString label)
@@ -79,11 +80,6 @@ void ChatModel::addAddressbylabel(QString address, QString label)
QString ChatModel::Addressbylabel(QString address)
{
for(auto& pair : this->AddressbyLabelMap)
{
}
if(this->AddressbyLabelMap.count(address) > 0)
{
return this->AddressbyLabelMap[address];
@@ -306,11 +302,6 @@ void ChatModel::addconfirmations(QString tx, int confirmation)
QString ChatModel::getCidByTx(QString tx)
{
for(auto& pair : this->cidMap)
{
}
if(this->cidMap.count(tx) > 0)
{
return this->cidMap[tx];
@@ -321,11 +312,6 @@ QString ChatModel::getCidByTx(QString tx)
QString ChatModel::getMemoByTx(QString tx)
{
for(auto& pair : this->OldMemoByTx)
{
}
if(this->OldMemoByTx.count(tx) > 0)
{
return this->OldMemoByTx[tx];
@@ -339,11 +325,6 @@ QString ChatModel::getMemoByTx(QString tx)
QString ChatModel::getHeaderByTx(QString tx)
{
for(auto& pair : this->headerMap)
{
}
if(this->headerMap.count(tx) > 0)
{
return this->headerMap[tx];
@@ -354,11 +335,6 @@ QString ChatModel::getHeaderByTx(QString tx)
QString ChatModel::getConfirmationByTx(QString tx)
{
for(auto& pair : this->confirmationsMap)
{
}
if(this->confirmationsMap.count(tx) > 0)
{
return this->confirmationsMap[tx];
@@ -369,11 +345,6 @@ QString ChatModel::getConfirmationByTx(QString tx)
QString ChatModel::getrequestZaddrByTx(QString tx)
{
for(auto& pair : this->requestZaddrMap)
{
}
if(this->requestZaddrMap.count(tx) > 0)
{
return this->requestZaddrMap[tx];
@@ -480,7 +451,7 @@ Tx MainWindow::createTxFromChatPage() {
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
this->logger->write("Suspicious keypair, bail out ");
qDebug() << __func__<< ": Suspicious client public outgoing key from crypto_kx_seed_keypair, aborting!";
return;
return tx;
}
////////////////Get the pubkey from Bob, so we can create the share key
@@ -493,7 +464,7 @@ Tx MainWindow::createTxFromChatPage() {
if (crypto_kx_server_session_keys(server_rx, server_tx, pk, sk, pubkeyBob) != 0) {
this->logger->write("Suspicious client public send key, bail out ");
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_server_session_keys, aborting!";
return;
return tx;
}
@@ -825,7 +796,7 @@ Tx MainWindow::createTxForSafeContactRequest()
if (crypto_kx_seed_keypair(pk, sk, MESSAGEAS1) !=0) {
this->logger->write("Suspicious client public contact request key, bail out ");
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_seed_keypair, aborting!";
return;
return tx;
}
QString publicKey = QByteArray(reinterpret_cast<const char*>(pk), crypto_kx_PUBLICKEYBYTES).toHex();

View File

@@ -1887,7 +1887,7 @@ Tx MainWindow::createTxFromSendChatPage() {
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
this->logger->write("Suspicious keypair, bail out ");
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_seed_keypair, aborting!";
return;
return tx;
}
////////////////Get the pubkey from Bob, so we can create the share key
@@ -1898,7 +1898,7 @@ Tx MainWindow::createTxFromSendChatPage() {
if (crypto_kx_server_session_keys(server_rx, server_tx, pk, sk, pubkeyBob) != 0) {
this->logger->write("Suspicious client public send key, bail out ");
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_server_session_keys, aborting!";
return;
return tx;
}
@@ -2175,7 +2175,7 @@ Tx MainWindow::createTxFromSendRequestChatPage() {
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
this->logger->write("Suspicious keypair, bail out ");
qDebug() << __func__<< ": Suspicious client public outgoing key from crypto_kx_seed_keypair, aborting!";
return;
return tx;
}
////////////////Get the pubkey from Bob, so we can create the share key
@@ -2186,7 +2186,7 @@ Tx MainWindow::createTxFromSendRequestChatPage() {
if (crypto_kx_server_session_keys(server_rx, server_tx, pk, sk, pubkeyBob) != 0) {
this->logger->write("Suspicious client public send key, bail out ");
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_server_session_keys, aborting!";
return;
return tx;
}