Changeset View
Changeset View
Standalone View
Standalone View
plugins/grepview/grepdialog.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | |||||
115 | { | 115 | { | ||
116 | setAttribute(Qt::WA_DeleteOnClose); | 116 | setAttribute(Qt::WA_DeleteOnClose); | ||
117 | setWindowTitle( i18n("Find/Replace in Files") ); | 117 | setWindowTitle( i18n("Find/Replace in Files") ); | ||
118 | 118 | | |||
119 | setupUi(this); | 119 | setupUi(this); | ||
120 | 120 | | |||
121 | auto searchButton = buttonBox->button(QDialogButtonBox::Ok); | 121 | auto searchButton = buttonBox->button(QDialogButtonBox::Ok); | ||
122 | Q_ASSERT(searchButton); | 122 | Q_ASSERT(searchButton); | ||
123 | searchButton->setText(tr("Search...")); | 123 | searchButton->setText(i18nc("@action:button", "Search...")); | ||
124 | searchButton->setIcon(QIcon::fromTheme(QStringLiteral("edit-find"))); | 124 | searchButton->setIcon(QIcon::fromTheme(QStringLiteral("edit-find"))); | ||
125 | connect(searchButton, &QPushButton::clicked, this, &GrepDialog::startSearch); | 125 | connect(searchButton, &QPushButton::clicked, this, &GrepDialog::startSearch); | ||
126 | connect(buttonBox, &QDialogButtonBox::rejected, this, &GrepDialog::reject); | 126 | connect(buttonBox, &QDialogButtonBox::rejected, this, &GrepDialog::reject); | ||
127 | 127 | | |||
128 | KConfigGroup cg = ICore::self()->activeSession()->config()->group( "GrepDialog" ); | 128 | KConfigGroup cg = ICore::self()->activeSession()->config()->group( "GrepDialog" ); | ||
129 | 129 | | |||
130 | patternCombo->addItems( cg.readEntry("LastSearchItems", QStringList()) ); | 130 | patternCombo->addItems( cg.readEntry("LastSearchItems", QStringList()) ); | ||
131 | patternCombo->setInsertPolicy(QComboBox::InsertAtTop); | 131 | patternCombo->setInsertPolicy(QComboBox::InsertAtTop); | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
179 | 179 | | |||
180 | directorySelector->setIcon(QIcon::fromTheme(QStringLiteral("document-open"))); | 180 | directorySelector->setIcon(QIcon::fromTheme(QStringLiteral("document-open"))); | ||
181 | connect(directorySelector, &QPushButton::clicked, this, &GrepDialog::selectDirectoryDialog ); | 181 | connect(directorySelector, &QPushButton::clicked, this, &GrepDialog::selectDirectoryDialog ); | ||
182 | directoryChanged(directorySelector->text()); | 182 | directoryChanged(directorySelector->text()); | ||
183 | } | 183 | } | ||
184 | 184 | | |||
185 | void GrepDialog::selectDirectoryDialog() | 185 | void GrepDialog::selectDirectoryDialog() | ||
186 | { | 186 | { | ||
187 | const QString dirName = QFileDialog::getExistingDirectory(this, tr("Select directory to search in"), | 187 | const QString dirName = QFileDialog::getExistingDirectory( | ||
188 | this, i18nc("@title:window", "Select directory to search in"), | ||||
188 | searchPaths->lineEdit()->text()); | 189 | searchPaths->lineEdit()->text()); | ||
189 | if (!dirName.isEmpty()) { | 190 | if (!dirName.isEmpty()) { | ||
190 | setSearchLocations(dirName); | 191 | setSearchLocations(dirName); | ||
191 | } | 192 | } | ||
192 | } | 193 | } | ||
193 | 194 | | |||
194 | void GrepDialog::addUrlToMenu(QMenu* menu, const QUrl& url) | 195 | void GrepDialog::addUrlToMenu(QMenu* menu, const QUrl& url) | ||
195 | { | 196 | { | ||
▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines |