]> git.cworth.org Git - apitrace/blobdiff - gui/argumentseditor.cpp
Recognize CGLFlushDrawable as a swapbuffer.
[apitrace] / gui / argumentseditor.cpp
index 3ac381e6c4b52f2fcc09f3e397e645608a3db9ad..0aeafeb4081e8cbe264c8237a05070f3e2399dd9 100644 (file)
@@ -143,6 +143,7 @@ ArgumentsEditor::ArgumentsEditor(QWidget *parent)
 
 ArgumentsEditor::~ArgumentsEditor()
 {
+    delete m_model;
 }
 
 void ArgumentsEditor::setCall(ApiTraceCall *call)
@@ -239,6 +240,15 @@ void ArgumentsEditor::setupCall()
             item->setIcon(icon);
             item->setToolTip(tr("Argument is read-only"));
             topRow.append(item);
+        } else if (val.canConvert<ApiEnum>()) {
+            ApiEnum en = val.value<ApiEnum>();
+            QStandardItem *item = new QStandardItem();
+            item->setFlags(item->flags() ^ Qt::ItemIsEditable);
+            item->setText(en.toString());
+            QIcon icon(":/resources/emblem-locked.png");
+            item->setIcon(icon);
+            item->setToolTip(tr("Argument is read-only"));
+            topRow.append(item);
         } else if (val.canConvert<ApiBitmask>()) {
             ApiBitmask mask = val.value<ApiBitmask>();
             QStandardItem *item = new QStandardItem();
@@ -330,10 +340,12 @@ void ArgumentsEditor::accept()
         QVariant argValue = originalValues[i];
         QVariant editorValue = valueForName(argName, argValue, &valChanged);
         newValues.append(editorValue);
+#if 0
         qDebug()<<"Arg = "<<argName;
         qDebug()<<"\toriginal = "<<argValue;
         qDebug()<<"\teditor   = "<<editorValue;
         qDebug()<<"\tchanged  = "<<valChanged;
+#endif
         if (valChanged)
             changed = true;
     }