• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AssertPtrReturnVoid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AssertPtrReturnVoid函数的典型用法代码示例。如果您正苦于以下问题:C++ AssertPtrReturnVoid函数的具体用法?C++ AssertPtrReturnVoid怎么用?C++ AssertPtrReturnVoid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AssertPtrReturnVoid函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rtR0DbgKrnlInfoModRelease

/**
 * Releases the kernel module and closes its CTF data.
 *
 * @param pMod          Pointer to the module handle.
 * @param pCTF          Pointer to the module's CTF handle.
 */
static void rtR0DbgKrnlInfoModRelease(modctl_t *pMod, ctf_file_t *pCTF)
{
    AssertPtrReturnVoid(pMod);
    AssertPtrReturnVoid(pCTF);

    ctf_close(pCTF);
}
开发者ID:mcenirm,项目名称:vbox,代码行数:13,代码来源:dbgkrnlinfo-r0drv-solaris.c


示例2: RTDECL

/**
 * Get the information needed to map the area used by the host to send back
 * requests.
 *
 * @param  pCtx                the context containing the heap to use
 * @param  cbVRAM              how much video RAM is allocated to the device
 * @param  offVRAMBaseMapping  the offset of the basic communication structures
 *                             into the guest's VRAM
 * @param  poffVRAMHostArea    where to store the offset into VRAM of the host
 *                             heap area
 * @param  pcbHostArea         where to store the size of the host heap area
 */
RTDECL(void) VBoxHGSMIGetHostAreaMapping(PHGSMIGUESTCOMMANDCONTEXT pCtx,
                                         uint32_t cbVRAM,
                                         uint32_t offVRAMBaseMapping,
                                         uint32_t *poffVRAMHostArea,
                                         uint32_t *pcbHostArea)
{
    uint32_t offVRAMHostArea = offVRAMBaseMapping, cbHostArea = 0;

    AssertPtrReturnVoid(poffVRAMHostArea);
    AssertPtrReturnVoid(pcbHostArea);
    VBoxQueryConfHGSMI(pCtx, VBOX_VBVA_CONF32_HOST_HEAP_SIZE, &cbHostArea);
    if (cbHostArea != 0)
    {
        uint32_t cbHostAreaMaxSize = cbVRAM / 4;
        /** @todo what is the idea of this? */
        if (cbHostAreaMaxSize >= VBVA_ADAPTER_INFORMATION_SIZE)
        {
            cbHostAreaMaxSize -= VBVA_ADAPTER_INFORMATION_SIZE;
        }
        if (cbHostArea > cbHostAreaMaxSize)
        {
            cbHostArea = cbHostAreaMaxSize;
        }
        /* Round up to 4096 bytes. */
        cbHostArea = (cbHostArea + 0xFFF) & ~0xFFF;
        offVRAMHostArea = offVRAMBaseMapping - cbHostArea;
    }

    *pcbHostArea = cbHostArea;
    *poffVRAMHostArea = offVRAMHostArea;
    LogFunc(("offVRAMHostArea = 0x%08X, cbHostArea = 0x%08X\n",
             offVRAMHostArea, cbHostArea));
}
开发者ID:CandyYao,项目名称:VirtualBox-OSE,代码行数:45,代码来源:HGSMIBase.cpp


示例3: AssertPtrReturnVoid

void UISettingsSerializerProgress::sltHandleOperationProgressChange(ulong iOperations, QString strOperation,
                                                                    ulong iOperation, ulong iPercent)
{
    /* Update the sub-operation progress label and bar: */
    AssertPtrReturnVoid(m_pLabelSubOperationProgress);
    AssertPtrReturnVoid(m_pBarSubOperationProgress);
    m_pLabelSubOperationProgress->show();
    m_pBarSubOperationProgress->show();
    m_pLabelSubOperationProgress->setText(s_strProgressDescriptionTemplate.arg(strOperation).arg(iOperation).arg(iOperations));
    m_pBarSubOperationProgress->setValue(iPercent);
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:11,代码来源:UISettingsSerializer.cpp


示例4: DECLINLINE

DECLINLINE(void) tftpProcessRRQ(PNATState pData, PCTFTPIPHDR pTftpIpHeader, int pktlen)
{
    PTFTPSESSION pTftpSession = NULL;
    uint8_t *pu8Payload = NULL;
    int     cbPayload = 0;
    size_t cbFileName = 0;
    int rc = VINF_SUCCESS;

    AssertPtrReturnVoid(pTftpIpHeader);
    AssertPtrReturnVoid(pData);
    AssertReturnVoid(pktlen > sizeof(TFTPIPHDR));
    LogFlowFunc(("ENTER: pTftpIpHeader:%p, pktlen:%d\n", pTftpIpHeader, pktlen));

    rc = tftpAllocateSession(pData, pTftpIpHeader, &pTftpSession);
    if (   RT_FAILURE(rc)
        || pTftpSession == NULL)
    {
        LogFlowFuncLeave();
        return;
    }

    pu8Payload = (uint8_t *)&pTftpIpHeader->Core;
    cbPayload = pktlen - sizeof(TFTPIPHDR);

    cbFileName = RTStrNLen((char *)pu8Payload, cbPayload);
    /* We assume that file name should finish with '\0' and shouldn't bigger
     *  than buffer for name storage.
     */
    AssertReturnVoid(   cbFileName < cbPayload
                     && cbFileName < TFTP_FILENAME_MAX /* current limit in tftp session handle */
                     && cbFileName);

    /* Dont't bother with rest processing in case of invalid access */
    if (RT_FAILURE(tftpSecurityFilenameCheck(pData, pTftpSession)))
    {
        tftpSendError(pData, pTftpSession, 2, "Access violation", pTftpIpHeader);
        LogFlowFuncLeave();
        return;
    }



    if (RT_UNLIKELY(!tftpIsSupportedTransferMode(pTftpSession)))
    {
        tftpSendError(pData, pTftpSession, 4, "Unsupported transfer mode", pTftpIpHeader);
        LogFlowFuncLeave();
        return;
    }


    tftpSendOACK(pData, pTftpSession, pTftpIpHeader);
    LogFlowFuncLeave();
    return;
}
开发者ID:ryenus,项目名称:vbox,代码行数:54,代码来源:tftp.c


示例5: AssertPtrReturnVoid

/* static */
void UIDnDEnumFormatEtc::CopyFormat(FORMATETC *pDest, FORMATETC *pSource)
{
    AssertPtrReturnVoid(pDest);
    AssertPtrReturnVoid(pSource);

    *pDest = *pSource;

    if (pSource->ptd)
    {
        pDest->ptd = (DVTARGETDEVICE*)CoTaskMemAlloc(sizeof(DVTARGETDEVICE));
        *(pDest->ptd) = *(pSource->ptd);
    }
}
开发者ID:sobomax,项目名称:virtualbox_64bit_edd,代码行数:14,代码来源:UIDnDEnumFormat_win.cpp


示例6: drvHostPulseAudioCbSuccess

static void drvHostPulseAudioCbSuccess(pa_stream *pStream, int fSuccess, void *pvContext)
{
    AssertPtrReturnVoid(pStream);

    PPULSEAUDIOSTREAM pStrm = (PPULSEAUDIOSTREAM)pvContext;
    AssertPtrReturnVoid(pStrm);

    pStrm->fOpSuccess = fSuccess;

    if (fSuccess)
        drvHostPulseAudioAbortMainLoop();
    else
        drvHostPulseAudioError(pStrm->pDrv, "Failed to finish stream operation");
}
开发者ID:bhanug,项目名称:virtualbox,代码行数:14,代码来源:DrvHostPulseAudio.cpp


示例7: AssertPtrReturnVoid

void UIMachineSettingsGeneral::putToCache()
{
    /* Prepare general data: */
    UIDataSettingsMachineGeneral generalData = m_cache.base();

    /* 'Basic' tab data: */
    AssertPtrReturnVoid(m_pNameAndSystemEditor);
    generalData.m_strName = m_pNameAndSystemEditor->name();
    generalData.m_strGuestOsTypeId = m_pNameAndSystemEditor->type().GetId();

    /* 'Advanced' tab data: */
    AssertPtrReturnVoid(mPsSnapshot);
    AssertPtrReturnVoid(mCbClipboard);
    AssertPtrReturnVoid(mCbDragAndDrop);
    generalData.m_strSnapshotsFolder = mPsSnapshot->path();
    generalData.m_clipboardMode = (KClipboardMode)mCbClipboard->currentIndex();
    generalData.m_dndMode = (KDnDMode)mCbDragAndDrop->currentIndex();

    /* 'Description' tab data: */
    AssertPtrReturnVoid(mTeDescription);
    generalData.m_strDescription = mTeDescription->toPlainText().isEmpty() ?
                                   QString::null : mTeDescription->toPlainText();

    /* 'Encryption' tab data: */
    AssertPtrReturnVoid(m_pCheckBoxEncryption);
    AssertPtrReturnVoid(m_pComboCipher);
    AssertPtrReturnVoid(m_pEditorEncryptionPassword);
    generalData.m_fEncryptionEnabled = m_pCheckBoxEncryption->isChecked();
    generalData.m_fEncryptionCipherChanged = m_fEncryptionCipherChanged;
    generalData.m_fEncryptionPasswordChanged = m_fEncryptionPasswordChanged;
    generalData.m_iEncryptionCipherIndex = m_pComboCipher->currentIndex();
    generalData.m_strEncryptionPassword = m_pEditorEncryptionPassword->text();
    /* If encryption status, cipher or password is changed: */
    if (generalData.m_fEncryptionEnabled != m_cache.base().m_fEncryptionEnabled ||
        generalData.m_fEncryptionCipherChanged != m_cache.base().m_fEncryptionCipherChanged ||
        generalData.m_fEncryptionPasswordChanged != m_cache.base().m_fEncryptionPasswordChanged)
    {
        /* Ask for the disk encryption passwords if necessary: */
        if (!m_cache.base().m_encryptedMediums.isEmpty())
        {
            /* Create corresponding dialog: */
            QWidget *pDlgParent = windowManager().realParentWindow(window());
            QPointer<UIAddDiskEncryptionPasswordDialog> pDlg =
                 new UIAddDiskEncryptionPasswordDialog(pDlgParent,
                                                       generalData.m_strName,
                                                       generalData.m_encryptedMediums);
            /* Execute it and acquire the result: */
            if (pDlg->exec() == QDialog::Accepted)
                generalData.m_encryptionPasswords = pDlg->encryptionPasswords();
            /* Delete dialog if still valid: */
            if (pDlg)
                delete pDlg;
        }
    }

    /* Cache general data: */
    m_cache.cacheCurrentData(generalData);
}
开发者ID:sobomax,项目名称:virtualbox_64bit_edd,代码行数:58,代码来源:UIMachineSettingsGeneral.cpp


示例8: AssertPtrReturnVoid

void UIHostNetworkManagerWidget::prepareTreeWidget()
{
    /* Create tree-widget: */
    m_pTreeWidget = new QITreeWidget;
    AssertPtrReturnVoid(m_pTreeWidget);
    {
        /* Configure tree-widget: */
        m_pTreeWidget->setRootIsDecorated(false);
        m_pTreeWidget->setAlternatingRowColors(true);
        m_pTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
        m_pTreeWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        m_pTreeWidget->setColumnCount(Column_Max);
        m_pTreeWidget->setSortingEnabled(true);
        m_pTreeWidget->sortByColumn(Column_Name, Qt::AscendingOrder);
        m_pTreeWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
        connect(m_pTreeWidget, &QITreeWidget::currentItemChanged,
                this, &UIHostNetworkManagerWidget::sltHandleCurrentItemChange);
        connect(m_pTreeWidget, &QITreeWidget::customContextMenuRequested,
                this, &UIHostNetworkManagerWidget::sltHandleContextMenuRequest);
        connect(m_pTreeWidget, &QITreeWidget::itemChanged,
                this, &UIHostNetworkManagerWidget::sltHandleItemChange);
        connect(m_pTreeWidget, &QITreeWidget::itemDoubleClicked,
                m_pActionPool->action(UIActionIndexST_M_Network_T_Details), &QAction::setChecked);

        /* Add into layout: */
        layout()->addWidget(m_pTreeWidget);
    }
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:28,代码来源:UIHostNetworkManager.cpp


示例9: AssertPtrReturnVoid

void UIMachineWindowFullscreen::adjustMachineViewSize()
{
    /* Call to base-class: */
    UIMachineWindow::adjustMachineViewSize();

#ifndef Q_WS_MAC
    /* If mini-toolbar present: */
    if (m_pMiniToolBar)
    {
        /* Make sure this window has fullscreen logic: */
        const UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic());
        AssertPtrReturnVoid(pFullscreenLogic);

        /* Which host-screen should that machine-window located on? */
        const int iHostScreen = pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId);

#ifndef Q_WS_X11
        /* Move mini-toolbar into appropriate place: */
        m_pMiniToolBar->adjustGeometry(iHostScreen);
#else /* Q_WS_X11 */
        /* On modern WMs we are mapping mini-toolbar to corresponding host-screen directly. */
        const bool fSupportsNativeFullScreen = VBoxGlobal::supportsFullScreenMonitorsProtocolX11() &&
                                               !gEDataManager->legacyFullscreenModeRequested();
        /* Adjust mini-toolbar and move into appropriate place if necessary: */
        m_pMiniToolBar->adjustGeometry(fSupportsNativeFullScreen ? -1 : iHostScreen);
#endif /* Q_WS_X11 */
    }
#endif /* !Q_WS_MAC */
}
开发者ID:stefano-garzarella,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:29,代码来源:UIMachineWindowFullscreen.cpp


示例10: action

void UIActionPool::updateMenuHelp()
{
    /* Get corresponding menu: */
    UIMenu *pMenu = action(UIActionIndex_Menu_Help)->menu();
    AssertPtrReturnVoid(pMenu);
    /* Clear contents: */
    pMenu->clear();

    /* Separator? */
    bool fSeparator = false;

    /* 'Contents' action: */
    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_Contents)) || fSeparator;;
    /* 'Web Site' action: */
    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_WebSite)) || fSeparator;;

    /* Separator? */
    if (fSeparator)
    {
        pMenu->addSeparator();
        fSeparator = false;
    }

#ifndef RT_OS_DARWIN
    /* 'About' action: */
    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_About)) || fSeparator;;
#endif /* !RT_OS_DARWIN */

    /* Mark menu as valid: */
    m_invalidations.remove(UIActionIndex_Menu_Help);
}
开发者ID:zBMNForks,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:31,代码来源:UIActionPool.cpp


示例11: UIToolBar

void UIHostNetworkManagerWidget::prepareToolBar()
{
    /* Create toolbar: */
    m_pToolBar = new UIToolBar(parentWidget());
    AssertPtrReturnVoid(m_pToolBar);
    {
        /* Configure toolbar: */
        const int iIconMetric = (int)(QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize));
        m_pToolBar->setIconSize(QSize(iIconMetric, iIconMetric));
        m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);

        /* Add toolbar actions: */
        m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Network_S_Create));
        m_pToolBar->addSeparator();
        m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Network_S_Remove));
        m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Network_T_Details));
//        m_pToolBar->addSeparator();
//        m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Network_S_Refresh));

#ifdef VBOX_WS_MAC
        /* Check whether we are embedded into a stack: */
        if (m_enmEmbedding == EmbedTo_Stack)
        {
            /* Add into layout: */
            layout()->addWidget(m_pToolBar);
        }
#else
        /* Add into layout: */
        layout()->addWidget(m_pToolBar);
#endif
    }
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:32,代码来源:UIHostNetworkManager.cpp


示例12: AssertPtrReturnVoid

void UIPopupCenter::setPopupStackOrientation(QWidget *pParent, UIPopupStackOrientation newStackOrientation)
{
    /* Make sure parent is set! */
    AssertPtrReturnVoid(pParent);

    /* Composing corresponding popup-stack ID: */
    const QString strPopupStackID(popupStackID(pParent));

    /* Looking for current popup-stack orientation, create if it doesn't exists: */
    UIPopupStackOrientation &stackOrientation = m_stackOrientations[strPopupStackID];

    /* Make sure stack-orientation has changed: */
    if (stackOrientation == newStackOrientation)
        return;

    /* Remember new stack orientation: */
    LogRelFlow(("UIPopupCenter::setPopupStackType: Changing orientation of popup-stack with ID = '%s' from '%s' to '%s'.\n",
                strPopupStackID.toAscii().constData(),
                stackOrientation == UIPopupStackOrientation_Top ? "top oriented" : "bottom oriented",
                newStackOrientation == UIPopupStackOrientation_Top ? "top oriented" : "bottom oriented"));
    stackOrientation = newStackOrientation;

    /* Update orientation for popup-stack if it currently exists: */
    if (m_stacks.contains(strPopupStackID))
        m_stacks[strPopupStackID]->setOrientation(stackOrientation);
}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:26,代码来源:UIPopupCenter.cpp


示例13: drvHostPulseAudioCbSuccess

static void drvHostPulseAudioCbSuccess(pa_stream *pStream, int fSuccess, void *pvContext)
{
    AssertPtrReturnVoid(pStream);

    PPULSEAUDIOSTREAM pStrm = (PPULSEAUDIOSTREAM)pvContext;
    AssertPtrReturnVoid(pStrm);

    pStrm->fOpSuccess = fSuccess;

    if (fSuccess)
    {
        pa_threaded_mainloop_signal(g_pMainLoop, 0 /* fWait */);
    }
    else
         drvHostPulseAudioError(pStrm->pDrv, "Failed to finish stream operation");
}
开发者ID:Klanly,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:16,代码来源:DrvHostPulseAudio.cpp


示例14: AssertPtrReturnVoid

void VBoxAboutDlg::prepareCloseButton()
{
    /* Create button-box: */
    QDialogButtonBox *pButtonBox = new QDialogButtonBox;
    AssertPtrReturnVoid(pButtonBox);
    {
        /* Create close-button: */
        QPushButton *pCloseButton = pButtonBox->addButton(QDialogButtonBox::Close);
        AssertPtrReturnVoid(pCloseButton);
        /* Prepare close-button: */
        connect(pButtonBox, SIGNAL(rejected()), this, SLOT(reject()));

        /* Add button-box to the main-layout: */
        m_pMainLayout->addWidget(pButtonBox);
    }
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:16,代码来源:VBoxAboutDlg.cpp


示例15: QStyledItemDelegate

UIInformationItem::UIInformationItem(QObject *pParent)
    : QStyledItemDelegate(pParent)
{
    /* Create text-document: */
    m_pTextDocument = new QTextDocument(this);
    AssertPtrReturnVoid(m_pTextDocument);
}
开发者ID:miguelinux,项目名称:vbox,代码行数:7,代码来源:UIInformationItem.cpp


示例16: AssertPtrReturnVoid

void UIVMInformationDialog::prepareTabWidget()
{
    /* Create tab-widget: */
    m_pTabWidget = new QITabWidget;
    AssertPtrReturnVoid(m_pTabWidget);
    {
        /* Create tabs: */
        /* Create Configuration details tab: */

        UIGInformation *pInformationWidget = new UIGInformation(this);
        QList<UIVMItem*> items;
        items << new UIVMItem(gpMachine->uisession()->machine());
        pInformationWidget->setItems(items);
        m_tabs.insert(0, pInformationWidget);

        m_pTabWidget->addTab(m_tabs.value(0), QString());

        for (int iTabIndex = 1; iTabIndex < 2; ++iTabIndex)
            prepareTab(iTabIndex);
        /* Configure tab-widget: */
        m_pTabWidget->setTabIcon(0, UIIconPool::iconSet(":/session_info_details_16px.png"));
        m_pTabWidget->setTabIcon(1, UIIconPool::iconSet(":/session_info_runtime_16px.png"));
        m_pTabWidget->setCurrentIndex(1);
        /* Add tab-widget into main-layout: */
        centralWidget()->layout()->addWidget(m_pTabWidget);
    }
}
开发者ID:pombredanne,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:27,代码来源:UIVMInformationDialog.cpp


示例17: AssertPtrReturnVoid

void UIInformationModel::addItem(UIInformationDataItem *pItem)
{
    /* Make sure item is valid: */
    AssertPtrReturnVoid(pItem);
    /* Add item: */
    m_list.append(pItem);
}
开发者ID:miguelinux,项目名称:vbox,代码行数:7,代码来源:UIInformationModel.cpp


示例18: UIMiniToolBar

void UIMachineWindowFullscreen::prepareMiniToolbar()
{
    /* Make sure mini-toolbar is not restricted: */
    if (!gEDataManager->miniToolbarEnabled(vboxGlobal().managedVMUuid()))
        return;

    /* Create mini-toolbar: */
    m_pMiniToolBar = new UIMiniToolBar(this,
                                       GeometryType_Full,
                                       gEDataManager->miniToolbarAlignment(vboxGlobal().managedVMUuid()),
                                       gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    AssertPtrReturnVoid(m_pMiniToolBar);
    {
        /* Configure mini-toolbar: */
        m_pMiniToolBar->addMenus(actionPool()->menus());
        connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()),
                this, SLOT(showMinimized()), Qt::QueuedConnection);
        connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
                actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
        connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
                actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger()));
        connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutWindowActivationStolen()),
                this, SLOT(sltRevokeWindowActivation()), Qt::QueuedConnection);
# ifdef Q_WS_X11
        // WORKAROUND:
        // Due to Unity bug we want native full-screen flag to be set
        // for mini-toolbar _before_ trying to show it in full-screen mode.
        // That significantly improves of chances to have required geometry.
        if (vboxGlobal().typeOfWindowManager() == X11WMType_Compiz)
            vboxGlobal().setFullScreenFlag(m_pMiniToolBar);
# endif /* Q_WS_X11 */
    }
}
开发者ID:pombredanne,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:33,代码来源:UIMachineWindowFullscreen.cpp


示例19: AssertReturnVoid

void UIMachineWindowFullscreen::sltEnterNativeFullscreen(UIMachineWindow *pMachineWindow)
{
    /* Make sure this slot is called only under ML and next: */
    AssertReturnVoid(vboxGlobal().osRelease() > MacOSXRelease_Lion);

    /* Make sure it is NULL or 'this' window passed: */
    if (pMachineWindow && pMachineWindow != this)
        return;

    /* Make sure this window has fullscreen logic: */
    UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic());
    AssertPtrReturnVoid(pFullscreenLogic);

    /* Make sure this window should be shown and mapped to host-screen: */
    if (!uisession()->isScreenVisible(m_uScreenId) ||
        !pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId))
        return;

    /* Mark window 'transitioned to fullscreen': */
    m_fIsInFullscreenTransition = true;

    /* Enter native fullscreen mode if necessary: */
    if (   (pFullscreenLogic->screensHaveSeparateSpaces() || m_uScreenId == 0)
        && !darwinIsInFullscreenMode(this))
        darwinToggleFullscreenMode(this);
}
开发者ID:pombredanne,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:26,代码来源:UIMachineWindowFullscreen.cpp


示例20: AssertPtrReturnVoid

/* static */
void VBoxDnDDropTarget::DumpFormats(IDataObject *pDataObject)
{
    AssertPtrReturnVoid(pDataObject);

    /* Enumerate supported source formats. This shouldn't happen too often
     * on day to day use, but still keep it in here. */
    IEnumFORMATETC *pEnumFormats;
    HRESULT hr2 = pDataObject->EnumFormatEtc(DATADIR_GET, &pEnumFormats);
    if (SUCCEEDED(hr2))
    {
        LogRel(("DnD: The following formats were offered to us:\n"));

        FORMATETC curFormatEtc;
        while (pEnumFormats->Next(1, &curFormatEtc,
                                  NULL /* pceltFetched */) == S_OK)
        {
            WCHAR wszCfName[128]; /* 128 chars should be enough, rest will be truncated. */
            hr2 = GetClipboardFormatNameW(curFormatEtc.cfFormat, wszCfName,
                                          sizeof(wszCfName) / sizeof(WCHAR));
            LogRel(("\tcfFormat=%RI16 (%s), tyMed=%RI32, dwAspect=%RI32, strCustomName=%ls, hr=%Rhrc\n",
                    curFormatEtc.cfFormat,
                    VBoxDnDDataObject::ClipboardFormatToString(curFormatEtc.cfFormat),
                    curFormatEtc.tymed,
                    curFormatEtc.dwAspect,
                    wszCfName, hr2));
        }

        pEnumFormats->Release();
    }
}
开发者ID:svn2github,项目名称:virtualbox,代码行数:31,代码来源:VBoxDnDDropTarget.cpp



注:本文中的AssertPtrReturnVoid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AssertRC函数代码示例发布时间:2022-05-30
下一篇:
C++ AssertPtrReturn函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap