Changeset 91436 in vbox
- Timestamp:
- Sep 28, 2021 1:31:44 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.cpp
r91192 r91436 302 302 if (pLineEdit) 303 303 pLineEdit->mark(fError, strErrorMessage); 304 } 305 306 void QIComboBox::insertSeparator(int iIndex) 307 { 308 AssertPtrReturnVoid(m_pComboBox); 309 m_pComboBox->insertSeparator(iIndex); 304 310 } 305 311 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h
r87737 r91436 122 122 void mark(bool fError, const QString &strErrorMessage = QString()); 123 123 124 void insertSeparator(int iIndex); 125 124 126 public slots: 125 127 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r91220 r91436 25 25 #include "QILineEdit.h" 26 26 #include "UICommon.h" 27 #include "UIExtraDataManager.h" 27 28 #include "UIIconPool.h" 28 29 #include "UIFilePathSelector.h" … … 513 514 m_pImageSelector->setFileDialogFilters("ISO Images(*.iso *.ISO)"); 514 515 m_pImageSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD)); 516 m_pImageSelector->setRecentPathList(gEDataManager->recentListOfOpticalDisks()); 515 517 516 518 m_pMainLayout->addWidget(m_pImageSelector, iRow, 1, 1, 2); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
r91125 r91436 194 194 } 195 195 196 void UIFilePathSelector::setRecentPathList(const QStringList &recentPathList) 197 { 198 while (count() >= static_cast<int>(RecentListSeparator)) 199 { 200 removeItem(count() - 1); 201 } 202 insertSeparator(RecentListSeparator); 203 204 foreach (const QString strPath, recentPathList) 205 addItem(strPath); 206 } 207 196 208 void UIFilePathSelector::setPath(const QString &strPath, bool fRefreshText /* = true */) 197 209 { … … 346 358 } 347 359 default: 348 break; 360 { 361 if (iIndex >= RecentListSeparator) 362 { 363 changePath(itemText(iIndex)); 364 update(); 365 } 366 break; 367 } 349 368 } 350 369 setCurrentIndex(PathId); … … 528 547 * and text have be corresponding real stored path 529 548 * which can be absolute or relative. */ 530 if (lineEdit()->text() != m_strPath)549 //if (lineEdit()->text() != m_strPath) 531 550 setItemText(PathId, m_strPath); 532 551 setItemIcon(PathId, QIcon()); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.h
r87608 r91436 65 65 PathId = 0, 66 66 SelectId, 67 ResetId 67 ResetId, 68 RecentListSeparator 68 69 }; 69 70 … … 121 122 const QString& defaultPath() const; 122 123 124 void setRecentPathList(const QStringList &recentPathList); 125 123 126 public slots: 124 127
Note:
See TracChangeset
for help on using the changeset viewer.