Fix compile errors and warnings
This commit is contained in:
@@ -65,11 +65,12 @@ void ChatModel::addMessage(QString timestamp, ChatItem item)
|
|||||||
|
|
||||||
void ChatModel::showMessages()
|
void ChatModel::showMessages()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
for(auto &c : this->chatItems)
|
for(auto &c : this->chatItems)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatModel::addAddressbylabel(QString address, QString label)
|
void ChatModel::addAddressbylabel(QString address, QString label)
|
||||||
@@ -79,11 +80,6 @@ void ChatModel::addAddressbylabel(QString address, QString label)
|
|||||||
|
|
||||||
QString ChatModel::Addressbylabel(QString address)
|
QString ChatModel::Addressbylabel(QString address)
|
||||||
{
|
{
|
||||||
for(auto& pair : this->AddressbyLabelMap)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this->AddressbyLabelMap.count(address) > 0)
|
if(this->AddressbyLabelMap.count(address) > 0)
|
||||||
{
|
{
|
||||||
return this->AddressbyLabelMap[address];
|
return this->AddressbyLabelMap[address];
|
||||||
@@ -306,11 +302,6 @@ void ChatModel::addconfirmations(QString tx, int confirmation)
|
|||||||
|
|
||||||
QString ChatModel::getCidByTx(QString tx)
|
QString ChatModel::getCidByTx(QString tx)
|
||||||
{
|
{
|
||||||
for(auto& pair : this->cidMap)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this->cidMap.count(tx) > 0)
|
if(this->cidMap.count(tx) > 0)
|
||||||
{
|
{
|
||||||
return this->cidMap[tx];
|
return this->cidMap[tx];
|
||||||
@@ -321,11 +312,6 @@ QString ChatModel::getCidByTx(QString tx)
|
|||||||
|
|
||||||
QString ChatModel::getMemoByTx(QString tx)
|
QString ChatModel::getMemoByTx(QString tx)
|
||||||
{
|
{
|
||||||
for(auto& pair : this->OldMemoByTx)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this->OldMemoByTx.count(tx) > 0)
|
if(this->OldMemoByTx.count(tx) > 0)
|
||||||
{
|
{
|
||||||
return this->OldMemoByTx[tx];
|
return this->OldMemoByTx[tx];
|
||||||
@@ -339,11 +325,6 @@ QString ChatModel::getMemoByTx(QString tx)
|
|||||||
|
|
||||||
QString ChatModel::getHeaderByTx(QString tx)
|
QString ChatModel::getHeaderByTx(QString tx)
|
||||||
{
|
{
|
||||||
for(auto& pair : this->headerMap)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this->headerMap.count(tx) > 0)
|
if(this->headerMap.count(tx) > 0)
|
||||||
{
|
{
|
||||||
return this->headerMap[tx];
|
return this->headerMap[tx];
|
||||||
@@ -354,11 +335,6 @@ QString ChatModel::getHeaderByTx(QString tx)
|
|||||||
|
|
||||||
QString ChatModel::getConfirmationByTx(QString tx)
|
QString ChatModel::getConfirmationByTx(QString tx)
|
||||||
{
|
{
|
||||||
for(auto& pair : this->confirmationsMap)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this->confirmationsMap.count(tx) > 0)
|
if(this->confirmationsMap.count(tx) > 0)
|
||||||
{
|
{
|
||||||
return this->confirmationsMap[tx];
|
return this->confirmationsMap[tx];
|
||||||
@@ -369,11 +345,6 @@ QString ChatModel::getConfirmationByTx(QString tx)
|
|||||||
|
|
||||||
QString ChatModel::getrequestZaddrByTx(QString tx)
|
QString ChatModel::getrequestZaddrByTx(QString tx)
|
||||||
{
|
{
|
||||||
for(auto& pair : this->requestZaddrMap)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this->requestZaddrMap.count(tx) > 0)
|
if(this->requestZaddrMap.count(tx) > 0)
|
||||||
{
|
{
|
||||||
return this->requestZaddrMap[tx];
|
return this->requestZaddrMap[tx];
|
||||||
@@ -480,7 +451,7 @@ Tx MainWindow::createTxFromChatPage() {
|
|||||||
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
|
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
|
||||||
this->logger->write("Suspicious keypair, bail out ");
|
this->logger->write("Suspicious keypair, bail out ");
|
||||||
qDebug() << __func__<< ": Suspicious client public outgoing key from crypto_kx_seed_keypair, aborting!";
|
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
|
////////////////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) {
|
if (crypto_kx_server_session_keys(server_rx, server_tx, pk, sk, pubkeyBob) != 0) {
|
||||||
this->logger->write("Suspicious client public send key, bail out ");
|
this->logger->write("Suspicious client public send key, bail out ");
|
||||||
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_server_session_keys, aborting!";
|
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) {
|
if (crypto_kx_seed_keypair(pk, sk, MESSAGEAS1) !=0) {
|
||||||
this->logger->write("Suspicious client public contact request key, bail out ");
|
this->logger->write("Suspicious client public contact request key, bail out ");
|
||||||
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_seed_keypair, aborting!";
|
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();
|
QString publicKey = QByteArray(reinterpret_cast<const char*>(pk), crypto_kx_PUBLICKEYBYTES).toHex();
|
||||||
|
|||||||
@@ -1887,7 +1887,7 @@ Tx MainWindow::createTxFromSendChatPage() {
|
|||||||
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
|
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
|
||||||
this->logger->write("Suspicious keypair, bail out ");
|
this->logger->write("Suspicious keypair, bail out ");
|
||||||
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_seed_keypair, aborting!";
|
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
|
////////////////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) {
|
if (crypto_kx_server_session_keys(server_rx, server_tx, pk, sk, pubkeyBob) != 0) {
|
||||||
this->logger->write("Suspicious client public send key, bail out ");
|
this->logger->write("Suspicious client public send key, bail out ");
|
||||||
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_server_session_keys, aborting!";
|
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) {
|
if (crypto_kx_seed_keypair(pk,sk, MESSAGEAS1) !=0) {
|
||||||
this->logger->write("Suspicious keypair, bail out ");
|
this->logger->write("Suspicious keypair, bail out ");
|
||||||
qDebug() << __func__<< ": Suspicious client public outgoing key from crypto_kx_seed_keypair, aborting!";
|
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
|
////////////////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) {
|
if (crypto_kx_server_session_keys(server_rx, server_tx, pk, sk, pubkeyBob) != 0) {
|
||||||
this->logger->write("Suspicious client public send key, bail out ");
|
this->logger->write("Suspicious client public send key, bail out ");
|
||||||
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_server_session_keys, aborting!";
|
qDebug() << __func__ << ": Suspicious client public send key from crypto_kx_server_session_keys, aborting!";
|
||||||
return;
|
return tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user