- Timestamp:
- Mar 1, 2022 2:49:29 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.cpp
r93990 r94042 398 398 connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), 399 399 this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated)); 400 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textActivated was added in 5.14 actually */ 401 connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textActivated), 402 this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textActivated)); 403 #else 400 404 connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::activated), 401 405 this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::activated)); 406 #endif 402 407 connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 403 408 this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged)); 409 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 404 410 connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged), 405 411 this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::currentIndexChanged)); 412 #endif 406 413 connect(m_pComboBox, &QComboBox::currentTextChanged, this, &QIComboBox::currentTextChanged); 407 414 connect(m_pComboBox, &QComboBox::editTextChanged, this, &QIComboBox::editTextChanged); 415 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */ 416 connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textHighlighted), 417 this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textHighlighted)); 418 #else 408 419 connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted), 409 420 this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted)); 410 421 connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted), 411 422 this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted)); 423 #endif 412 424 /* Add combo-box into layout: */ 413 425 pLayout->addWidget(m_pComboBox); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h
r93986 r94042 43 43 void activated(int iIndex); 44 44 /** Notifies listeners about user chooses an item with @a strText in the combo-box. */ 45 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */ 46 void textActivated(const QString &strText); 47 #else 45 48 void activated(const QString &strText); 49 #endif 46 50 47 51 /** Notifies listeners about current item changed to item with @a iIndex. */ 48 52 void currentIndexChanged(int iIndex); 53 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 49 54 /** Notifies listeners about current item changed to item with @a strText. */ 50 55 void currentIndexChanged(const QString &strText); 56 #endif 51 57 52 58 /** Notifies listeners about current combo-box text is changed to @a strText. */ … … 58 64 void highlighted(int iIndex); 59 65 /** Notifies listeners about user highlighted an item with @a strText in the popup list-view. */ 66 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */ 67 void textHighlighted(const QString &strText); 68 #else 60 69 void highlighted(const QString &strText); 70 #endif 61 71 62 72 public: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r93998 r94042 291 291 if (m_pHistoryComboBox) 292 292 { 293 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 294 disconnect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged), 295 this, &UIFileManagerNavigationWidget::sltHandlePathChange); 296 m_pHistoryComboBox->clear(); 297 connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged), 298 this, &UIFileManagerNavigationWidget::sltHandlePathChange); 299 #else 293 300 disconnect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 294 301 this, &UIFileManagerNavigationWidget::sltHandlePathChange); … … 296 303 connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 297 304 this, &UIFileManagerNavigationWidget::sltHandlePathChange); 305 #endif 298 306 } 299 307 … … 330 338 connect(m_pHistoryComboBox, &UIFileManagerHistoryComboBox::sigHidePopup, 331 339 this, &UIFileManagerNavigationWidget::sltHandleHidePopup); 340 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 341 connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged), 342 this, &UIFileManagerNavigationWidget::sltHandlePathChange); 343 #else 332 344 connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 333 345 this, &UIFileManagerNavigationWidget::sltHandlePathChange); 346 #endif 334 347 335 348 m_pContainer->addWidget(m_pBreadCrumbs); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r93998 r94042 506 506 { 507 507 connect(m_pCheckBoxPort, &QCheckBox::toggled, this, &UIMachineSettingsSerial::sltGbSerialToggled); 508 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 509 connect(m_pComboNumber, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::textActivated), 510 this, &UIMachineSettingsSerial::sltCbNumberActivated); 511 #else 508 512 connect(m_pComboNumber, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::activated), 509 513 this, &UIMachineSettingsSerial::sltCbNumberActivated); 514 #endif 510 515 connect(m_pLineEditIRQ, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate); 511 516 connect(m_pLineEditIOPort, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate);
Note:
See TracChangeset
for help on using the changeset viewer.