mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 03:16:10 +00:00
parent
eef5022469
commit
53a7d5a959
@ -709,6 +709,11 @@ QJsonDocument CutterCore::getFileVersionInfo()
|
|||||||
return cmdj("iVj");
|
return cmdj("iVj");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QJsonDocument CutterCore::getSignatureInfo()
|
||||||
|
{
|
||||||
|
return cmdj("iCj");
|
||||||
|
}
|
||||||
|
|
||||||
QStringList CutterCore::getStats()
|
QStringList CutterCore::getStats()
|
||||||
{
|
{
|
||||||
QStringList stats;
|
QStringList stats;
|
||||||
|
@ -397,6 +397,7 @@ public:
|
|||||||
QString getDecompiledCode(RVA addr);
|
QString getDecompiledCode(RVA addr);
|
||||||
QString getDecompiledCode(QString addr);
|
QString getDecompiledCode(QString addr);
|
||||||
QJsonDocument getFileInfo();
|
QJsonDocument getFileInfo();
|
||||||
|
QJsonDocument getSignatureInfo();
|
||||||
QJsonDocument getFileVersionInfo();
|
QJsonDocument getFileVersionInfo();
|
||||||
QStringList getStats();
|
QStringList getStats();
|
||||||
QString getSimpleGraph(QString function);
|
QString getSimpleGraph(QString function);
|
||||||
|
@ -156,6 +156,15 @@ void Dashboard::updateContents()
|
|||||||
|
|
||||||
// Get stats for the graphs
|
// Get stats for the graphs
|
||||||
QStringList stats = Core()->getStats();
|
QStringList stats = Core()->getStats();
|
||||||
|
|
||||||
|
// Check if signature info and version info available
|
||||||
|
if (Core()->getSignatureInfo().isEmpty()){
|
||||||
|
ui->certificateButton->setEnabled(false);
|
||||||
|
}
|
||||||
|
if (Core()->getFileVersionInfo().isEmpty()){
|
||||||
|
ui->versioninfoButton->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dashboard::on_certificateButton_clicked()
|
void Dashboard::on_certificateButton_clicked()
|
||||||
@ -168,10 +177,9 @@ void Dashboard::on_certificateButton_clicked()
|
|||||||
viewDialog = new QDialog(this);
|
viewDialog = new QDialog(this);
|
||||||
view = new QTreeView(viewDialog);
|
view = new QTreeView(viewDialog);
|
||||||
model = new JsonModel();
|
model = new JsonModel();
|
||||||
QJsonDocument qjsonCertificatesDoc = Core()->cmdj("iCj");
|
QJsonDocument qjsonCertificatesDoc = Core()->getSignatureInfo();
|
||||||
qstrCertificates = qjsonCertificatesDoc.toJson(QJsonDocument::Compact);
|
qstrCertificates = qjsonCertificatesDoc.toJson(QJsonDocument::Compact);
|
||||||
}
|
}
|
||||||
if (QString::compare("{}", qstrCertificates)) {
|
|
||||||
if (!viewDialog->isVisible()) {
|
if (!viewDialog->isVisible()) {
|
||||||
std::string strCertificates = qstrCertificates.toUtf8().constData();
|
std::string strCertificates = qstrCertificates.toUtf8().constData();
|
||||||
model->loadJson(QByteArray::fromStdString(strCertificates));
|
model->loadJson(QByteArray::fromStdString(strCertificates));
|
||||||
@ -189,12 +197,6 @@ void Dashboard::on_certificateButton_clicked()
|
|||||||
viewDialog->setWindowTitle("Certificates");
|
viewDialog->setWindowTitle("Certificates");
|
||||||
viewDialog->show();
|
viewDialog->show();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
QMessageBox msgBoxCertificateInf(QMessageBox::Information, "Certificate Information ",
|
|
||||||
"There is no certificate information",
|
|
||||||
QMessageBox::NoButton, this);
|
|
||||||
msgBoxCertificateInf.exec();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dashboard::on_versioninfoButton_clicked()
|
void Dashboard::on_versioninfoButton_clicked()
|
||||||
|
Loading…
Reference in New Issue
Block a user