VirtualBox

Ignore:
Timestamp:
Jun 28, 2021 10:45:05 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145386
Message:

FE/Qt: bugref:10049. reverting r145384.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp

    r89926 r89928  
    313313        case AlertButton_Choice2: strText = tr("No");     role = QDialogButtonBox::NoRole; break;
    314314        case AlertButton_Copy:    strText = tr("Copy");   role = QDialogButtonBox::ActionRole; break;
    315         case AlertButton_Help:    strText = tr("Copy");   role = QDialogButtonBox::HelpRole; break;
    316315        default:
    317316            AssertMsgFailed(("Type %d is not supported!", iButton));
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h

    r89926 r89928  
    4747    AlertButton_Choice2       =  0x8,  /* 00000000 00001000 */
    4848    AlertButton_Copy          = 0x10,  /* 00000000 00010000 */
    49     AlertButton_Help          = 0x11,  /* 00000000 00010001 */
    5049    AlertButtonMask           = 0xFF   /* 00000000 11111111 */
    5150};
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r89926 r89928  
    160160                             int iButton2 /* = 0*/,
    161161                             int iButton3 /* = 0*/,
    162                              int iButton4 /* = 0*/,
    163162                             const QString &strButtonText1 /* = QString() */,
    164163                             const QString &strButtonText2 /* = QString() */,
    165                              const QString &strButtonText3 /* = QString() */,
    166                              const QString &strButtonText4 /* = QString() */) const
     164                             const QString &strButtonText3 /* = QString() */) const
    167165{
    168166    /* If this is NOT a GUI thread: */
     
    173171        emit sigToShowMessageBox(pParent, enmType,
    174172                                 strMessage, strDetails,
    175                                  iButton1, iButton2, iButton3, iButton4,
    176                                  strButtonText1, strButtonText2, strButtonText3, strButtonText4,
     173                                 iButton1, iButton2, iButton3,
     174                                 strButtonText1, strButtonText2, strButtonText3,
    177175                                 QString(pcszAutoConfirmId));
    178176        /* Inter-thread communications are not yet implemented: */
     
    207205                    AlertButton_Cancel | AlertButtonOption_Escape,
    208206                    0 /* third button */,
    209                     0 /* fourth button */,
    210207                    strOkButtonText,
    211208                    strCancelButtonText,
    212                     QString() /* third button */,
    213                     QString() /* fourth button */) &
     209                    QString() /* third button */) &
    214210            AlertButtonMask) == AlertButton_Ok;
    215211}
     
    228224                              int iButton2 /* = 0*/,
    229225                              int iButton3 /* = 0*/,
    230                               int iButton4 /* = 0*/,
    231226                              const QString &strButtonText1 /* = QString()*/,
    232227                              const QString &strButtonText2 /* = QString()*/,
    233                               const QString &strButtonText3 /* = QString()*/,
    234                               const QString &strButtonText4 /* = QString()*/) const
     228                              const QString &strButtonText3 /* = QString()*/) const
    235229{
    236230    return message(pParent, enmType, strMessage, QString(), pcszAutoConfirmId,
    237                    iButton1, iButton2, iButton3, iButton4, strButtonText1, strButtonText2, strButtonText3, strButtonText4);
     231                   iButton1, iButton2, iButton3, strButtonText1, strButtonText2, strButtonText3);
    238232}
    239233
     
    250244                      AlertButton_Cancel | AlertButtonOption_Escape,
    251245                      0 /* third button */,
    252                       0 /* fourth button */,
    253246                      strOkButtonText,
    254247                      strCancelButtonText,
    255                       QString() /* third button */,
    256                       QString() /* fourth button */) &
     248                      QString() /* third button */) &
    257249             AlertButtonMask) == AlertButton_Ok) :
    258250           ((question(pParent, enmType, strMessage, pcszAutoConfirmId,
     
    260252                      AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
    261253                      0 /* third button */,
    262                       0 /* fourth button */,
    263254                      strOkButtonText,
    264255                      strCancelButtonText,
    265                       QString() /* third button */,
    266                       QString() /* fourth button */) &
     256                      QString() /* third button */) &
    267257             AlertButtonMask) == AlertButton_Ok);
    268258}
     
    279269                    AlertButton_Choice2 | AlertButtonOption_Default,
    280270                    AlertButton_Cancel | AlertButtonOption_Escape,
    281                     0 /* fourth button */,
    282271                    strChoice1ButtonText,
    283272                    strChoice2ButtonText,
    284                     strCancelButtonText,
    285                     QString() /* fourth button text*/);
     273                    strCancelButtonText);
    286274}
    287275
     
    293281                                       int iButton2 /* = 0*/,
    294282                                       int iButton3 /* = 0*/,
    295                                        int iButton4 /* = 0*/,
    296283                                       const QString &strButtonName1 /* = QString() */,
    297284                                       const QString &strButtonName2 /* = QString() */,
    298                                        const QString &strButtonName3 /* = QString() */,
    299                                        const QString &strButtonName4 /* = QString() */) const
     285                                       const QString &strButtonName3 /* = QString() */) const
    300286{
    301287    /* If no buttons are set, using single 'OK' button: */
    302     if (iButton1 == 0 && iButton2 == 0 && iButton3 == 0 && iButton4 == 0)
     288    if (iButton1 == 0 && iButton2 == 0 && iButton3 == 0)
    303289        iButton1 = AlertButton_Ok | AlertButtonOption_Default;
    304290
     
    355341    if (!strButtonName3.isNull())
    356342        pBox->setButtonText(2, strButtonName3);
    357     if (!strButtonName4.isNull())
    358         pBox->setButtonText(3, strButtonName4);
    359343
    360344    /* Show box: */
     
    778762                   AlertButton_Ok,
    779763                   AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
    780                    0 /* button 3 */,
    781                    0 /* button 4 */,
     764                   0,
    782765                   tr("Remove")) :
    783766           message(0, MessageType_Question,
     
    787770                   AlertButton_Choice2,
    788771                   AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
    789                    0 /* button 4 */,
    790772                   tr("Delete all files"),
    791773                   tr("Remove only"));
     
    816798                   AlertButton_Choice2,
    817799                   AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
    818                    0 /* button 4 */,
    819800                   tr("Delete everything"),
    820801                   tr("Remove only"));
     
    11461127                             AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
    11471128                             0 /* 3rd button */,
    1148                              0 /* 4th button */,
    11491129                             tr("Restore"), tr("Cancel"), QString() /* 3rd button text */) :
    11501130           message(0, MessageType_Question,
     
    11561136                   AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
    11571137                   0 /* 3rd button */,
    1158                    0 /* 4th button */,
    11591138                   tr("Restore"), tr("Cancel"), QString() /* 3rd button text */);
    11601139}
     
    22382217                    AlertButton_Choice2,
    22392218                    AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
    2240                     0 /* 4th button */,
    22412219                    tr("Accept", "cloud profile manager changes"),
    22422220                    tr("Reject", "cloud profile manager changes"));
     
    27752753                      AlertButton_Ok | AlertButtonOption_Default,
    27762754                      AlertButton_Cancel | AlertButtonOption_Escape,
    2777                       0 /* 3rd button */,
    2778                       0 /* 4th button */,
     2755                      0,
    27792756                      tr("Capture", "do input capture"));
    27802757    /* Was the message auto-confirmed? */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r89926 r89928  
    7171      * @param  iButton2          Brings the button 2 type.
    7272      * @param  iButton3          Brings the button 3 type.
    73       * @param  iButton4          Brings the button 4 type.
    7473      * @param  strButtonText1    Brings the button 1 text.
    7574      * @param  strButtonText2    Brings the button 2 text.
    7675      * @param  strButtonText3    Brings the button 3 text.
    77       * @param  strButtonText4    Brings the button 4 text.
    7876      * @param  strAutoConfirmId  Brings whether this message can be auto-confirmed. */
    7977    void sigToShowMessageBox(QWidget *pParent, MessageType enmType,
    8078                             const QString &strMessage, const QString &strDetails,
    81                              int iButton1, int iButton2, int iButton3, int iButton4,
    82                              const QString &strButtonText1, const QString &strButtonText2,
    83                              const QString &strButtonText3, const QString &strButtonText4,
     79                             int iButton1, int iButton2, int iButton3,
     80                             const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3,
    8481                             const QString &strAutoConfirmId) const;
    8582
     
    105102      * @param  iButton2           Brings the button 2 type.
    106103      * @param  iButton3           Brings the button 3 type.
    107       * @param  iButton4           Brings the button 4 type.
    108104      * @param  strButtonText1     Brings the button 1 text.
    109105      * @param  strButtonText2     Brings the button 2 text.
    110       * @param  strButtonText3     Brings the button 3 text.
    111       * @param  strButtonText3     Brings the button 4 text. */
     106      * @param  strButtonText3     Brings the button 3 text. */
    112107    int message(QWidget *pParent, MessageType enmType,
    113108                const QString &strMessage, const QString &strDetails,
    114109                const char *pcszAutoConfirmId = 0,
    115                 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, int iButton4 = 0,
     110                int iButton1 = 0, int iButton2 = 0, int iButton3 = 0,
    116111                const QString &strButtonText1 = QString(),
    117112                const QString &strButtonText2 = QString(),
    118                 const QString &strButtonText3 = QString(),
    119                 const QString &strButtonText4 = QString()) const;
     113                const QString &strButtonText3 = QString()) const;
    120114
    121115    /** Shows an 'Error' type of 'Message'.
     
    166160      * @param  iButton2           Brings the button 2 type.
    167161      * @param  iButton3           Brings the button 3 type.
    168       * @param  iButton4           Brings the button 4 type.
    169162      * @param  strButtonText1     Brings the button 1 text.
    170163      * @param  strButtonText2     Brings the button 2 text.
    171       * @param  strButtonText3     Brings the button 3 text.
    172       * @param  strButtonText4     Brings the button 4 text. */
     164      * @param  strButtonText3     Brings the button 3 text. */
    173165    int question(QWidget *pParent, MessageType enmType,
    174166                 const QString &strMessage,
    175167                 const char *pcszAutoConfirmId = 0,
    176                  int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, int iButton4 = 0,
     168                 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0,
    177169                 const QString &strButtonText1 = QString(),
    178170                 const QString &strButtonText2 = QString(),
    179                  const QString &strButtonText3 = QString(),
    180                  const QString &strButtonText4 = QString()) const;
     171                 const QString &strButtonText3 = QString()) const;
    181172
    182173    /** Shows a 'Binary' type of 'Question'.
     
    221212      * @param  iButton2             Brings the button 2 type.
    222213      * @param  iButton3             Brings the button 3 type.
    223       * @param  iButton4             Brings the button 4 type.
    224214      * @param  strButtonText1       Brings the button 1 text.
    225215      * @param  strButtonText2       Brings the button 2 text.
     
    229219                          const QString &strOptionText,
    230220                          bool fDefaultOptionValue = true,
    231                           int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, int iButton4 = 0,
     221                          int iButton1 = 0, int iButton2 = 0, int iButton3 = 0,
    232222                          const QString &strButtonText1 = QString(),
    233223                          const QString &strButtonText2 = QString(),
    234                           const QString &strButtonText3 = QString(),
    235                           const QString &strButtonText4 = QString()) const;
     224                          const QString &strButtonText3 = QString()) const;
    236225
    237226    /** Shows modal progress-dialog.
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