Debugger sources code clean-up
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / localbrowser.cpp
index c5782da..35b858d 100644 (file)
 // \r
 LocalBrowserWindow::LocalBrowserWindow(QWidget * parent/*= 0*/) : QWidget(parent, Qt::Dialog),\r
        layout(new QVBoxLayout), text(new QTextBrowser),\r
-//     layout(new QVBoxLayout), text(new QLabel),\r
-//     refresh(new QPushButton(tr("Refresh"))),\r
-//     address(new QLineEdit),\r
-//     go(new QPushButton(tr("Go"))),\r
-//     memBase(0),\r
        NbLocal(0),\r
        FuncName((char *)calloc(1, 1)),\r
        LocalInfo(NULL)\r
 {\r
        setWindowTitle(tr("Local"));\r
 \r
-//     address->setInputMask("hhhhhh");\r
-//     QHBoxLayout * hbox1 = new QHBoxLayout;\r
-//     hbox1->addWidget(refresh);\r
-//     hbox1->addWidget(address);\r
-//     hbox1->addWidget(go);\r
-\r
-       // Need to set the size as well...\r
-//     resize(560, 480);\r
-\r
        QFont fixedFont("Lucida Console", 8, QFont::Normal);\r
-//     QFont fixedFont("", 8, QFont::Normal);\r
        fixedFont.setStyleHint(QFont::TypeWriter);\r
        text->setFont(fixedFont);\r
-////   layout->setSizeConstraint(QLayout::SetFixedSize);\r
        setLayout(layout);\r
 \r
        layout->addWidget(text);\r
-//     layout->addWidget(refresh);\r
-//     layout->addLayout(hbox1);\r
-\r
-//     connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents()));\r
-//     connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress()));\r
 }\r
 \r
 \r
@@ -62,7 +41,6 @@ LocalBrowserWindow::~LocalBrowserWindow(void)
 {\r
        free(LocalInfo);\r
        free(FuncName);\r
-//     NbLocal = 0;\r
 }\r
 \r
 \r
@@ -117,12 +95,9 @@ bool LocalBrowserWindow::UpdateInfos(void)
 void LocalBrowserWindow::RefreshContents(void)\r
 {\r
        char string[1024];\r
-//     char buf[64];\r
        QString Local;\r
        char Value[100];\r
        char *PtrValue;\r
-//     size_t NbWatch, Adr;\r
-//     WatchInfo PtrLocalInfo;\r
 \r
        const char *CPURegName[] = { "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7" };\r
 \r
@@ -130,17 +105,6 @@ void LocalBrowserWindow::RefreshContents(void)
        {\r
                if (UpdateInfos())\r
                {\r
-//#ifdef _MSC_VER\r
-                       //#pragma message("Warning: !!! Need to check the memory desalocation for LocalInfo !!!")\r
-//#else\r
-                       //#warning "!!! Need to do the memory desalocation for LocalInfo !!!"\r
-//#endif // _MSC_VER\r
-//#ifdef _MSC_VER\r
-                       //#pragma message("Warning: !!! Need to check the memory desalocation for FuncName !!!")\r
-//#else\r
-                       //#warning "!!! Need to do the memory desalocation for FuncName !!!"\r
-//#endif // _MSC_VER\r
-\r
                        for (size_t i = 0; i < NbLocal; i++)\r
                        {\r
                                if (LocalInfo[i].PtrVariableName)\r
@@ -221,58 +185,11 @@ void LocalBrowserWindow::RefreshContents(void)
 }\r
 \r
 \r
-#if 0\r
+// \r
 void LocalBrowserWindow::keyPressEvent(QKeyEvent * e)\r
 {\r
        if (e->key() == Qt::Key_Escape)\r
-               hide();\r
-       else if (e->key() == Qt::Key_PageUp)\r
-       {\r
-               memBase -= 480;\r
-\r
-               if (memBase < 0)\r
-                       memBase = 0;\r
-\r
-               RefreshContents();\r
-       }\r
-       else if (e->key() == Qt::Key_PageDown)\r
-       {\r
-               memBase += 480;\r
-\r
-               if (memBase > (0x200000 - 480))\r
-                       memBase = 0x200000 - 480;\r
-\r
-               RefreshContents();\r
-       }\r
-       else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus)\r
        {\r
-               memBase -= 16;\r
-\r
-               if (memBase < 0)\r
-                       memBase = 0;\r
-\r
-               RefreshContents();\r
-       }\r
-       else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal)\r
-       {\r
-               memBase += 16;\r
-\r
-               if (memBase > (0x200000 - 480))\r
-                       memBase = 0x200000 - 480;\r
-\r
-               RefreshContents();\r
+               hide();\r
        }\r
 }\r
-#endif\r
-\r
-\r
-#if 0\r
-void LocalBrowserWindow::GoToAddress(void)\r
-{\r
-       bool ok;\r
-       QString newAddress = address->text();\r
-       memBase = newAddress.toUInt(&ok, 16);\r
-       RefreshContents();\r
-}\r
-#endif\r
-\r