Browse Source

qt: small improv

pull/1606/head
user 4 years ago
parent
commit
d4b6485102
  1. 3
      qt/i2pd_qt/i2pd_qt.pro
  2. 7
      qt/i2pd_qt/mainwindow.h

3
qt/i2pd_qt/i2pd_qt.pro

@ -9,7 +9,10 @@ CONFIG += strict_c++ c++11 @@ -9,7 +9,10 @@ CONFIG += strict_c++ c++11
CONFIG(debug, debug|release) {
message(Debug build)
# do not redirect logging to std::ostream and to Log pane
DEFINES += DEBUG_WITH_DEFAULT_LOGGING
I2PDMAKE += DEBUG=yes
} else {
message(Release build)

7
qt/i2pd_qt/mainwindow.h

@ -118,7 +118,7 @@ public: @@ -118,7 +118,7 @@ public:
std::string optName="";
if(!option.section.isEmpty())optName=option.section.toStdString()+std::string(".");
optName+=option.option.toStdString();
qDebug() << "loadFromConfigOption[" << optName.c_str() << "]";
//qDebug() << "loadFromConfigOption[" << optName.c_str() << "]";
boost::any programOption;
i2p::config::GetOptionAsAny(optName, programOption);
optionValue=programOption.empty()?boost::any(std::string(""))
@ -290,7 +290,7 @@ public: @@ -290,7 +290,7 @@ public:
virtual void installListeners(MainWindow *mainWindow);
virtual void loadFromConfigOption(){
MainWindowItem::loadFromConfigOption();
qDebug() << "setting value for checkbox " << checkBox->text();
//qDebug() << "setting value for checkbox " << checkBox->text();
checkBox->setChecked(boost::any_cast<bool>(optionValue));
}
virtual void saveToStringStream(std::stringstream& out){
@ -769,16 +769,13 @@ private: @@ -769,16 +769,13 @@ private:
std::string dest;
if (type == I2P_TUNNELS_SECTION_TYPE_CLIENT || type == I2P_TUNNELS_SECTION_TYPE_UDPCLIENT) {
dest = section.second.get<std::string> (I2P_CLIENT_TUNNEL_DESTINATION);
std::cout << "had read tunnel dest: " << dest << std::endl;
}
int port = section.second.get<int> (I2P_CLIENT_TUNNEL_PORT);
std::cout << "had read tunnel port: " << port << std::endl;
// optional params
std::string keys = section.second.get (I2P_CLIENT_TUNNEL_KEYS, "");
std::string address = section.second.get (I2P_CLIENT_TUNNEL_ADDRESS, "127.0.0.1");
int cryptoType = section.second.get<int>(I2P_CLIENT_TUNNEL_CRYPTO_TYPE, 0);
int destinationPort = section.second.get<int>(I2P_CLIENT_TUNNEL_DESTINATION_PORT, 0);
std::cout << "had read tunnel destinationPort: " << destinationPort << std::endl;
i2p::data::SigningKeyType sigType = section.second.get (I2P_CLIENT_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
// I2CP
std::map<std::string, std::string> options;

Loading…
Cancel
Save