@@ -82,7 +82,7 @@ TraceDialog::TraceDialog(ApplicationController &controller, QWidget *parent) :
8282 m_app_type_label = new QLabel (tr (" Application Type:" ));
8383 m_gfxr_capture_file_on_device_directory_label = new QLabel (
8484 tr (" On Device GFXR Capture File Directory Name:" ));
85- m_gfxr_capture_file_local_directory_label = new QLabel (tr (" Local GFXR Capture Save Location:" ));
85+ QLabel *capture_file_local_directory_label = new QLabel (tr (" Local Capture Save Location:" ));
8686
8787 m_dev_model = new QStandardItemModel ();
8888 m_pkg_model = new QStandardItemModel ();
@@ -209,16 +209,12 @@ TraceDialog::TraceDialog(ApplicationController &controller, QWidget *parent) :
209209 m_gfxr_capture_file_on_device_directory_label->hide ();
210210 m_gfxr_capture_file_directory_input_box->hide ();
211211
212- m_gfxr_capture_file_local_directory_layout = new QHBoxLayout ();
213- m_gfxr_capture_file_local_directory_input_box = new QLineEdit ();
214- m_gfxr_capture_file_local_directory_input_box ->setPlaceholderText (
212+ QHBoxLayout *capture_file_local_directory_layout = new QHBoxLayout ();
213+ m_capture_file_local_directory_input_box = new QLineEdit ();
214+ m_capture_file_local_directory_input_box ->setPlaceholderText (
215215 " Input the location to save the directory to" );
216- m_gfxr_capture_file_local_directory_layout->addWidget (
217- m_gfxr_capture_file_local_directory_label);
218- m_gfxr_capture_file_local_directory_layout->addWidget (
219- m_gfxr_capture_file_local_directory_input_box);
220- m_gfxr_capture_file_local_directory_label->hide ();
221- m_gfxr_capture_file_local_directory_input_box->hide ();
216+ capture_file_local_directory_layout->addWidget (capture_file_local_directory_label);
217+ capture_file_local_directory_layout->addWidget (m_capture_file_local_directory_input_box);
222218
223219 m_button_layout->addWidget (m_run_button);
224220 m_button_layout->addWidget (m_capture_button);
@@ -231,7 +227,7 @@ TraceDialog::TraceDialog(ApplicationController &controller, QWidget *parent) :
231227 m_main_layout->addLayout (m_capture_warning_layout);
232228 m_main_layout->addLayout (m_pkg_layout);
233229 m_main_layout->addLayout (m_gfxr_capture_file_directory_layout);
234- m_main_layout->addLayout (m_gfxr_capture_file_local_directory_layout );
230+ m_main_layout->addLayout (capture_file_local_directory_layout );
235231 m_main_layout->addLayout (m_args_layout);
236232
237233 m_main_layout->addLayout (m_type_layout);
@@ -714,6 +710,20 @@ void TraceDialog::OnTraceClicked()
714710 progress_bar->setAutoClose (true );
715711 progress_bar->setMinimumDuration (0 );
716712 CaptureWorker *workerThread = new CaptureWorker (progress_bar);
713+
714+ if (m_capture_file_local_directory_input_box->text () == " " )
715+ {
716+ #if defined(__APPLE__)
717+ m_capture_file_local_directory_input_box->setText (
718+ QDir::homePath () + " /" + QString::fromUtf8 (Dive::kDefaultCaptureFolderName ));
719+ #else
720+ m_capture_file_local_directory_input_box->setText (
721+ " ./" + QString::fromUtf8 (Dive::kDefaultCaptureFolderName ));
722+ #endif
723+ }
724+
725+ workerThread->SetTargetCaptureDir (
726+ m_capture_file_local_directory_input_box->text ().toStdString ());
717727 connect (workerThread, &CaptureWorker::CaptureAvailable, this , &TraceDialog::OnTraceAvailable);
718728 connect (workerThread, &CaptureWorker::finished, workerThread, &QObject::deleteLater);
719729 connect (workerThread, &CaptureWorker::ErrorMessage, this , &TraceDialog::ShowErrorMessage);
@@ -903,13 +913,13 @@ void TraceDialog::RetrieveGfxrCapture()
903913 return ;
904914 }
905915
906- if (m_gfxr_capture_file_local_directory_input_box ->text () == " " )
916+ if (m_capture_file_local_directory_input_box ->text () == " " )
907917 {
908918#if defined(__APPLE__)
909- m_gfxr_capture_file_local_directory_input_box ->setText (
919+ m_capture_file_local_directory_input_box ->setText (
910920 QDir::homePath () + " /" + QString::fromUtf8 (Dive::kDefaultCaptureFolderName ));
911921#else
912- m_gfxr_capture_file_local_directory_input_box ->setText (
922+ m_capture_file_local_directory_input_box ->setText (
913923 " ./" + QString::fromUtf8 (Dive::kDefaultCaptureFolderName ));
914924#endif
915925 }
@@ -935,7 +945,7 @@ void TraceDialog::RetrieveGfxrCapture()
935945 workerThread->SetGfxrSourceCaptureDir (on_device_capture_file_directory);
936946
937947 workerThread->SetTargetCaptureDir (
938- m_gfxr_capture_file_local_directory_input_box ->text ().toStdString ());
948+ m_capture_file_local_directory_input_box ->text ().toStdString ());
939949
940950 connect (workerThread,
941951 &GfxrCaptureWorker::CaptureAvailable,
0 commit comments