VirtualBox

Ignore:
Timestamp:
Sep 27, 2018 1:10:38 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9252: A warning for a case when invalid proxy URL is specified; tool-tip for the URL editor.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/global
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp

    r74451 r74497  
    161161    UIValidationMessage message;
    162162
    163     /* Check for host value: */
     163    /* Check for URL presence: */
    164164    if (m_pHostEditor->text().trimmed().isEmpty())
    165165    {
    166         message.second << tr("No proxy host is currently specified.");
     166        message.second << tr("No proxy URL is currently specified.");
    167167        fPass = false;
    168168    }
     169
     170    else
     171
     172    /* Check for URL validness: */
     173    if (!QUrl(m_pHostEditor->text().trimmed()).isValid())
     174    {
     175        message.second << tr("Invalid proxy URL is currently specified.");
     176        fPass = true;
     177    }
     178
     179    else
    169180
    170181    /* Check for password presence: */
     
    190201    /* Translate uic generated strings: */
    191202    Ui::UIGlobalSettingsProxy::retranslateUi(this);
     203
     204    /* Translate proxy URL editor: */
     205    m_pHostEditor->setWhatsThis(tr("Holds the proxy URL. "
     206                                   "The format is: "
     207                                   "<table cellspacing=0 style='white-space:pre'>"
     208                                   "<tr><td>[{type}://][{userid}[:{password}]@]{server}[:{port}]</td></tr>"
     209                                   "<tr><td>http://username:[email protected]:port</td></tr>"
     210                                   "</table>"));
    192211}
    193212
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.ui

    r74445 r74497  
    9191      </item>
    9292      <item>
    93        <widget class="QILineEdit" name="m_pHostEditor">
    94         <property name="whatsThis">
    95          <string>Holds the proxy host.</string>
    96         </property>
    97        </widget>
     93       <widget class="QILineEdit" name="m_pHostEditor"/>
    9894      </item>
    9995     </layout>
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