diff --git a/firsttimewizard.h b/firsttimewizard.h --- a/firsttimewizard.h +++ b/firsttimewizard.h @@ -64,8 +64,8 @@ QProcess *m_avrdudeProcess; KFormat *m_format; - QString getArduinoPath(); - QString getSketchbookPath(); + void getArduinoPath(); + void getSketchbookPath(); QString downloadAndInstallArduino(); bool validateCurrentPage(); int nextId() const; diff --git a/firsttimewizard.cpp b/firsttimewizard.cpp --- a/firsttimewizard.cpp +++ b/firsttimewizard.cpp @@ -306,8 +306,16 @@ return QWizard::nextId(); } -QString FirstTimeWizard::getArduinoPath() +void FirstTimeWizard::getArduinoPath() { + KConfigGroup settings = ICore::self()->activeSession()->config()->group("Embedded"); + if (settings.hasKey("arduinoFolder")) + { + arduinoPathEdit->setText(settings.readEntry("arduinoFolder")); + existingInstallButton->setChecked(true); + return; + } + // Find Arduino path #ifdef Q_OS_DARWIN #elif defined(Q_OS_WIN32) || defined(Q_OS_WIN64) @@ -330,15 +338,19 @@ qCDebug(FtwIo) << "Valid Arduino path at" << path; arduinoPathEdit->setText(path); existingInstallButton->setChecked(true); - return path; } } qCDebug(FtwIo) << "No valid Arduino path"; - return QString(); } -QString FirstTimeWizard::getSketchbookPath() +void FirstTimeWizard::getSketchbookPath() { + KConfigGroup settings = ICore::self()->activeSession()->config()->group("Embedded"); + if (settings.hasKey("sketchbookFolder")) + { + sketchbookPathEdit->setText(settings.readEntry("sketchbookFolder")); + return; + } // Find Sketchbook path QDir sketchbookPath; #ifdef Q_OS_DARWIN @@ -352,7 +364,7 @@ sketchbookPathEdit->setText(sketchbookPath.absolutePath()); } - return QString(); + return; } void FirstTimeWizard::chooseArduinoPath()