VirtualBox

Changeset 79527 in vbox


Ignore:
Timestamp:
Jul 4, 2019 12:36:05 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131811
Message:

FE/Qt: bugref:6143. Showing correct layout name in the status bar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r79523 r79527  
    396396    void setNativeName(const QString &strLocaName);
    397397    const QString &nativeName() const;
     398
     399    /** Combines name and native name and returns the string. */
     400    QString nameString() const;
    398401
    399402    void setSourceFilePath(const QString& strSourceFilePath);
     
    15811584}
    15821585
     1586QString UISoftKeyboardLayout::nameString() const
     1587{
     1588    QString strCombinedName;
     1589    if (nativeName().isEmpty() && !name().isEmpty())
     1590        strCombinedName = name();
     1591    else if (!nativeName().isEmpty() && name().isEmpty())
     1592        strCombinedName = nativeName();
     1593    else
     1594        strCombinedName = QString("%1 (%2)").arg(nativeName()).arg(name());
     1595    return strCombinedName;
     1596}
     1597
    15831598void UISoftKeyboardLayout::setSourceFilePath(const QString& strSourceFilePath)
    15841599{
     
    26992714    QStringList layoutNames;
    27002715    foreach (const UISoftKeyboardLayout &layout, m_layouts)
    2701     {
    2702         if (layout.nativeName().isEmpty() && !layout.name().isEmpty())
    2703             layoutNames << layout.name();
    2704         else if (!layout.nativeName().isEmpty() && layout.name().isEmpty())
    2705             layoutNames << layout.nativeName();
    2706         else
    2707             layoutNames << QString("%1 (%2)").arg(layout.nativeName()).arg(layout.name());
    2708     }
     2716        layoutNames << layout.nameString();
    27092717    return layoutNames;
    27102718}
     
    33143322
    33153323    /* Update the status bar string: */
    3316     QString strLayoutName = pCurrentLayout ? pCurrentLayout->name() : QString();
    3317     updateStatusBarMessage(strLayoutName);
     3324    if (!pCurrentLayout)
     3325        return;
     3326    updateStatusBarMessage(pCurrentLayout->nameString());
    33183327}
    33193328
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette