Skip to content

Commit afdc1df

Browse files
author
Alexander Bychuk
committed
fix : readme
1 parent a4eec36 commit afdc1df

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
LinuxDependency
1+
DependencyViewer
22
===============
33

4-
LinuxDependency (Qldd) shows all dependent libraries of a given executable or dynamic library on Linux.
5-
It is a GUI replacement for the ldd, file and nm commands.
4+
DependencyViewer (Qldd) shows all dependent libraries of a given executable or dynamic library on GNU/Linux and MacOS.
5+
It is a GUI replacement for the ldd (for MacOS - otool), file and nm commands.
66

77
![Dependencies](screenshot/Qldd.png?raw=true "Qldd")
88
![Dependencies](screenshot/Qldd-Export.png?raw=true "Qldd")

mainwindow.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,12 @@ MainWindow::MainWindow(const QString &fileName, QWidget *parent)
4646

4747
MainWindow::~MainWindow() {
4848
delete ui;
49-
if (qldd) {
50-
delete qldd;
51-
}
5249
delete fileMenu;
5350
delete helpMenu;
54-
delete openAct;
55-
delete aboutAct;
56-
delete aboutQtAct;
57-
delete exitAct;
5851
}
5952

6053
void MainWindow::reset(const QString &fileName) {
61-
if (qldd) {
62-
delete qldd;
63-
qldd = nullptr;
64-
}
65-
qldd = new QLdd(fileName, qApp->applicationDirPath());
54+
qldd.reset(new QLdd(fileName, qApp->applicationDirPath()));
6655
QTreeWidgetItem *header = ui->treeWidget->headerItem();
6756
header->setText(0, "Dependency");
6857
qldd->fillDependency(*ui->treeWidget);
@@ -106,11 +95,7 @@ void MainWindow::open() {
10695
void MainWindow::about() {
10796
QMessageBox::about(this,
10897
tr("About Application"),
109-
#ifdef __APPLE__
110-
tr("UnixDependency shows all dependent libraries of a "
111-
#else
112-
tr("LinuxDependency shows all dependent libraries of a "
113-
#endif
98+
tr("DependencyViewer shows all dependent libraries of a "
11499
"given executable or dynamic library on Linux. It is a GUI replacement for the ldd, file and nm command."));
115100
}
116101

mainwindow.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <QMainWindow>
55
#include <qldd.h>
66
#include <QShortcut>
7+
#include <QScopedPointer>
78

89
namespace Ui {
910
class MainWindow;
@@ -42,7 +43,7 @@ class MainWindow : public QMainWindow {
4243
void createMenus();
4344
void reset(const QString &fileName);
4445
Ui::MainWindow *ui;
45-
QLdd *qldd;
46+
QScopedPointer<QLdd> qldd;
4647
QShortcut *shortcutClose;
4748
QMenu *fileMenu;
4849
QMenu *helpMenu;

0 commit comments

Comments
 (0)