Changeset View
Changeset View
Standalone View
Standalone View
plugins/grepview/grepviewplugin.cpp
Context not available. | |||||
163 | void GrepViewPlugin::showDialog(bool setLastUsed, QString pattern, bool show) | 163 | void GrepViewPlugin::showDialog(bool setLastUsed, QString pattern, bool show) | ||
---|---|---|---|---|---|
164 | { | 164 | { | ||
165 | GrepDialog* dlg = new GrepDialog( this, core()->uiController()->activeMainWindow() ); | 165 | GrepDialog* dlg = new GrepDialog( this, core()->uiController()->activeMainWindow() ); | ||
166 | GrepJobSettings dlgSettings = dlg->settings(); | ||||
166 | KDevelop::IDocument* doc = core()->documentController()->activeDocument(); | 167 | KDevelop::IDocument* doc = core()->documentController()->activeDocument(); | ||
167 | 168 | | |||
168 | if(!pattern.isEmpty()) | 169 | if(!pattern.isEmpty()) | ||
169 | { | 170 | { | ||
170 | dlg->setPattern(pattern); | 171 | dlgSettings.pattern = pattern; | ||
172 | dlg->setSettings(dlgSettings); | ||||
171 | } | 173 | } | ||
172 | else if(!setLastUsed) | 174 | else if(!setLastUsed) | ||
173 | { | 175 | { | ||
174 | QString pattern = patternFromSelection(doc); | 176 | QString pattern = patternFromSelection(doc); | ||
175 | if (!pattern.isEmpty()) { | 177 | if (!pattern.isEmpty()) { | ||
176 | dlg->setPattern( pattern ); | 178 | dlgSettings.pattern = pattern; | ||
179 | dlg->setSettings(dlgSettings); | ||||
177 | } | 180 | } | ||
178 | } | 181 | } | ||
179 | 182 | | |||
Context not available. |