Coding-style applied the project.
$ cd util $ ./make_pretty.sh
This commit is contained in:
@@ -42,17 +42,19 @@
|
||||
#include "qmessagebox.h"
|
||||
#include <iostream>
|
||||
|
||||
TraceFileTab::TraceFileTab(QWidget *parent,const QString& path) :
|
||||
TraceFileTab::TraceFileTab(QWidget *parent, const QString &path) :
|
||||
QWidget(parent), ui(new Ui::TraceFileTab), savingChangesToDB(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->path = path;
|
||||
|
||||
std::cout << "Opening new tab for \"" << path.toStdString() << "\"" << std::endl;
|
||||
std::cout << "Opening new tab for \"" << path.toStdString() << "\"" <<
|
||||
std::endl;
|
||||
|
||||
initNavigatorAndItsDependentWidgets(path);
|
||||
setUpFileWatcher(path);
|
||||
ui->fileDescriptionEdit->setPlainText(navigator->GeneralTraceInfo().description);
|
||||
ui->fileDescriptionEdit->setPlainText(
|
||||
navigator->GeneralTraceInfo().description);
|
||||
tracefileChanged();
|
||||
}
|
||||
|
||||
@@ -69,12 +71,13 @@ void TraceFileTab::commitChangesToDB()
|
||||
|
||||
void TraceFileTab::initNavigatorAndItsDependentWidgets(QString path)
|
||||
{
|
||||
navigator = new TraceNavigator(path,this);
|
||||
navigator = new TraceNavigator(path, this);
|
||||
|
||||
ui->traceplot->init(navigator);
|
||||
|
||||
ui->pornoTraceScroller->init(navigator, ui->traceplot);
|
||||
connect(this,SIGNAL(colorGroupingChanged(ColorGrouping)),ui->pornoTraceScroller,SLOT(colorGroupingChanged(ColorGrouping)));
|
||||
connect(this, SIGNAL(colorGroupingChanged(ColorGrouping)),
|
||||
ui->pornoTraceScroller, SLOT(colorGroupingChanged(ColorGrouping)));
|
||||
|
||||
ui->selectedTransactionTree->init(navigator);
|
||||
//ui->debugMessages->init(navigator,ui->traceplot);
|
||||
@@ -84,8 +87,9 @@ void TraceFileTab::initNavigatorAndItsDependentWidgets(QString path)
|
||||
|
||||
void TraceFileTab::setUpFileWatcher(QString path)
|
||||
{
|
||||
fileWatcher = new QFileSystemWatcher(QStringList(path),this);
|
||||
QObject::connect(fileWatcher,SIGNAL(fileChanged(QString)),this,SLOT(tracefileChanged()));
|
||||
fileWatcher = new QFileSystemWatcher(QStringList(path), this);
|
||||
QObject::connect(fileWatcher, SIGNAL(fileChanged(QString)), this,
|
||||
SLOT(tracefileChanged()));
|
||||
}
|
||||
|
||||
void TraceFileTab::tracefileChanged()
|
||||
@@ -100,7 +104,8 @@ void TraceFileTab::tracefileChanged()
|
||||
// was overwritten when running a new test).
|
||||
// The "Save changes to DB" menu must be disabled to avoid saving
|
||||
// changes to a corrupted or inconsistent file.
|
||||
Q_EMIT statusChanged(QString("At least one database has changed on disk "), false);
|
||||
Q_EMIT statusChanged(QString("At least one database has changed on disk "),
|
||||
false);
|
||||
}
|
||||
navigator->refreshData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user