mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
Fix #133 (r2 -V tab in AboutDialog)
This commit is contained in:
parent
4330b7ddaa
commit
d92f016ead
2
radare2
2
radare2
@ -1 +1 @@
|
||||
Subproject commit 7b380cc56105e77a5a765eb2138d1d33f2b22e91
|
||||
Subproject commit 52af9d8b35c67c9a41a4c7c1ce2b06023b899ec4
|
@ -1356,3 +1356,44 @@ void CutterCore::loadScript(const QString &scriptname)
|
||||
{
|
||||
r_core_cmd_file(core_, scriptname.toStdString().data());
|
||||
}
|
||||
|
||||
QString CutterCore::getVersionInformation()
|
||||
{
|
||||
int i;
|
||||
QString ret;
|
||||
struct vcs_t {
|
||||
const char *name;
|
||||
const char *(*callback)();
|
||||
} vcs[] = {
|
||||
{ "r_anal", &r_anal_version },
|
||||
{ "r_lib", &r_lib_version },
|
||||
{ "r_egg", &r_egg_version },
|
||||
{ "r_asm", &r_asm_version },
|
||||
{ "r_bin", &r_bin_version },
|
||||
{ "r_cons", &r_cons_version },
|
||||
{ "r_flag", &r_flag_version },
|
||||
{ "r_core", &r_core_version },
|
||||
{ "r_crypto", &r_crypto_version },
|
||||
{ "r_bp", &r_bp_version },
|
||||
{ "r_debug", &r_debug_version },
|
||||
{ "r_hash", &r_hash_version },
|
||||
{ "r_fs", &r_fs_version },
|
||||
{ "r_io", &r_io_version },
|
||||
{ "r_magic", &r_magic_version },
|
||||
{ "r_parse", &r_parse_version },
|
||||
{ "r_reg", &r_reg_version },
|
||||
{ "r_sign", &r_sign_version },
|
||||
{ "r_search", &r_search_version },
|
||||
{ "r_syscall", &r_syscall_version },
|
||||
{ "r_util", &r_util_version },
|
||||
/* ... */
|
||||
{NULL,NULL}
|
||||
};
|
||||
ret.append(QString("%1 r2\n").arg(R2_GITTAP));
|
||||
for (i = 0; vcs[i].name; i++) {
|
||||
struct vcs_t *v = &vcs[i];
|
||||
const char *name = v->callback ();
|
||||
ret.append(QString("%1 %2\n").arg(name, v->name));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -334,6 +334,7 @@ public:
|
||||
void saveDefaultAsmOptions();
|
||||
|
||||
void loadScript(const QString &scriptname);
|
||||
QString getVersionInformation();
|
||||
|
||||
RCoreLocked core() const;
|
||||
|
||||
|
@ -29,3 +29,12 @@ void AboutDialog::on_buttonBox_rejected()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void AboutDialog::on_showVersionButton_clicked()
|
||||
{
|
||||
QMessageBox popup(this);
|
||||
popup.setWindowTitle("radare2 version information");
|
||||
auto versionInformation = Core()->getVersionInformation();
|
||||
popup.setText(versionInformation);
|
||||
popup.exec();
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_rejected();
|
||||
void on_showVersionButton_clicked();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::AboutDialog> ui;
|
||||
|
@ -15,20 +15,37 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QSvgWidget" name="logoSvgWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QSvgWidget" name="logoSvgWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="showVersionButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show version information</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
@ -69,8 +86,6 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
Reference in New Issue
Block a user