@@ -195,7 +195,7 @@ void QgsSearchQueryBuilder::btnTest_clicked()
195195 if ( count == -1 )
196196 return ;
197197
198- QMessageBox::information ( this , tr ( " Search results " ), tr ( " Found %n matching feature(s)." , " test result" , count ) );
198+ QMessageBox::information ( this , tr ( " Test Query " ), tr ( " Found %n matching feature(s)." , " test result" , count ) );
199199}
200200
201201// This method tests the number of records that would be returned
@@ -204,7 +204,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
204204 QgsExpression search ( searchString );
205205 if ( search.hasParserError () )
206206 {
207- QMessageBox::critical ( this , tr ( " Search string parsing error " ), search.parserErrorString () );
207+ QMessageBox::critical ( this , tr ( " Query Result " ), search.parserErrorString () );
208208 return -1 ;
209209 }
210210
@@ -220,7 +220,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
220220
221221 if ( !search.prepare ( &context ) )
222222 {
223- QMessageBox::critical ( this , tr ( " Evaluation error " ), search.evalErrorString () );
223+ QMessageBox::critical ( this , tr ( " Query Result " ), search.evalErrorString () );
224224 return -1 ;
225225 }
226226
@@ -237,7 +237,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
237237 count++;
238238 }
239239
240- // check if there were errors during evaulating
240+ // check if there were errors during evaluating
241241 if ( search.hasEvalError () )
242242 break ;
243243 }
@@ -246,7 +246,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
246246
247247 if ( search.hasEvalError () )
248248 {
249- QMessageBox::critical ( this , tr ( " Error during search " ), search.evalErrorString () );
249+ QMessageBox::critical ( this , tr ( " Query Result " ), search.evalErrorString () );
250250 return -1 ;
251251 }
252252
@@ -271,7 +271,7 @@ void QgsSearchQueryBuilder::btnOk_clicked()
271271 }
272272 else if ( numRecs == 0 )
273273 {
274- QMessageBox::warning ( this , tr ( " No Records " ), tr ( " The query you specified results in zero records being returned." ) );
274+ QMessageBox::warning ( this , tr ( " Query Result " ), tr ( " The query you specified results in zero records being returned." ) );
275275 }
276276 else
277277 {
@@ -380,7 +380,7 @@ void QgsSearchQueryBuilder::saveQuery()
380380 QgsSettings s;
381381 QString lastQueryFileDir = s.value ( QStringLiteral ( " /UI/lastQueryFileDir" ), QDir::homePath () ).toString ();
382382 // save as qqt (QGIS query file)
383- QString saveFileName = QFileDialog::getSaveFileName ( nullptr , tr ( " Save query to file " ), lastQueryFileDir, QStringLiteral ( " *.qqf" ) );
383+ QString saveFileName = QFileDialog::getSaveFileName ( nullptr , tr ( " Save Query to File " ), lastQueryFileDir, QStringLiteral ( " *.qqf" ) );
384384 if ( saveFileName.isNull () )
385385 {
386386 return ;
@@ -394,7 +394,7 @@ void QgsSearchQueryBuilder::saveQuery()
394394 QFile saveFile ( saveFileName );
395395 if ( !saveFile.open ( QIODevice::WriteOnly | QIODevice::Truncate ) )
396396 {
397- QMessageBox::critical ( nullptr , tr ( " Error " ), tr ( " Could not open file for writing" ) );
397+ QMessageBox::critical ( nullptr , tr ( " Save Query to File " ), tr ( " Could not open file for writing. " ) );
398398 return ;
399399 }
400400
@@ -416,7 +416,7 @@ void QgsSearchQueryBuilder::loadQuery()
416416 QgsSettings s;
417417 QString lastQueryFileDir = s.value ( QStringLiteral ( " /UI/lastQueryFileDir" ), QDir::homePath () ).toString ();
418418
419- QString queryFileName = QFileDialog::getOpenFileName ( nullptr , tr ( " Load query from file " ), lastQueryFileDir, tr ( " Query files" ) + " (*.qqf);;" + tr ( " All files" ) + " (*)" );
419+ QString queryFileName = QFileDialog::getOpenFileName ( nullptr , tr ( " Load Query from File " ), lastQueryFileDir, tr ( " Query files" ) + " (*.qqf);;" + tr ( " All files" ) + " (*)" );
420420 if ( queryFileName.isNull () )
421421 {
422422 return ;
@@ -425,20 +425,20 @@ void QgsSearchQueryBuilder::loadQuery()
425425 QFile queryFile ( queryFileName );
426426 if ( !queryFile.open ( QIODevice::ReadOnly ) )
427427 {
428- QMessageBox::critical ( nullptr , tr ( " Error " ), tr ( " Could not open file for reading" ) );
428+ QMessageBox::critical ( nullptr , tr ( " Load Query from File " ), tr ( " Could not open file for reading. " ) );
429429 return ;
430430 }
431431 QDomDocument queryDoc;
432432 if ( !queryDoc.setContent ( &queryFile ) )
433433 {
434- QMessageBox::critical ( nullptr , tr ( " Error " ), tr ( " File is not a valid xml document" ) );
434+ QMessageBox::critical ( nullptr , tr ( " Load Query from File " ), tr ( " File is not a valid xml document. " ) );
435435 return ;
436436 }
437437
438438 QDomElement queryElem = queryDoc.firstChildElement ( QStringLiteral ( " Query" ) );
439439 if ( queryElem.isNull () )
440440 {
441- QMessageBox::critical ( nullptr , tr ( " Error " ), tr ( " File is not a valid query document" ) );
441+ QMessageBox::critical ( nullptr , tr ( " Load Query from File " ), tr ( " File is not a valid query document. " ) );
442442 return ;
443443 }
444444
@@ -448,7 +448,7 @@ void QgsSearchQueryBuilder::loadQuery()
448448 QgsExpression search ( query );
449449 if ( search.hasParserError () )
450450 {
451- QMessageBox::critical ( this , tr ( " Search string parsing error " ), search.parserErrorString () );
451+ QMessageBox::critical ( this , tr ( " Query Result " ), search.parserErrorString () );
452452 return ;
453453 }
454454
@@ -476,7 +476,7 @@ void QgsSearchQueryBuilder::loadQuery()
476476 if ( !mFieldMap.contains( attIt ) )
477477 {
478478 bool ok;
479- QString replaceAttribute = QInputDialog::getItem( 0, tr( "Select attribute " ), tr( "There is no attribute '%1' in the current vector layer. Please select an existing attribute" ).arg( *attIt ),
479+ QString replaceAttribute = QInputDialog::getItem( 0, tr( "Select Attribute " ), tr( "There is no attribute '%1' in the current vector layer. Please select an existing attribute. " ).arg( *attIt ),
480480 existingAttributes, 0, false, &ok );
481481 if ( !ok || replaceAttribute.isEmpty() )
482482 {
0 commit comments