Commit 8e522c92 authored by hjk's avatar hjk

debugger: really don't use curses on windows

parent 62811941
......@@ -10,8 +10,15 @@ import base64
import os
import __builtin__
if os.name != "nt":
if os.name == "nt":
def printableChar(ucs):
if ucs >= 32 and ucs <= 126:
return ucs
return '?'
else:
import curses.ascii
def printableChar(ucs):
return select(curses.ascii.isprint(ucs), ucs, '?')
# only needed for gdb 7.0/7.0.1 that do not implement parse_and_eval
import os
......
......@@ -37,8 +37,7 @@ def qdump__QByteArray(d, item):
def qdump__QChar(d, item):
ucs = int(item.value["ucs"])
c = select(curses.ascii.isprint(ucs), ucs, '?')
d.putValue("'%c' (%d)" % (c, ucs))
d.putValue("'%c' (%d)" % (printableChar(ucs), ucs))
d.putNumChild(0)
......
......@@ -428,7 +428,7 @@ void testQList()
flist.push_back(1000);
flist.push_back(1001);
flist.push_back(1002);
#if 0
#if 1
QList<int> li;
QList<uint> lu;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment