VirtualBox

Changeset 79636 in vbox


Ignore:
Timestamp:
Jul 9, 2019 8:57:20 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131938
Message:

FE/Qt: bugref:6143. Some small refactoring

File:
1 edited

Legend:

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

    r79596 r79636  
    10391039    m_pEditorLayout->addWidget(m_pGoBackButton, 0, 0, 1, 1);
    10401040    connect(m_pGoBackButton, &QToolButton::clicked, this, &UILayoutEditor::sigGoBackButton);
    1041     pTitleLayout->addWidget(m_pGoBackButton);
    1042     pTitleLayout->addStretch(2);
    10431041    m_pTitleLabel = new QLabel;
    10441042    pTitleLayout->addWidget(m_pTitleLabel);
     1043    pTitleLayout->addStretch(2);
     1044    pTitleLayout->addWidget(m_pGoBackButton);
    10451045    m_pEditorLayout->addLayout(pTitleLayout, 0, 0, 1, 2);
    10461046
     
    12851285    m_pCloseButton->setAutoRaise(true);
    12861286    connect(m_pCloseButton, &QToolButton::clicked, this, &UILayoutSelector::sigCloseLayoutList);
    1287     pTitleLayout->addWidget(m_pCloseButton);
    1288     pTitleLayout->addStretch(2);
    12891287    m_pTitleLabel = new QLabel;
    12901288    pTitleLayout->addWidget(m_pTitleLabel);
     1289    pTitleLayout->addStretch(2);
     1290    pTitleLayout->addWidget(m_pCloseButton);
    12911291    pLayout->addLayout(pTitleLayout);
    12921292
     
    26302630    /* If no pyhsical layout with the UUID the keyboard layout refers is found then cancel loading the keyboard layout: */
    26312631    if (!pPhysicalLayout)
     2632    {
     2633        m_layouts.removeLast();
     2634        return false;
     2635    }
     2636    /* Make sure we have unique layout UUIDs: */
     2637    int iCount = 0;
     2638    foreach (const UISoftKeyboardLayout &layout, m_layouts)
     2639    {
     2640        if (layout.uid() == newLayout.uid())
     2641            ++iCount;
     2642    }
     2643    if (iCount > 1)
    26322644    {
    26332645        m_layouts.removeLast();
     
    31183130    setLayout(pLayout);
    31193131
     3132    m_pMessageLabel = new QLabel;
     3133    pLayout->addWidget(m_pMessageLabel);
     3134
    31203135    m_pLayoutListButton = new QToolButton;
    31213136    if (m_pLayoutListButton)
     
    31423157    }
    31433158
    3144     m_pMessageLabel = new QLabel;
    3145     pLayout->addWidget(m_pMessageLabel);
    31463159    retranslateUi();
    31473160}
     
    32433256    m_pCloseButton->setAutoRaise(true);
    32443257    connect(m_pCloseButton, &QToolButton::clicked, this, &UISoftKeyboardSettingsWidget::sigCloseSettingsWidget);
    3245     pTitleLayout->addWidget(m_pCloseButton);
    3246     pTitleLayout->addStretch(2);
    32473258    m_pTitleLabel = new QLabel;
    32483259    pTitleLayout->addWidget(m_pTitleLabel);
     3260    pTitleLayout->addStretch(2);
     3261    pTitleLayout->addWidget(m_pCloseButton);
    32493262    pSettingsLayout->addLayout(pTitleLayout, 0, 0, 1, 2);
    32503263
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