Remove unused method
This commit is contained in:
@@ -20,12 +20,6 @@ FilesystemWidget::FilesystemWidget(QAbstractItemModel *model, QWidget *parent) :
|
|||||||
connect(m_listView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FilesystemWidget::fileClicked);
|
connect(m_listView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FilesystemWidget::fileClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemWidget::setDir(const QString &dir)
|
|
||||||
{
|
|
||||||
//m_model->setRootPath(dir);
|
|
||||||
//m_treeView->setRootIndex(m_model->index(m_model->rootPath()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void FilesystemWidget::selectFile(int row)
|
void FilesystemWidget::selectFile(int row)
|
||||||
{
|
{
|
||||||
QModelIndex index = m_model->index(row, 0);
|
QModelIndex index = m_model->index(row, 0);
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ class FilesystemWidget : public QWidget
|
|||||||
QAbstractItemModel *m_model;
|
QAbstractItemModel *m_model;
|
||||||
public:
|
public:
|
||||||
explicit FilesystemWidget(QAbstractItemModel *model, QWidget *parent = nullptr);
|
explicit FilesystemWidget(QAbstractItemModel *model, QWidget *parent = nullptr);
|
||||||
void setDir(const QString &dir);
|
|
||||||
private slots:
|
private slots:
|
||||||
void selectFile(int row);
|
void selectFile(int row);
|
||||||
void fileClicked(const QModelIndex &index, const QModelIndex &);
|
void fileClicked(const QModelIndex &index, const QModelIndex &);
|
||||||
|
|||||||
@@ -190,7 +190,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
|||||||
_lastDir = standardLocations.first();
|
_lastDir = standardLocations.first();
|
||||||
|
|
||||||
_lastDir = settings.value("mainwindow/lastdir", _lastDir).toString();
|
_lastDir = settings.value("mainwindow/lastdir", _lastDir).toString();
|
||||||
m_filesystem->setDir(_lastDir);
|
|
||||||
|
|
||||||
QStringList args = QCoreApplication::arguments();
|
QStringList args = QCoreApplication::arguments();
|
||||||
args.removeFirst();
|
args.removeFirst();
|
||||||
@@ -377,7 +376,6 @@ void MainWindow::loadFile(const QString &path)
|
|||||||
_lastDir = info.canonicalPath();
|
_lastDir = info.canonicalPath();
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
settings.setValue("mainwindow/lastdir", _lastDir);
|
settings.setValue("mainwindow/lastdir", _lastDir);
|
||||||
m_filesystem->setDir(_lastDir);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user