|
From: <sv...@va...> - 2011-06-24 09:07:04
|
Author: cerion
Date: 2011-06-24 10:02:14 +0100 (Fri, 24 Jun 2011)
New Revision: 528
Log:
Rem previous dir when opening a logfile.
- bug #250093 may have been referring to this.
Modified:
trunk/src/toolview/helgrindview.cpp
trunk/src/toolview/memcheckview.cpp
Modified: trunk/src/toolview/helgrindview.cpp
===================================================================
--- trunk/src/toolview/helgrindview.cpp 2011-06-23 18:48:46 UTC (rev 527)
+++ trunk/src/toolview/helgrindview.cpp 2011-06-24 09:02:14 UTC (rev 528)
@@ -121,21 +121,27 @@
/*!
Parse and load an xml logfile.
+
+ TODO: fix. This starts a new 'run', so we should
+ trigger vk's "check last run over" before anything else...
*/
void HelgrindView::openLogFile()
{
// cerr << "HelgrindView::openLogFile()" << endl;
+ QString last_file = vkCfgProj->value( "valkyrie/view-log" ).toString();
+ if ( last_file.isEmpty() ) last_file = "./";
+
QString captn = "Select Log File";
QString filt = "XML Files (*.xml);;Log Files (*.log.*);;All Files (*)";
- QString log_file = QFileDialog::getOpenFileName( this, captn, "./", filt );
+ QString log_file = QFileDialog::getOpenFileName( this, captn, last_file, filt );
// user might have clicked Cancel
if ( log_file.isEmpty() ) {
return;
}
- // updates config
+ // updates config (as does cmd line --view-cfg...)
emit logFileChosen( log_file );
// informs tool_object to load the log_file given in config
Modified: trunk/src/toolview/memcheckview.cpp
===================================================================
--- trunk/src/toolview/memcheckview.cpp 2011-06-23 18:48:46 UTC (rev 527)
+++ trunk/src/toolview/memcheckview.cpp 2011-06-24 09:02:14 UTC (rev 528)
@@ -116,23 +116,29 @@
/*!
Parse and load a memcheck xml logfile.
+
+ TODO: fix. This starts a new 'run', so we should
+ trigger vk's "check last run over" before anything else...
*/
void MemcheckView::openLogFile()
{
// cerr << "MemcheckView::openLogFile()" << endl;
+ QString last_file = vkCfgProj->value( "valkyrie/view-log" ).toString();
+ if ( last_file.isEmpty() ) last_file = "./";
+
QString captn = "Select Log File";
QString filt = "XML Files (*.xml);;Log Files (*.log.*);;All Files (*)";
- QString log_file = QFileDialog::getOpenFileName( this, captn, "./", filt );
+ QString log_file = QFileDialog::getOpenFileName( this, captn, last_file, filt );
// user might have clicked Cancel
if ( log_file.isEmpty() ) {
return;
}
- // updates config
+ // updates config (as does cmd line --view-cfg...)
emit logFileChosen( log_file );
-
+
// informs tool_object to load the log_file given in config
emit run( VGTOOL::PROC_PARSE_LOG );
}
|