Browse Source

updated qt to build and to reflect some core changes like log dest

pull/1011/head
hypnosis-i2p 7 years ago
parent
commit
611c1a7502
  1. 7
      qt/i2pd_qt/SignatureTypeComboboxFactory.h
  2. 7
      qt/i2pd_qt/mainwindow.cpp
  3. 1
      qt/i2pd_qt/mainwindow.h

7
qt/i2pd_qt/SignatureTypeComboboxFactory.h

@ -70,13 +70,6 @@ public:
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_TC26_A_512_GOSTR3411_512", 0), SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512); //10 addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_TC26_A_512_GOSTR3411_512", 0), SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512); //10
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;} if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index; ++index;
// TODO: remove later
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256_TEST", 0), SIGNING_KEY_TYPE_GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256_TEST); //65281
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256_TEST){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_TC26_A_512_GOSTR3411_512_TEST", 0), SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512_TEST); //65282
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512_TEST){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
if(!foundSelected){ if(!foundSelected){
addItem(signatureTypeCombobox, QString::number(selectedSigType), selectedSigType); //unknown sigtype addItem(signatureTypeCombobox, QString::number(selectedSigType), selectedSigType); //unknown sigtype
signatureTypeCombobox->setCurrentIndex(index); signatureTypeCombobox->setCurrentIndex(index);

7
qt/i2pd_qt/mainwindow.cpp

@ -155,6 +155,7 @@ MainWindow::MainWindow(QWidget *parent) :
uiSettings->logDestinationComboBox->clear(); uiSettings->logDestinationComboBox->clear();
uiSettings->logDestinationComboBox->insertItems(0, QStringList() uiSettings->logDestinationComboBox->insertItems(0, QStringList()
<< QApplication::translate("MainWindow", "syslog", 0)
<< QApplication::translate("MainWindow", "stdout", 0) << QApplication::translate("MainWindow", "stdout", 0)
<< QApplication::translate("MainWindow", "file", 0) << QApplication::translate("MainWindow", "file", 0)
); );
@ -302,9 +303,9 @@ MainWindow::MainWindow(QWidget *parent) :
} }
void MainWindow::logDestinationComboBoxValueChanged(const QString & text) { void MainWindow::logDestinationComboBoxValueChanged(const QString & text) {
bool stdout = text==QString("stdout"); bool fileEnabled = text==QString("file");
uiSettings->logFileLineEdit->setEnabled(!stdout); uiSettings->logFileLineEdit->setEnabled(fileEnabled);
uiSettings->logFileBrowsePushButton->setEnabled(!stdout); uiSettings->logFileBrowsePushButton->setEnabled(fileEnabled);
} }

1
qt/i2pd_qt/mainwindow.h

@ -224,7 +224,6 @@ public:
} }
virtual void saveToStringStream(std::stringstream& out){ virtual void saveToStringStream(std::stringstream& out){
std::string logDest = comboBox->currentText().toStdString(); std::string logDest = comboBox->currentText().toStdString();
if(logDest==std::string("stdout"))logDest="";
optionValue=logDest; optionValue=logDest;
MainWindowItem::saveToStringStream(out); MainWindowItem::saveToStringStream(out);
} }

Loading…
Cancel
Save