VirtualBox

Changeset 25018 in vbox


Ignore:
Timestamp:
Nov 26, 2009 3:31:22 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: -Wshadow fixes

File:
1 edited

Legend:

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

    r24908 r25018  
    775775QString VBoxGlobal::brandingGetKey (QString aKey)
    776776{
    777     QSettings settings(mBrandingConfig, QSettings::IniFormat);
    778     return settings.value(QString("%1").arg(aKey)).toString();
     777    QSettings s(mBrandingConfig, QSettings::IniFormat);
     778    return s.value(QString("%1").arg(aKey)).toString();
    779779}
    780780
     
    14491449QString VBoxGlobal::details (const CUSBDevice &aDevice) const
    14501450{
    1451     QString details;
     1451    QString sDetails;
    14521452    QString m = aDevice.GetManufacturer().trimmed();
    14531453    QString p = aDevice.GetProduct().trimmed();
    14541454    if (m.isEmpty() && p.isEmpty())
    14551455    {
    1456         details =
     1456        sDetails =
    14571457            tr ("Unknown device %1:%2", "USB device details")
    14581458            .arg (QString().sprintf ("%04hX", aDevice.GetVendorId()))
     
    14621462    {
    14631463        if (p.toUpper().startsWith (m.toUpper()))
    1464             details = p;
     1464            sDetails = p;
    14651465        else
    1466             details = m + " " + p;
     1466            sDetails = m + " " + p;
    14671467    }
    14681468    ushort r = aDevice.GetRevision();
    14691469    if (r != 0)
    1470         details += QString().sprintf (" [%04hX]", r);
    1471 
    1472     return details.trimmed();
     1470        sDetails += QString().sprintf (" [%04hX]", r);
     1471
     1472    return sDetails.trimmed();
    14731473}
    14741474
     
    24222422    if (aMedium.type() == VBoxDefs::MediumType_HardDisk)
    24232423    {
    2424         VBoxMediaList::iterator parent = mMediaList.end();
     2424        VBoxMediaList::iterator itParent = mMediaList.end();
    24252425
    24262426        for (; it != mMediaList.end(); ++ it)
     
    24322432                break;
    24332433
    2434             if (aMedium.parent() != NULL && parent == mMediaList.end())
     2434            if (aMedium.parent() != NULL && itParent == mMediaList.end())
    24352435            {
    24362436                if (&*it == aMedium.parent())
    2437                     parent = it;
     2437                    itParent = it;
    24382438            }
    24392439            else
     
    24412441                /* break if met a parent's sibling (will insert before it) */
    24422442                if (aMedium.parent() != NULL &&
    2443                     (*it).parent() == (*parent).parent())
     2443                    (*it).parent() == (*itParent).parent())
    24442444                    break;
    24452445
     
    24512451        }
    24522452
    2453         AssertReturnVoid (aMedium.parent() == NULL || parent != mMediaList.end());
     2453        AssertReturnVoid (aMedium.parent() == NULL || itParent != mMediaList.end());
    24542454    }
    24552455    else
     
    25262526#endif
    25272527
    2528     VBoxMedium *parent = (*it).parent();
     2528    VBoxMedium *pParent = (*it).parent();
    25292529
    25302530    /* remove the medium from the list to keep it in sync with the server "for
     
    25362536    /* also emit the parent update signal because some attributes like
    25372537     * isReadOnly() may have been changed after child removal */
    2538     if (parent != NULL)
    2539     {
    2540         parent->refresh();
    2541         emit mediumUpdated (*parent);
     2538    if (pParent != NULL)
     2539    {
     2540        pParent->refresh();
     2541        emit mediumUpdated (*pParent);
    25422542    }
    25432543}
     
    42404240                if (aEvent->type() == QEvent::User)
    42414241                {
    4242                     ServiceEvent *event = static_cast <ServiceEvent*> (aEvent);
    4243                     mResult = event->result();
    4244                     event->accept();
     4242                    ServiceEvent *pEvent = static_cast <ServiceEvent*> (aEvent);
     4243                    mResult = pEvent->result();
     4244                    pEvent->accept();
    42454245                    quit();
    42464246                    return true;
     
    42574257        public:
    42584258
    4259             ServiceServer (ServiceClient &aClient, const QString &aURL)
    4260                 : mClient (aClient), mURL (aURL) {}
     4259            ServiceServer (ServiceClient &aClient, const QString &sURL)
     4260                : mClient (aClient), mURL (sURL) {}
    42614261
    42624262        private:
     
    45714571    /* Load the customized language as early as possible to get possible error
    45724572     * messages translated */
    4573     QString languageId = gset.languageId();
    4574     if (!languageId.isNull())
    4575         loadLanguage (languageId);
     4573    QString sLanguageId = gset.languageId();
     4574    if (!sLanguageId.isNull())
     4575        loadLanguage (sLanguageId);
    45764576
    45774577    retranslateUi();
     
    48774877    if (mDbgEnabled)
    48784878    {
    4879         int rc = SUPR3HardenedLdrLoadAppPriv("VBoxDbg", &mhVBoxDbg);
    4880         if (RT_FAILURE(rc))
     4879        int vrc = SUPR3HardenedLdrLoadAppPriv("VBoxDbg", &mhVBoxDbg);
     4880        if (RT_FAILURE(vrc))
    48814881        {
    48824882            mhVBoxDbg = NIL_RTLDRMOD;
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