VirtualBox

Changeset 85560 in vbox


Ignore:
Timestamp:
Jul 30, 2020 1:42:03 PM (4 years ago)
Author:
vboxsync
Message:

DnD/Main: Extended GuestDnD::toFormatList() to be able to specify an optional formats separator.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestDnDPrivate.h

    r85559 r85560  
    943943     * @{ */
    944944    static bool                     isFormatInFormatList(const com::Utf8Str &strFormat, const GuestDnDMIMEList &lstFormats);
    945     static GuestDnDMIMEList         toFormatList(const com::Utf8Str &strFormats);
     945    static GuestDnDMIMEList         toFormatList(const com::Utf8Str &strFormats, const com::Utf8Str &strSep = DND_FORMATS_SEPARATOR);
    946946    static com::Utf8Str             toFormatString(const GuestDnDMIMEList &lstFormats);
    947947    static GuestDnDMIMEList         toFilteredFormatList(const GuestDnDMIMEList &lstFormatsSupported, const GuestDnDMIMEList &lstFormatsWanted);
  • trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp

    r85559 r85560  
    945945 *
    946946 * @returns MIME list object.
    947  * @param   strFormats          List of formats (separated by DND_FORMATS_SEPARATOR) to convert.
     947 * @param   strFormats          List of formats to convert.
     948 * @param   strSep              Separator to use. If not specified, DND_FORMATS_SEPARATOR will be used.
    948949 */
    949950/* static */
    950 GuestDnDMIMEList GuestDnD::toFormatList(const com::Utf8Str &strFormats)
     951GuestDnDMIMEList GuestDnD::toFormatList(const com::Utf8Str &strFormats, const com::Utf8Str &strSep /* = DND_FORMATS_SEPARATOR */)
    951952{
    952953    GuestDnDMIMEList lstFormats;
    953     RTCList<RTCString> lstFormatsTmp = strFormats.split(DND_FORMATS_SEPARATOR);
     954    RTCList<RTCString> lstFormatsTmp = strFormats.split(strSep);
    954955
    955956    for (size_t i = 0; i < lstFormatsTmp.size(); i++)
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