@@ -195,7 +195,7 @@ void QgsSearchQueryBuilder::btnTest_clicked()
195
195
if ( count == -1 )
196
196
return ;
197
197
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 ) );
199
199
}
200
200
201
201
// This method tests the number of records that would be returned
@@ -204,7 +204,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
204
204
QgsExpression search ( searchString );
205
205
if ( search.hasParserError () )
206
206
{
207
- QMessageBox::critical ( this , tr ( " Search string parsing error " ), search.parserErrorString () );
207
+ QMessageBox::critical ( this , tr ( " Query Result " ), search.parserErrorString () );
208
208
return -1 ;
209
209
}
210
210
@@ -220,7 +220,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
220
220
221
221
if ( !search.prepare ( &context ) )
222
222
{
223
- QMessageBox::critical ( this , tr ( " Evaluation error " ), search.evalErrorString () );
223
+ QMessageBox::critical ( this , tr ( " Query Result " ), search.evalErrorString () );
224
224
return -1 ;
225
225
}
226
226
@@ -237,7 +237,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
237
237
count++;
238
238
}
239
239
240
- // check if there were errors during evaulating
240
+ // check if there were errors during evaluating
241
241
if ( search.hasEvalError () )
242
242
break ;
243
243
}
@@ -246,7 +246,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
246
246
247
247
if ( search.hasEvalError () )
248
248
{
249
- QMessageBox::critical ( this , tr ( " Error during search " ), search.evalErrorString () );
249
+ QMessageBox::critical ( this , tr ( " Query Result " ), search.evalErrorString () );
250
250
return -1 ;
251
251
}
252
252
@@ -271,7 +271,7 @@ void QgsSearchQueryBuilder::btnOk_clicked()
271
271
}
272
272
else if ( numRecs == 0 )
273
273
{
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." ) );
275
275
}
276
276
else
277
277
{
@@ -380,7 +380,7 @@ void QgsSearchQueryBuilder::saveQuery()
380
380
QgsSettings s;
381
381
QString lastQueryFileDir = s.value ( QStringLiteral ( " /UI/lastQueryFileDir" ), QDir::homePath () ).toString ();
382
382
// 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" ) );
384
384
if ( saveFileName.isNull () )
385
385
{
386
386
return ;
@@ -394,7 +394,7 @@ void QgsSearchQueryBuilder::saveQuery()
394
394
QFile saveFile ( saveFileName );
395
395
if ( !saveFile.open ( QIODevice::WriteOnly | QIODevice::Truncate ) )
396
396
{
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. " ) );
398
398
return ;
399
399
}
400
400
@@ -416,7 +416,7 @@ void QgsSearchQueryBuilder::loadQuery()
416
416
QgsSettings s;
417
417
QString lastQueryFileDir = s.value ( QStringLiteral ( " /UI/lastQueryFileDir" ), QDir::homePath () ).toString ();
418
418
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" ) + " (*)" );
420
420
if ( queryFileName.isNull () )
421
421
{
422
422
return ;
@@ -425,20 +425,20 @@ void QgsSearchQueryBuilder::loadQuery()
425
425
QFile queryFile ( queryFileName );
426
426
if ( !queryFile.open ( QIODevice::ReadOnly ) )
427
427
{
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. " ) );
429
429
return ;
430
430
}
431
431
QDomDocument queryDoc;
432
432
if ( !queryDoc.setContent ( &queryFile ) )
433
433
{
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. " ) );
435
435
return ;
436
436
}
437
437
438
438
QDomElement queryElem = queryDoc.firstChildElement ( QStringLiteral ( " Query" ) );
439
439
if ( queryElem.isNull () )
440
440
{
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. " ) );
442
442
return ;
443
443
}
444
444
@@ -448,7 +448,7 @@ void QgsSearchQueryBuilder::loadQuery()
448
448
QgsExpression search ( query );
449
449
if ( search.hasParserError () )
450
450
{
451
- QMessageBox::critical ( this , tr ( " Search string parsing error " ), search.parserErrorString () );
451
+ QMessageBox::critical ( this , tr ( " Query Result " ), search.parserErrorString () );
452
452
return ;
453
453
}
454
454
@@ -476,7 +476,7 @@ void QgsSearchQueryBuilder::loadQuery()
476
476
if ( !mFieldMap.contains( attIt ) )
477
477
{
478
478
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 ),
480
480
existingAttributes, 0, false, &ok );
481
481
if ( !ok || replaceAttribute.isEmpty() )
482
482
{
0 commit comments