VirtualBox

Ignore:
Timestamp:
Dec 7, 2018 1:52:59 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9012. Fix for r127272.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h

    r76044 r76058  
    261261template<> SHARED_LIBRARY_STUFF UIMediumFormat fromInternalString<UIMediumFormat>(const QString &strUIMediumFormat);
    262262template<> SHARED_LIBRARY_STUFF QString toString(const UISettingsDefs::RecordingMode &enmRecordingMode);
    263 template<> SHARED_LIBRARY_STUFF QString toInternalString(const UISettingsDefs::RecordingMode &enmRecordingMode);
    264 template<> SHARED_LIBRARY_STUFF UISettingsDefs::RecordingMode fromInternalString<UISettingsDefs::RecordingMode>(const QString &enmRecordingMode);
     263template<> SHARED_LIBRARY_STUFF UISettingsDefs::RecordingMode fromString<UISettingsDefs::RecordingMode>(const QString &enmRecordingMode);
    265264
    266265
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r76044 r76058  
    25222522}
    25232523
    2524 /* QString <= UISettingsDefs::RecordingMode: */
    2525 template<> QString toInternalString(const UISettingsDefs::RecordingMode &enmRecordingMode)
    2526 {
    2527     QString strResult;
    2528     switch (enmRecordingMode)
    2529     {
    2530         case UISettingsDefs::RecordingMode_VideoAudio: strResult = "Video/Audio"; break;
    2531         case UISettingsDefs::RecordingMode_VideoOnly:  strResult = "VideoOnly";   break;
    2532         case UISettingsDefs::RecordingMode_AudioOnly:  strResult = "AudioOnly";   break;
    2533         default:
    2534         {
    2535             AssertMsgFailed(("No text for recording mode=%d", enmRecordingMode));
    2536             break;
    2537         }
    2538     }
    2539     return strResult;
    2540 }
    2541 
    25422524/* UISettingsDefs::RecordingMode <= QString: */
    2543 template<> UISettingsDefs::RecordingMode fromInternalString<UISettingsDefs::RecordingMode>(const QString &strRecordingMode)
     2525template<> UISettingsDefs::RecordingMode fromString<UISettingsDefs::RecordingMode>(const QString &strRecordingMode)
    25442526{
    25452527    /* Here we have some fancy stuff allowing us
     
    25472529    QStringList keys;       QList<UISettingsDefs::RecordingMode> values;
    25482530    keys << "Video/Audio";  values << UISettingsDefs::RecordingMode_VideoAudio;
    2549     keys << "VideoOnly";    values << UISettingsDefs::RecordingMode_VideoOnly;
    2550     keys << "AudioOnly";    values << UISettingsDefs::RecordingMode_AudioOnly;
    2551     /* VDI format for unknown words: */
     2531    keys << "Video Only";    values << UISettingsDefs::RecordingMode_VideoOnly;
     2532    keys << "Audio Only";    values << UISettingsDefs::RecordingMode_AudioOnly;
     2533    /* Video/Audio for unknown words: */
    25522534    if (!keys.contains(strRecordingMode, Qt::CaseInsensitive))
    25532535        return UISettingsDefs::RecordingMode_VideoAudio;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r76044 r76058  
    511511
    512512    /* Update recording options */
     513    UISettingsDefs::RecordingMode enmRecordingMode =
     514        gpConverter->fromString<UISettingsDefs::RecordingMode>(m_pComboBoxCaptureMode->currentText());
    513515    QStringList optionValues;
    514     optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_VideoAudio) ||
    515                             m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_VideoOnly)) ? "true" : "false");
    516     optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_VideoAudio) ||
    517                             m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_AudioOnly)) ? "true" : "false");
     516    /* Option value for video recording: */
     517    optionValues.push_back((enmRecordingMode == UISettingsDefs::RecordingMode_VideoAudio) ||
     518                           (enmRecordingMode == UISettingsDefs::RecordingMode_VideoOnly) ? "true" : "false");
     519    /* Option value for audio recording: */
     520    optionValues.push_back((enmRecordingMode == UISettingsDefs::RecordingMode_VideoAudio) ||
     521                           (enmRecordingMode == UISettingsDefs::RecordingMode_AudioOnly) ? "true" : "false");
     522
    518523    if (m_pSliderAudioCaptureQuality->value() == 1)
    519524        optionValues.push_back("low");
     
    17271732                                             (isMachineOnline() && !m_pCache->base().m_fRecordingEnabled && m_pCheckboxVideoCapture->isChecked());
    17281733
    1729     const UISettingsDefs::RecordingMode enmRecordingMode =
    1730         static_cast<UISettingsDefs::RecordingMode>(m_pComboBoxCaptureMode->currentIndex());
     1734    UISettingsDefs::RecordingMode enmRecordingMode =
     1735        gpConverter->fromString<UISettingsDefs::RecordingMode>(m_pComboBoxCaptureMode->currentText());
    17311736
    17321737    /* Video Capture Screens option should be enabled only if:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette