Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25420

Use of Utils::*Aspects and Utils::LayoutBuilder

    XMLWordPrintable

Details

    • Task
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • None
    • All Other Issues
    • None

    Description

      This is not really a task, just a description on how it looks currently

      ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings)
          : m_settings(settings)
      {
          addSuppression = new QPushButton(tr("Add..."));
          removeSuppression = new QPushButton(tr("Remove"));
      
          suppressionList = new QListView;
          suppressionList->setModel(&m_model);
          suppressionList->setSelectionMode(QAbstractItemView::MultiSelection);
      
          using namespace Layouting;
          const Break nl;
          ValgrindBaseSettings &s = *settings;
      
          Grid generic {
              s.valgrindExecutable, nl,
              s.valgrindArguments, nl,
              s.selfModifyingCodeDetection, nl
          };
      
          Grid memcheck {
              s.memcheckArguments, nl,
              s.trackOrigins, nl,
              s.showReachable, nl,
              s.leakCheckOnFinish, nl,
              s.numCallers, nl,
              s.filterExternalIssues, nl,
              Item {
                  Group {
                      Title(tr("Suppression files:")),
                      Row {
                          suppressionList,
                          Column { addSuppression, removeSuppression, Stretch() }
                      }
                  },
                  2 // Span.
              }
          };
      
          Grid callgrind {
              s.callgrindArguments, nl,
              s.kcachegrindExecutable, nl,
              s.minimumInclusiveCostRatio, nl,
              s.visualizationMinimumInclusiveCostRatio, nl,
              s.enableEventToolTips, nl,
              Item {
                  Group {
                      s.enableCacheSim,
                      s.enableBranchSim,
                      s.collectSystime,
                      s.collectBusEvents,
                  },
                  2 // Span.
              }
          };
      
          Column {
              Group { Title(tr("Valgrind Generic Settings")), generic },
              Group { Title(tr("MemCheck Memory Analysis Options")), memcheck },
              Group { Title(tr("CallGrind Profiling Options")), callgrind },
              Stretch(),
          }.attachTo(this);
      
      
          updateUi();
          connect(m_settings, &ValgrindBaseSettings::changed, this, &ValgrindConfigWidget::updateUi);
      
          connect(addSuppression, &QPushButton::clicked,
                  this, &ValgrindConfigWidget::slotAddSuppression);
          connect(removeSuppression, &QPushButton::clicked,
                  this, &ValgrindConfigWidget::slotRemoveSuppression);
      
          connect(&s, &ValgrindBaseSettings::suppressionFilesRemoved,
                  this, &ValgrindConfigWidget::slotSuppressionsRemoved);
          connect(&s, &ValgrindBaseSettings::suppressionFilesAdded,
                  this, &ValgrindConfigWidget::slotSuppressionsAdded);
      
          connect(suppressionList->selectionModel(), &QItemSelectionModel::selectionChanged,
                  this, &ValgrindConfigWidget::slotSuppressionSelectionChanged);
      
          slotSuppressionSelectionChanged();
      }
      

      to define the layout of the attached options page. The "suppressions" bits are not aspectified yet. "Span" is not nice, yet.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hjk hjk
              hjk hjk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes