forked from qt-creator/qt-creator
SSH: Make SftpFileSystemModel::data() public.
So clients can retrieve the file path. Change-Id: I6c6fa3473a8b374373c3dfe437f3f4779a46505b Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -46,9 +46,6 @@ class QSSH_EXPORT SftpFileSystemModel : public QAbstractItemModel
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
// Use this to get the full path of a file or directory via data().
|
|
||||||
static const int PathRole = Qt::UserRole;
|
|
||||||
|
|
||||||
explicit SftpFileSystemModel(QObject *parent = 0);
|
explicit SftpFileSystemModel(QObject *parent = 0);
|
||||||
~SftpFileSystemModel();
|
~SftpFileSystemModel();
|
||||||
|
|
||||||
@@ -63,6 +60,10 @@ public:
|
|||||||
|
|
||||||
SftpJobId downloadFile(const QModelIndex &index, const QString &targetFilePath);
|
SftpJobId downloadFile(const QModelIndex &index, const QString &targetFilePath);
|
||||||
|
|
||||||
|
// Use this to get the full path of a file or directory.
|
||||||
|
static const int PathRole = Qt::UserRole;
|
||||||
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
/*
|
/*
|
||||||
* E.g. "Permission denied". Note that this can happen without direct user intervention,
|
* E.g. "Permission denied". Note that this can happen without direct user intervention,
|
||||||
@@ -90,7 +91,6 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||||
|
Reference in New Issue
Block a user