Changeset 76621 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 3, 2019 2:40:48 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.cpp
r76606 r76621 162 162 } 163 163 164 const QString &UICustomFileSystemItem::path() const165 { 166 return m_ strPath;164 QString UICustomFileSystemItem::path() const 165 { 166 return m_itemData.value(UICustomFileSystemModelColumn_Path, QString()).toString(); 167 167 } 168 168 169 169 void UICustomFileSystemItem::setPath(const QString &path) 170 170 { 171 if (path.isNull() || path.isEmpty()) 171 QString strNewPath = UIPathOperations::removeTrailingDelimiters(path); 172 if (strNewPath.isNull() || strNewPath.isEmpty()) 172 173 return; 173 m_strPath = path; 174 UIPathOperations::removeTrailingDelimiters(m_strPath); 174 m_itemData[UICustomFileSystemModelColumn_Path] = strNewPath; 175 175 } 176 176 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.h
r76581 r76621 26 26 #include <QSortFilterProxyModel> 27 27 28 #include "UILibraryDefs.h" 29 28 30 /* COM includes: */ 29 31 #include "COMEnums.h" … … 43 45 /** A UICustomFileSystemItem instance is a tree node representing a file object (file, directory, etc). The tree contructed 44 46 by these instances is the data source for the UICustomFileSystemModel. */ 45 class UICustomFileSystemItem47 class SHARED_LIBRARY_STUFF UICustomFileSystemItem 46 48 { 47 49 public: … … 70 72 void setIsOpened(bool flag); 71 73 72 const QString &path() const; 74 /** Full absolute path of the item. Without the trailing '/' */ 75 QString path() const; 73 76 void setPath(const QString &path); 74 77 … … 104 107 UICustomFileSystemItem *m_parentItem; 105 108 bool m_bIsOpened; 106 /** Full absolute path of the item. Without the trailing '/' */107 QString m_strPath;108 109 /** If this is a symlink m_targetPath keeps the absolute path of the target */ 109 110 QString m_strTargetPath; … … 117 118 /** A QSortFilterProxyModel extension used in file tables. Modifies some 118 119 * of the base class behavior like lessThan(..) */ 119 class UICustomFileSystemProxyModel : public QSortFilterProxyModel120 class SHARED_LIBRARY_STUFF UICustomFileSystemProxyModel : public QSortFilterProxyModel 120 121 { 121 122 … … 140 141 * it supports a tree level hierarchy which can be displayed with 141 142 * QTableView and/or QTreeView.*/ 142 class UICustomFileSystemModel : public QAbstractItemModel143 class SHARED_LIBRARY_STUFF UICustomFileSystemModel : public QAbstractItemModel 143 144 { 144 145 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPathOperations.h
r76581 r76621 25 25 #include <QString> 26 26 27 /* GUI includes: */ 28 #include "UILibraryDefs.h" 27 29 28 30 /** A collection of simple utility functions to manipulate path strings */ 29 class UIPathOperations31 class SHARED_LIBRARY_STUFF UIPathOperations 30 32 { 31 33 public: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp
r76606 r76621 141 141 if (!directory.exists()) 142 142 return; 143 QFileInfoList entries = directory.entryInfoList( );143 QFileInfoList entries = directory.entryInfoList(QDir::Hidden|QDir::AllEntries|QDir::NoDotAndDotDot); 144 144 for (int i = 0; i < entries.size(); ++i) 145 145 { 146 146 const QFileInfo &fileInfo = entries.at(i); 147 148 if (fileInfo.fileName() == ".")149 continue;150 if (fileInfo.fileName() == "..")151 continue;152 147 153 148 UICustomFileSystemItem *item = new UICustomFileSystemItem(fileInfo.fileName(), parent, fileType(fileInfo));
Note:
See TracChangeset
for help on using the changeset viewer.