Changeset 63322 in vbox
- Timestamp:
- Aug 11, 2016 11:07:49 AM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
r63311 r63322 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIDnDDrag class implementation. This class implements the 4 * IDataObject interface. 3 * VBox Qt GUI - UIDnDDrag class implementation (implements IDataObject). 5 4 */ 6 5 … … 54 53 HRESULT hr; 55 54 56 ULONGcMaxFormats = 16; /* Maximum number of registered formats. */55 int cMaxFormats = 16; /* Maximum number of registered formats. */ 57 56 ULONG cRegisteredFormats = 0; 58 57 … … 64 63 RT_BZERO(m_pStgMedium, sizeof(STGMEDIUM) * cMaxFormats); 65 64 66 for (int i = 0; 67 ( i < lstFormats.size() 68 && i < cMaxFormats); i++) 65 for (int i = 0; i < lstFormats.size() && i < cMaxFormats; i++) 69 66 { 70 67 const QString &strFormat = lstFormats.at(i); … … 247 244 m_strFormat.toUtf8().constData(), m_pvData, m_cbData)); 248 245 249 QVariant::Type vaType ;246 QVariant::Type vaType = QVariant::Invalid; /* MSC: Might be used uninitialized otherwise! */ 250 247 QString strMIMEType; 251 248 if ( (pFormatEtc->tymed & TYMED_HGLOBAL) 252 && (pFormatEtc->dwAspect == DVASPECT_CONTENT)249 && pFormatEtc->dwAspect == DVASPECT_CONTENT 253 250 && ( pFormatEtc->cfFormat == CF_TEXT 254 251 || pFormatEtc->cfFormat == CF_UNICODETEXT) … … 260 257 } 261 258 else if ( (pFormatEtc->tymed & TYMED_HGLOBAL) 262 && (pFormatEtc->dwAspect == DVASPECT_CONTENT)263 && (pFormatEtc->cfFormat == CF_HDROP))259 && pFormatEtc->dwAspect == DVASPECT_CONTENT 260 && pFormatEtc->cfFormat == CF_HDROP) 264 261 { 265 262 strMIMEType = "text/uri-list"; … … 299 296 { 300 297 if (m_pDnDHandler) 301 { 302 rc = m_pDnDHandler->retrieveData(Qt::CopyAction, 303 strMIMEType, vaType, m_vaData); 304 } 298 rc = m_pDnDHandler->retrieveData(Qt::CopyAction, strMIMEType, vaType, m_vaData); 305 299 else 306 300 rc = VERR_NOT_FOUND; … … 324 318 QStringList lstFilesURI = m_vaData.toStringList(); 325 319 QStringList lstFiles; 326 for ( size_t i = 0; i < lstFilesURI.size(); i++)320 for (int i = 0; i < lstFilesURI.size(); i++) 327 321 { 328 322 char *pszFilePath = RTUriFilePath(lstFilesURI.at(i).toUtf8().constData()); … … 340 334 } 341 335 342 size_t cFiles = lstFiles.size();336 int cFiles = lstFiles.size(); 343 337 LogFlowThisFunc(("Files (%zu)\n", cFiles)); 344 338 if ( RT_SUCCESS(rc) … … 346 340 { 347 341 size_t cchFiles = 0; /* Number of characters. */ 348 for ( size_t i = 0; i < cFiles; i++)342 for (int i = 0; i < cFiles; i++) 349 343 { 350 344 const char *pszFile = lstFiles.at(i).toUtf8().constData(); … … 369 363 370 364 LogFlowThisFunc(("Encoded:\n")); 371 for ( size_t i = 0; i < cFiles; i++)365 for (int i = 0; i < cFiles; i++) 372 366 { 373 367 const char *pszFile = lstFiles.at(i).toUtf8().constData(); … … 529 523 STDMETHODIMP UIDnDDataObject::GetDataHere(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium) 530 524 { 525 RT_NOREF(pFormatEtc, pMedium); 531 526 LogFlowFunc(("\n")); 532 527 return DATA_E_FORMATETC; … … 542 537 STDMETHODIMP UIDnDDataObject::QueryGetData(LPFORMATETC pFormatEtc) 543 538 { 544 return (LookupFormatEtc(pFormatEtc, NULL /* puIndex */)) ? S_OK : DV_E_FORMATETC; 545 } 546 547 STDMETHODIMP UIDnDDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEct, LPFORMATETC pFormatEtcOut) 548 { 539 return LookupFormatEtc(pFormatEtc, NULL /* puIndex */) ? S_OK : DV_E_FORMATETC; 540 } 541 542 STDMETHODIMP UIDnDDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEtc, LPFORMATETC pFormatEtcOut) 543 { 544 RT_NOREF(pFormatEtc); 549 545 LogFlowFunc(("\n")); 550 546 … … 556 552 STDMETHODIMP UIDnDDataObject::SetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease) 557 553 { 554 RT_NOREF(pFormatEtc, pMedium, fRelease); 558 555 return E_NOTIMPL; 559 556 } … … 576 573 } 577 574 578 STDMETHODIMP UIDnDDataObject::DAdvise(LPFORMATETC pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) 579 { 575 STDMETHODIMP UIDnDDataObject::DAdvise(LPFORMATETC pFormatEtc, DWORD fAdvise, IAdviseSink *pAdvSink, DWORD *pdwConnection) 576 { 577 RT_NOREF(pFormatEtc, fAdvise, pAdvSink, pdwConnection); 580 578 return OLE_E_ADVISENOTSUPPORTED; 581 579 } … … 583 581 STDMETHODIMP UIDnDDataObject::DUnadvise(DWORD dwConnection) 584 582 { 583 RT_NOREF(dwConnection); 585 584 return OLE_E_ADVISENOTSUPPORTED; 586 585 } … … 588 587 STDMETHODIMP UIDnDDataObject::EnumDAdvise(IEnumSTATDATA **ppEnumAdvise) 589 588 { 589 RT_NOREF(ppEnumAdvise); 590 590 return OLE_E_ADVISENOTSUPPORTED; 591 591 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h
r62493 r63322 63 63 STDMETHOD(GetDataHere)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium); 64 64 STDMETHOD(QueryGetData)(LPFORMATETC pFormatEtc); 65 STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pFormatE ct, LPFORMATETC pFormatEtcOut);65 STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pFormatEtc, LPFORMATETC pFormatEtcOut); 66 66 STDMETHOD(SetData)(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium, BOOL fRelease); 67 67 STDMETHOD(EnumFormatEtc)(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc); 68 STDMETHOD(DAdvise)(LPFORMATETC pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);68 STDMETHOD(DAdvise)(LPFORMATETC pFormatEtc, DWORD fAdvise, IAdviseSink *pAdvSink, DWORD *pdwConnection); 69 69 STDMETHOD(DUnadvise)(DWORD dwConnection); 70 70 STDMETHOD(EnumDAdvise)(IEnumSTATDATA **ppEnumAdvise); … … 110 110 }; 111 111 112 #endif /* ___UIDnDDataObject_win_h___ */112 #endif /* !___UIDnDDataObject_win_h___ */ 113 113 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationDataItem.cpp
r62599 r63322 73 73 QVariant UIInformationDataItem::data(const QModelIndex &index, int role) const 74 74 { 75 RT_NOREF(index); 75 76 switch (role) 76 77 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationItem.cpp
r62670 r63322 122 122 QSize UIInformationItem::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const 123 123 { 124 RT_NOREF(option); 125 124 126 /* Update data: */ 125 127 updateData(index); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp
r62493 r63322 382 382 #ifdef VBOX_WITH_PARALLEL_PORTS 383 383 case DetailsElementType_Parallel: 384 #endif /* VBOX_WITH_PARALLEL_PORTS */384 #endif 385 385 case DetailsElementType_USB: 386 386 case DetailsElementType_SF: … … 401 401 break; 402 402 } 403 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */ 403 404 } 404 405 } … … 442 443 #ifdef VBOX_WITH_PARALLEL_PORTS 443 444 case DetailsElementType_Parallel: 444 #endif /* VBOX_WITH_PARALLEL_PORTS */445 #endif 445 446 case DetailsElementType_USB: 446 447 case DetailsElementType_SF: … … 456 457 break; 457 458 } 459 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */ 458 460 } 459 461 } … … 497 499 #ifdef VBOX_WITH_PARALLEL_PORTS 498 500 case DetailsElementType_Parallel: 499 #endif /* VBOX_WITH_PARALLEL_PORTS */501 #endif 500 502 case DetailsElementType_USB: 501 503 case DetailsElementType_SF: … … 547 549 break; 548 550 } 551 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */ 549 552 } 550 553 } … … 586 589 #ifdef VBOX_WITH_PARALLEL_PORTS 587 590 case DetailsElementType_Parallel: return new UIGDetailsElementParallel(this, fOpen); 588 #endif /* VBOX_WITH_PARALLEL_PORTS */591 #endif 589 592 case DetailsElementType_USB: return new UIGDetailsElementUSB(this, fOpen); 590 593 case DetailsElementType_SF: return new UIGDetailsElementSF(this, fOpen); 591 594 case DetailsElementType_UI: return new UIGDetailsElementUI(this, fOpen); 592 595 case DetailsElementType_Description: return new UIGDetailsElementDescription(this, fOpen); 596 case DetailsElementType_Invalid: AssertFailed(); break; /* Shut up, MSC! */ 593 597 } 594 598 return 0; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r61600 r63322 3415 3415 break; 3416 3416 } 3417 default: break; /* Shut up, MSC! */ 3417 3418 } 3418 3419 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.cpp
r62493 r63322 41 41 case KDeviceType_HardDisk: setIcon(UIIconPool::iconSet(":/hd_16px.png")); break; 42 42 case KDeviceType_Network: setIcon(UIIconPool::iconSet(":/nw_16px.png")); break; 43 default: break; /* Shut up, MSC! */ 43 44 } 44 45 retranslateUi(); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
r62493 r63322 255 255 #elif defined(VBOX_WS_WIN) 256 256 257 return ((iKeyCode >= VK_SHIFT && iKeyCode <= VK_CAPITAL) || 258 (iKeyCode >= VK_LSHIFT && iKeyCode <= VK_RMENU) || 259 (iKeyCode >= VK_F1 && iKeyCode <= VK_F24) || 260 iKeyCode == VK_NUMLOCK || iKeyCode == VK_SCROLL || 261 iKeyCode == VK_LWIN || iKeyCode == VK_RWIN || 262 iKeyCode == VK_APPS || 263 iKeyCode == VK_PRINT); 257 return (iKeyCode >= VK_SHIFT && iKeyCode <= VK_CAPITAL) 258 || (iKeyCode >= VK_LSHIFT && iKeyCode <= VK_RMENU) 259 || (iKeyCode >= VK_F1 && iKeyCode <= VK_F24) 260 || iKeyCode == VK_NUMLOCK 261 || iKeyCode == VK_SCROLL 262 || iKeyCode == VK_LWIN 263 || iKeyCode == VK_RWIN 264 || iKeyCode == VK_APPS 265 || iKeyCode == VK_PRINT; 264 266 265 267 #elif defined(VBOX_WS_X11) … … 276 278 # warning "port me!" 277 279 280 return false; 278 281 #endif 279 280 return false;281 282 } 282 283 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
r62493 r63322 494 494 default: return false; 495 495 } 496 /* Return false value: */ 497 return false; 496 /* not reached! */ 498 497 } 499 498 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp
r62493 r63322 53 53 case KCloneMode_MachineAndChildStates: m_pMachineAndChildsRadio->setChecked(true); break; 54 54 case KCloneMode_AllStates: m_pAllRadio->setChecked(true); break; 55 case KCloneMode_Max: break; /* Shut up, MSC! */ 55 56 } 56 57 }
Note:
See TracChangeset
for help on using the changeset viewer.