Changeset 87317 in vbox
- Timestamp:
- Jan 20, 2021 10:14:39 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
-
UIFilePathSelector.cpp (modified) (1 diff)
-
UIFilePathSelector.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
r85136 r87317 161 161 } 162 162 163 bool UIFilePathSelector::isValid() const 164 { 165 if (m_strPath.isNull() || m_strPath.isEmpty()) 166 return false; 167 QFileInfo fileInfo(m_strPath); 168 if (!fileInfo.exists() || !fileInfo.isReadable()) 169 return false; 170 return true; 171 } 172 163 173 void UIFilePathSelector::setToolTip(const QString &strToolTip) 164 174 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.h
r85137 r87317 111 111 QString path() const { return m_strPath; } 112 112 113 /** Returns true if the selected path points to an existing/readable file. */ 114 bool isValid() const; 115 113 116 /** Sets overriden widget's @a strToolTip. 114 117 * @note If nothing set it's generated automatically. */
Note:
See TracChangeset
for help on using the changeset viewer.

