Commit 001602c2 authored by Friedemann Kleint's avatar Friedemann Kleint

Foldernavigationwidget: Use QFileSystemModel instead of QDirModel.

hoping for better performance. On this occasion, add context menu
containing "Open" and "Choose folder" enabling drive changes on
Windows. Purge remains of QDirModel elsewhere.
Task-number: QTCREATORBUG-62
parent bf8c0b8a
......@@ -39,7 +39,7 @@ class QLabel;
class QListView;
class QSortFilterProxyModel;
class QModelIndex;
class QDirModel;
class QFileSystemModel;
class QDir;
QT_END_NAMESPACE
......@@ -66,16 +66,23 @@ public slots:
void toggleAutoSynchronization();
private slots:
void openItem(const QModelIndex &mainIndex);
void setCurrentFile(const QString &filePath);
void slotOpenItem(const QModelIndex &viewIndex);
private:
void setCurrentTitle(const QDir &directory);
protected:
virtual void contextMenuEvent(QContextMenuEvent *ev);
ProjectExplorerPlugin *m_explorer;
QListView *m_view;
QDirModel *m_dirModel;
QSortFilterProxyModel *m_filter;
private:
void setCurrentTitle(const QString &dirName, const QString &fullPath);
bool setCurrentDirectory(const QString &directory);
bool setCurrentDirectory(const QModelIndex &dirIndex);
void openItem(const QModelIndex &srcIndex);
QModelIndex currentItem() const;
QString currentDirectory() const;
QListView *m_listView;
QFileSystemModel *m_fileSystemModel;
QSortFilterProxyModel *m_filterModel;
QLabel *m_title;
bool m_autoSync;
};
......
......@@ -36,12 +36,9 @@
QT_BEGIN_NAMESPACE
class QDir;
class QDirModel;
class QFileInfo;
class QListView;
class QModelIndex;
class QStringList;
class QTreeView;
QT_END_NAMESPACE
namespace Utils {
......@@ -65,15 +62,7 @@ public:
QString projectName() const;
private:
int m_secondPageId;
Utils::FileWizardPage *m_firstPage;
QTreeView *m_dirView;
QDirModel *m_dirModel;
QListView *m_filesView;
QDirModel *m_filesModel;
};
class QmlProjectWizard : public Core::BaseFileWizard
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment