Small fix

pull/4/head
wh201906 4 years ago
parent a77985824c
commit 43752bd5e4

@ -31,10 +31,10 @@ private:
bool isRequiringOutput; bool isRequiringOutput;
QString* requiredOutput; QString* requiredOutput;
QTime timeStamp; QTime timeStamp;
ClientType clientType;
signals: signals:
void refreshOutput(const QString& output); void refreshOutput(const QString& output);
void write(QString data); void write(QString data);
ClientType clientType;
}; };
#endif // UTIL_H #endif // UTIL_H

@ -24,7 +24,7 @@ MainWindow::MainWindow(QWidget *parent):
pm3Thread->start(); pm3Thread->start();
pm3state = false; pm3state = false;
util = new Util(this); util = new Util(Util::OFFICIAL, this);
mifare = new Mifare(ui, util, this); mifare = new Mifare(ui, util, this);
} }
@ -178,7 +178,15 @@ void MainWindow::MF_onTypeChanged(int id, bool st)
qDebug() << id << typeBtnGroup->checkedId(); qDebug() << id << typeBtnGroup->checkedId();
if(!st) if(!st)
{ {
int result = QMessageBox::question(this, tr("Info"), tr("When Changeing card type, the data and keys in this app will be cleard.") + "\n" + tr("Continue?"), QMessageBox::Yes | QMessageBox::No); int result;
if(id > typeBtnGroup->checkedId()) // id is specified in uiInit() with a proper order, so I can compare the size by id.
{
result = QMessageBox::question(this, tr("Info"), tr("When Changeing card type, the data and keys in this app will be cleard.") + "\n" + tr("Continue?"), QMessageBox::Yes | QMessageBox::No);
}
else
{
result = QMessageBox::Yes;
}
if(result == QMessageBox::Yes) if(result == QMessageBox::Yes)
{ {
qDebug() << "Yes"; qDebug() << "Yes";
@ -754,6 +762,8 @@ void MainWindow::uiInit()
} }
settings->endGroup(); settings->endGroup();
on_Raw_CMDHistoryBox_stateChanged(Qt::Unchecked); on_Raw_CMDHistoryBox_stateChanged(Qt::Unchecked);
on_PM3_refreshPortButton_clicked(); on_PM3_refreshPortButton_clicked();
} }

@ -281,14 +281,14 @@
<item> <item>
<widget class="QRadioButton" name="MF_Type_miniButton"> <widget class="QRadioButton" name="MF_Type_miniButton">
<property name="text"> <property name="text">
<string>MINI</string> <string extracomment="320">MINI</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="MF_Type_1kButton"> <widget class="QRadioButton" name="MF_Type_1kButton">
<property name="text"> <property name="text">
<string>1K</string> <string extracomment="1024">1K</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>
@ -298,14 +298,14 @@
<item> <item>
<widget class="QRadioButton" name="MF_Type_2kButton"> <widget class="QRadioButton" name="MF_Type_2kButton">
<property name="text"> <property name="text">
<string>2K</string> <string extracomment="2048">2K</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="MF_Type_4kButton"> <widget class="QRadioButton" name="MF_Type_4kButton">
<property name="text"> <property name="text">
<string>4K</string> <string extracomment="4096">4K</string>
</property> </property>
</widget> </widget>
</item> </item>

Loading…
Cancel
Save