#include <QProcess>
#include <QUrl>
#include <QEvent>
+#include <QScrollBar>
#include <hildon-mime.h>
#include <dbus/dbus.h>
-#include "fileoperator.h"
+#include "utils.h"
FileList::FileList(QWidget *parent) :
bool FileList::changePath(QString path) {
- path = FileOperator::unwindPath(path);
+ path = unwindPath(path);
QDir dir(fileSystemModel->rootPath());
if (dir.cd(path)) {
+ scrollBarPosition[fileSystemModel->rootPath()] = verticalScrollBar()->value();
setRootIndex(fileSystemModel->setRootPath(dir.absolutePath()));
clearSelection();
+ verticalScrollBar()->setValue(scrollBarPosition[dir.absolutePath()]);
emit pathChanged(fileSystemModel->rootPath());
return true;
}