VirtualBox

Changeset 30208 in vbox


Ignore:
Timestamp:
Jun 15, 2010 3:53:27 PM (14 years ago)
Author:
vboxsync
Message:

Frontends/VirtualBox: remove the need to translate the complicated regex for valid sizes by constructing it from other translations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r30192 r30208  
    37273727{
    37283728    QString regexp =
    3729         tr ("^(?:(?:(\\d+)(?:\\s?(B|KB|MB|GB|TB|PB))?)|(?:(\\d*)%1(\\d{1,2})(?:\\s?(KB|MB|GB|TB|PB))))$", "regexp for matching ####[.##] B|KB|MB|GB|TB|PB, %1=decimal point")
    3730             .arg (decimalSep());
     3729        QString ("^(?:(?:(\\d+)(?:\\s?(%2|%3|%4|%5|%6|%7))?)|(?:(\\d*)%1(\\d{1,2})(?:\\s?(%3|%4|%5|%6|%7))))$")
     3730            .arg (decimalSep())
     3731            .arg (tr ("B", "size suffix Bytes"))
     3732            .arg (tr ("KB", "size suffix KBytes=1024 Bytes"))
     3733            .arg (tr ("MB", "size suffix MBytes=1024 KBytes"))
     3734            .arg (tr ("GB", "size suffix GBytes=1024 MBytes"))
     3735            .arg (tr ("TB", "size suffix TBytes=1024 GBytes"))
     3736            .arg (tr ("PB", "size suffix PBytes=1024 TBytes"));
    37313737    return regexp;
    37323738}
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