GUI: Remember user-selected base path.
Remember the base path user selects when opening files from loaded XML report.
This commit is contained in:
parent
b8793b1529
commit
c9d63fa454
|
@ -33,7 +33,6 @@
|
||||||
ResultsTree::ResultsTree(QWidget * parent) :
|
ResultsTree::ResultsTree(QWidget * parent) :
|
||||||
QTreeView(parent),
|
QTreeView(parent),
|
||||||
mContextItem(0),
|
mContextItem(0),
|
||||||
mCheckPath(""),
|
|
||||||
mVisibleErrors(false)
|
mVisibleErrors(false)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < SHOW_NONE; i++)
|
for (int i = 0; i < SHOW_NONE; i++)
|
||||||
|
@ -483,9 +482,17 @@ void ResultsTree::StartApplication(QStandardItem *target, int application)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString dir = AskFileDir(file);
|
QDir checkdir(mCheckPath);
|
||||||
dir += '/';
|
if (checkdir.isAbsolute() && checkdir.exists())
|
||||||
file = dir + file;
|
{
|
||||||
|
file = mCheckPath + "/" + file;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QString dir = AskFileDir(file);
|
||||||
|
dir += '/';
|
||||||
|
file = dir + file;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,6 +538,7 @@ QString ResultsTree::AskFileDir(const QString &file)
|
||||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Directory"),
|
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Directory"),
|
||||||
"",
|
"",
|
||||||
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||||
|
mCheckPath = dir;
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -258,4 +258,5 @@ void ResultsView::ReadErrorsXml(const QString &filename)
|
||||||
ErrorItem item(line);
|
ErrorItem item(line);
|
||||||
mUI.mTree->AddErrorItem(item);
|
mUI.mTree->AddErrorItem(item);
|
||||||
}
|
}
|
||||||
|
mUI.mTree->SetCheckDirectory("");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue