Added to what Greg has done in regards to GC's settings. Fixed a bug regarding where power.zones file was being saved to.

This commit is contained in:
Justin Knotzke
2009-09-10 13:10:34 -04:00
committed by Sean Rhea
parent 243a28bb87
commit 72c40de966
4 changed files with 4 additions and 27 deletions

View File

@@ -93,12 +93,7 @@ void DatePickerDialog::on_btnOK_clicked()
void DatePickerDialog::on_btnBrowse_clicked()
{
//First check to see if the Library folder exists where the executable is (for USB sticks)
QDir home = QDir();
QSettings *settings;
if(!home.exists("Library/GoldenCheetah"))
settings = new QSettings(GC_SETTINGS_CO, GC_SETTINGS_APP);
else
settings = new QSettings(home.absolutePath()+"/gc", QSettings::IniFormat);
boost::shared_ptr<QSettings> settings = GetApplicationSettings();
QVariant lastDirVar = settings->value(GC_SETTINGS_LAST_IMPORT_PATH);
QString lastDir = (lastDirVar != QVariant())