VirtualBox

Ignore:
Timestamp:
Dec 1, 2009 9:26:49 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: Consolidate the plural handling of time values a little bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r23588 r25123  
    344344        AssertMsg (pm, ("Icon for VM state %d must be defined", s));
    345345        return pm ? *pm : QPixmap();
     346    }
     347
     348    static inline QString yearsToString (uint32_t cVal)
     349    {
     350        return tr("%n year(s)", "", cVal);
     351    }
     352
     353    static inline QString monthsToString (uint32_t cVal)
     354    {
     355        return tr("%n month(s)", "", cVal);
     356    }
     357
     358    static inline QString daysToString (uint32_t cVal)
     359    {
     360        return tr("%n day(s)", "", cVal);
     361    }
     362
     363    static inline QString hoursToString (uint32_t cVal)
     364    {
     365        return tr("%n hours(s)", "", cVal);
     366    }
     367
     368    static inline QString minutesToString (uint32_t cVal)
     369    {
     370        return tr("%n minute(s)", "", cVal);
     371    }
     372
     373    static inline QString secondsToString (uint32_t cVal)
     374    {
     375        return tr("%n seconds(s)", "", cVal);
    346376    }
    347377
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