From: Milian Wolff Date: Mon, 15 Jun 2015 19:46:28 +0000 (+0200) Subject: Merge location columns. X-Git-Tag: submit/tizen/20180620.112952^2~328^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24ca7076791675cffb44030fcd4b0b4bbb8df9f1;p=sdk%2Ftools%2Fheaptrack.git Merge location columns. --- diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 76f7375..688da1e 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -50,6 +50,10 @@ MainWindow::MainWindow(QWidget* parent) connect(m_model, &Model::dataReady, this, &MainWindow::dataReady); + m_ui->results->hideColumn(Model::FunctionColumn); + m_ui->results->hideColumn(Model::FileColumn); + m_ui->results->hideColumn(Model::ModuleColumn); + connect(m_ui->filterFunction, &QLineEdit::textChanged, proxy, &Proxy::setFunctionFilter); connect(m_ui->filterFile, &QLineEdit::textChanged, diff --git a/gui/model.cpp b/gui/model.cpp index 9a850da..0a5fb39 100644 --- a/gui/model.cpp +++ b/gui/model.cpp @@ -219,6 +219,10 @@ QVariant Model::data(const QModelIndex& index, int role) const return row->location.module; case FileColumn: return row->location.file; + case LocationColumn: + return i18n("%1 in %2 (%3)", row->location.function, + row->location.file.isEmpty() ? QStringLiteral("??") : row->location.file, + row->location.module); case NUM_COLUMNS: break; } diff --git a/gui/model.h b/gui/model.h index d9fc525..f9de093 100644 --- a/gui/model.h +++ b/gui/model.h @@ -81,6 +81,7 @@ public: FunctionColumn, FileColumn, ModuleColumn, + LocationColumn, NUM_COLUMNS };