zoukankan      html  css  js  c++  java
  • Qt无法调试Qvector

    现象:

    解决:

    打开文件 $(VSDIR)Common7PackagesDebuggerautoexp.dat (VSDIR是本机Visual Studio的安装目录)
    把定义QVector和QMap显示内容的语句改成以下语句

    ;------------------------------------------------------------------------------
    ; QVector, QStack
    ;------------------------------------------------------------------------------
    QVector<*>|*::QVector<*>|QStack<*>|*::QStack<*>{
        preview
        (
            #if ($c.d->size <= 10) (
                #(
                    "[", $c.d->size, "](",
                    #array
                    (
                        expr: (($T1*)((char*)($c.d)+ $c.d->offset))[$i],
                        size: $c.d->size
                    ), ")"
                )
            ) #else (
                #(
                    "[", $c.d->size, "](",
                    #array
                    (
                        expr: (($T1*)((char*)($c.d)+ $c.d->offset))[$i],
                        size: $c.d->size
                    ), ", ...)"
                )
            )
        )
        children
        (
            #array
            (
                expr: (($T1*)((char*)($c.d)+ $c.d->offset))[$i],
                size: $c.d->size
            )
        )
    }
    
    ;------------------------------------------------------------------------------
    ; QMap
    ;------------------------------------------------------------------------------
    QMapNode<*,*>{
        preview
        (
            #(
                "(",
                $e.key,
                "; ",
                $e.value,
                ")"
            )
        )
    
        children
        (
            #(
                key: $e.key,
                value: $e.value
            )
        )
    }
    QMap<*>{
        children
        (
            #(
                raw data: [$c,!],
        			  #tree
    					  (
    							head: &($e.d->header),
    							size: $e.d->size,
    							left: left,
    							right: right,
    						) : ((QMapNode<$T1>*)&$e)
    						
            )
        )
    
        preview
        (
            #(
                "[",
                $e.d->size,
                "](",
    							  #tree
    							  (
    									head: &($e.d->header),
    									size: $e.d->size,
    									left: left,
    									right: right,
    								) : ((QMapNode<$T1>*)&$e),
                ")"
            )
        )
    }
  • 相关阅读:
    方格取数+ 传纸条 noip2000 + noip2008 DP
    题解 P1103 【书本整理】
    CF212D 【Cutting a Fence】
    CF339D 【Xenia and Bit Operations】
    旅行 NOIP2018 luogu P5022
    CodeFores 集合
    战略游戏 SDOI2018 圆方树 + 树上倍增求点权和
    树网的核 NOIP 2007 luogu P1099
    P2341 [USACO03FALL][HAOI2006]受欢迎的牛 G
    NOIP 2017 P3959 宝藏 (状态压缩DP板子)
  • 原文地址:https://www.cnblogs.com/judes/p/9157502.html
Copyright © 2011-2022 走看看