summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-06-28 19:30:15 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-07-02 12:34:34 +0200
commit707963c2640948aa0fcf2fd6b4651690c8d43ef4 (patch)
treef4583ff38d5551f2d7525cdbf4570170fd45957a /src
parentc16126ae22a3c1ae7dfc2513eb6a924ea8689a10 (diff)
downloadkopete-otr-707963c2640948aa0fcf2fd6b4651690c8d43ef4.tar.gz
kopete-otr-707963c2640948aa0fcf2fd6b4651690c8d43ef4.zip
Fix FTBFS with Clang.
Use TQStringList instead of TQString[5]. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src')
-rw-r--r--src/otrlconfinterface.cpp25
-rw-r--r--src/otrlconfinterface.h2
-rw-r--r--src/otrpreferences.cpp9
3 files changed, 19 insertions, 17 deletions
diff --git a/src/otrlconfinterface.cpp b/src/otrlconfinterface.cpp
index dc79ee5..7a025bd 100644
--- a/src/otrlconfinterface.cpp
+++ b/src/otrlconfinterface.cpp
@@ -103,37 +103,38 @@ void OtrlConfInterface::generateNewPrivKey( TQString accountId, TQString protoco
popup->close();
}
-TQValueList<TQString[5]> OtrlConfInterface::readAllFingerprints(){
+TQValueList<TQStringList> OtrlConfInterface::readAllFingerprints(){
ConnContext *context;
Fingerprint *fingerprint;
- TQString entry[5];
+ TQStringList entry;
char hash[45];
- TQValueList<TQString[5]> list;
+ TQValueList<TQStringList> list;
for( context = userstate->context_root; context != NULL; context = context->next ){
fingerprint = context->fingerprint_root.next;
while( fingerprint ){
- entry[0] = context->username;
+ entry.clear();
+ entry << context->username;
if( ( context->msgstate == OTRL_MSGSTATE_ENCRYPTED ) && ( context->active_fingerprint != fingerprint ) ){
- entry[1] = i18n("Unused");
+ entry << i18n("Unused");
} else {
if (context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED) {
if (context->active_fingerprint->trust && context->active_fingerprint->trust[0] != 0) {
- entry[1] = i18n("Private");
+ entry << i18n("Private");
} else {
- entry[1] = i18n("Unverified");
+ entry << i18n("Unverified");
}
} else if (context && context->msgstate == OTRL_MSGSTATE_FINISHED) {
- entry[1] = i18n("Finished");
+ entry << i18n("Finished");
} else {
- entry[1] = i18n("Not Private");
+ entry << i18n("Not Private");
}
}
- entry[2] = ( fingerprint->trust && fingerprint->trust[0] ) ? i18n("Yes") : i18n("No") ;
+ entry << ((fingerprint->trust && fingerprint->trust[0]) ? i18n("Yes") : i18n("No"));
otrl_privkey_hash_to_human( hash, fingerprint->fingerprint );
- entry[3] = hash;
- entry[4] = context->protocol;
+ entry << hash;
+ entry << context->protocol;
list << entry;
fingerprint = fingerprint->next;
}
diff --git a/src/otrlconfinterface.h b/src/otrlconfinterface.h
index d0579f7..0e743e2 100644
--- a/src/otrlconfinterface.h
+++ b/src/otrlconfinterface.h
@@ -49,7 +49,7 @@ public:
TQString getPrivFingerprint( TQString accountId, TQString protocol );
void generateNewPrivKey( TQString accountId, TQString protocol );
- TQValueList<TQString[5]> readAllFingerprints();
+ TQValueList<TQStringList> readAllFingerprints();
bool hasPrivFingerprint( TQString accountId, TQString protocol);
void forgetFingerprint( TQString strFingerprint );
void verifyFingerprint( TQString strFingerprint, bool trust );
diff --git a/src/otrpreferences.cpp b/src/otrpreferences.cpp
index 6f6fafe..b88c602 100644
--- a/src/otrpreferences.cpp
+++ b/src/otrpreferences.cpp
@@ -139,13 +139,14 @@ void OTRPreferences::showPrivFingerprint( int accountnr )
void OTRPreferences::fillFingerprints(){
TQTable *fingerprintsTable = preferencesDialog->tbFingerprints;
preferencesDialog->tbFingerprints->setNumRows(0);
- TQValueList<TQString[5]> list = otrlConfInterface->readAllFingerprints();
- TQValueList<TQString[5]>::iterator it;
+ TQValueList<TQStringList> list = otrlConfInterface->readAllFingerprints();
+ TQValueList<TQStringList>::iterator it;
int j = 0;
for( it = list.begin(); it != list.end(); ++it ){
preferencesDialog->tbFingerprints->setNumRows( preferencesDialog->tbFingerprints->numRows() +1 );
- (*it)[0] = OtrlChatInterface::self()->formatContact((*it)[0]);
- for( int i = 0; i < 5; i++ ){
+ fingerprintsTable->setItem(j, 0, new TQAlignTableItem(fingerprintsTable, TQTableItem::Never,
+ OtrlChatInterface::self()->formatContact((*it)[0]), TQt::AlignLeft));
+ for( int i = 1; i < 5; i++ ){
//preferencesDialog->tbFingerprints->setText(j, i, (*it)[i] );
fingerprintsTable->setItem(j,i, new TQAlignTableItem(fingerprintsTable, TQTableItem::Never,(*it)[i],TQt::AlignLeft));
}