Changeset View
Changeset View
Standalone View
Standalone View
plugins/grepview/tests/test_findreplace.cpp
Context not available. | |||||
162 | 162 | | |||
---|---|---|---|---|---|
163 | GrepJob *job = new GrepJob(this); | 163 | GrepJob *job = new GrepJob(this); | ||
164 | GrepOutputModel *model = new GrepOutputModel(job); | 164 | GrepOutputModel *model = new GrepOutputModel(job); | ||
165 | GrepJobSettings settings; | ||||
165 | 166 | | |||
166 | job->setOutputModel(model); | 167 | job->setOutputModel(model); | ||
167 | job->setPatternString(searchPattern); | | |||
168 | job->setTemplateString(searchTemplate); | | |||
169 | job->setReplacementTemplateString(replaceTemplate); | | |||
170 | job->setFilesString(QStringLiteral("*")); | | |||
171 | job->setExcludeString(QString()); | | |||
172 | job->setDirectoryChoice(QList<QUrl>() << QUrl::fromLocalFile(dir.path())); | 168 | job->setDirectoryChoice(QList<QUrl>() << QUrl::fromLocalFile(dir.path())); | ||
173 | job->setDepth(-1); // fully recursive | 169 | | ||
174 | job->setRegexpFlag(true); | 170 | settings.projectFilesOnly = false; | ||
175 | job->setCaseSensitive(true); | 171 | settings.caseSensitive = true; | ||
176 | job->setProjectFilesFlag(false); | 172 | settings.regexp = true; | ||
173 | settings.depth = -1; // fully recursive | ||||
174 | settings.pattern = searchPattern; | ||||
175 | settings.searchTemplate = searchTemplate; | ||||
176 | settings.replacementTemplate = replaceTemplate; | ||||
177 | settings.files = QStringLiteral("*"); | ||||
178 | settings.exclude = QString(); | ||||
179 | | ||||
180 | job->setSettings(settings); | ||||
181 | | ||||
177 | QVERIFY(job->exec()); | 182 | QVERIFY(job->exec()); | ||
178 | 183 | | |||
179 | QVERIFY(model->hasResults()); | 184 | QVERIFY(model->hasResults()); | ||
Context not available. |