From 5f96b6403c55a31d92fe7f8ebe7a972ca166b175 Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Fri, 10 Jun 2016 23:45:21 +0300 Subject: [PATCH] Remove abs path --- profiler_gui/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/profiler_gui/main.cpp b/profiler_gui/main.cpp index ea4335d..956fd15 100644 --- a/profiler_gui/main.cpp +++ b/profiler_gui/main.cpp @@ -10,8 +10,14 @@ int main(int argc, char **argv) //QFileSystemModel *model = new QFileSystemModel; //model->setRootPath(QDir::currentPath()); + const char* filename = 0; + if(argc > 1 && argv[1]){ + filename = argv[1]; + }else{ + return 255; + } - QFile file("/home/yse/projects/easy_profiler/bin/test.prof"); + QFile file(filename); file.open(QIODevice::ReadOnly); TreeModel model(file.readAll()); file.close();