File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -764,6 +764,19 @@ QString NetworkToQString(Network net)
764764 assert (false );
765765}
766766
767+ QString ConnectionTypeToQString (ConnectionType conn_type)
768+ {
769+ switch (conn_type) {
770+ case ConnectionType::INBOUND: return QObject::tr (" Inbound" );
771+ case ConnectionType::OUTBOUND_FULL_RELAY: return QObject::tr (" Outbound Full Relay" );
772+ case ConnectionType::BLOCK_RELAY: return QObject::tr (" Outbound Block Relay" );
773+ case ConnectionType::MANUAL: return QObject::tr (" Outbound Manual" );
774+ case ConnectionType::FEELER: return QObject::tr (" Outbound Feeler" );
775+ case ConnectionType::ADDR_FETCH: return QObject::tr (" Outbound Address Fetch" );
776+ } // no default case, so the compiler can warn about missing cases
777+ assert (false );
778+ }
779+
767780QString formatDurationStr (int secs)
768781{
769782 QStringList strList;
Original file line number Diff line number Diff line change 77
88#include < amount.h>
99#include < fs.h>
10+ #include < net.h>
1011#include < netaddress.h>
1112
1213#include < QEvent>
1314#include < QHeaderView>
1415#include < QItemDelegate>
16+ #include < QLabel>
1517#include < QMessageBox>
1618#include < QObject>
1719#include < QProgressBar>
1820#include < QString>
1921#include < QTableView>
20- #include < QLabel>
2122
2223class QValidatedLineEdit ;
2324class SendCoinsRecipient ;
@@ -228,6 +229,9 @@ namespace GUIUtil
228229 /* * Convert enum Network to QString */
229230 QString NetworkToQString (Network net);
230231
232+ /* * Convert enum ConnectionType to QString */
233+ QString ConnectionTypeToQString (ConnectionType conn_type);
234+
231235 /* * Convert seconds into a QString with days, hours, mins, secs */
232236 QString formatDurationStr (int secs);
233237
You can’t perform that action at this time.
0 commit comments