| 51 | } |
| 52 | |
| 53 | void ScriptAppConfigPage::loadFromConfiguration(const KConfigGroup& cfg, KDevelop::IProject* project ) |
| 54 | { |
| 55 | QSignalBlocker blocker(this); |
| 56 | if( project ) |
| 57 | { |
| 58 | executablePath->setStartDir( project->path().toUrl() ); |
| 59 | } |
| 60 | |
| 61 | auto doc = KDevelop::ICore::self()->documentController()->activeDocument(); |
| 62 | interpreter->lineEdit()->setText( cfg.readEntry( ExecuteScriptPlugin::interpreterEntry, |
| 63 | doc ? interpreterForUrl(doc->url()) : QString() ) ); |
| 64 | executablePath->setUrl( QUrl::fromLocalFile(cfg.readEntry( ExecuteScriptPlugin::executableEntry, QString() )) ); |
| 65 | remoteHostCheckbox->setChecked( cfg.readEntry( ExecuteScriptPlugin::executeOnRemoteHostEntry, false ) ); |
| 66 | remoteHost->setText( cfg.readEntry( ExecuteScriptPlugin::remoteHostEntry, "" ) ); |
| 67 | bool runCurrent = cfg.readEntry( ExecuteScriptPlugin::runCurrentFileEntry, true ); |
| 68 | if ( runCurrent ) { |
| 69 | runCurrentFile->setChecked( true ); |
| 70 | } else { |
| 71 | runFixedFile->setChecked( true ); |
| 72 | } |
| 73 | arguments->setText( cfg.readEntry( ExecuteScriptPlugin::argumentsEntry, "" ) ); |
| 74 | workingDirectory->setUrl( cfg.readEntry( ExecuteScriptPlugin::workingDirEntry, QUrl() ) ); |
| 75 | environment->setCurrentProfile(cfg.readEntry(ExecuteScriptPlugin::environmentProfileEntry, QString())); |
| 76 | outputFilteringMode->setCurrentIndex( cfg.readEntry( ExecuteScriptPlugin::outputFilteringEntry, 2u )); |
| 77 | } |
| 78 | |
| 79 | ScriptAppConfigPage::ScriptAppConfigPage( QWidget* parent ) |
| 80 | : LaunchConfigurationPage( parent ) |
nothing calls this directly
no test coverage detected