Skip to content

Commit e6a5743

Browse files
committed
Fix message boxes titles
1 parent 66b9b43 commit e6a5743

8 files changed

+109
-109
lines changed

src/analysis/interpolation/DualEdgeTriangulation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2796,7 +2796,7 @@ bool DualEdgeTriangulation::saveToTAFF( QString filename ) const
27962796
QFile outputfile( filename );
27972797
if ( !outputfile.open( IO_WriteOnly ) )
27982798
{
2799-
QMessageBox::warning( 0, "warning", "File could not be written", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );
2799+
QMessageBox::warning( 0, tr( "Warning" ), tr( "File could not be written." ), QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );
28002800
return false;
28012801
}
28022802

src/app/3d/qgspoint3dsymbolwidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void QgsPoint3DSymbolWidget::onChooseModelClicked( bool )
7474
QFileInfo fileInfo( filePath );
7575
if ( !fileInfo.exists() || !fileInfo.isReadable() )
7676
{
77-
QMessageBox::critical( nullptr, tr( "Invalid file" ), tr( "Error, file does not exist or is not readable" ) );
77+
QMessageBox::critical( nullptr, tr( "Invalid File" ), tr( "Error, file does not exist or is not readable." ) );
7878
return;
7979
}
8080

src/app/gps/qgsgpsinformationwidget.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -788,15 +788,15 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
788788
//lines: bail out if there are not at least two vertices
789789
if ( layerWKBType == QgsWkbTypes::LineString && mCaptureList.size() < 2 )
790790
{
791-
QMessageBox::information( nullptr, tr( "Not enough vertices" ),
791+
QMessageBox::information( nullptr, tr( "Add Feature" ),
792792
tr( "Cannot close a line feature until it has at least two vertices." ) );
793793
return;
794794
}
795795

796796
//polygons: bail out if there are not at least three vertices
797797
if ( layerWKBType == QgsWkbTypes::Polygon && mCaptureList.size() < 3 )
798798
{
799-
QMessageBox::information( nullptr, tr( "Not enough vertices" ),
799+
QMessageBox::information( nullptr, tr( "Add Feature" ),
800800
tr( "Cannot close a polygon feature until it has at least three vertices." ) );
801801
return;
802802
}
@@ -833,7 +833,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
833833
if ( !vlayer->commitChanges() ) //assumed to be vector layer and is editable and is in editing mode (preconditions have been tested)
834834
{
835835
QMessageBox::information( this,
836-
tr( "Error" ),
836+
tr( "Save Layer Edits" ),
837837
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
838838
.arg( vlayer->name(),
839839
vlayer->commitErrors().join( QStringLiteral( "\n " ) ) ) );
@@ -911,14 +911,14 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
911911
else if ( avoidIntersectionsReturn == 2 )
912912
{
913913
//bail out...
914-
QMessageBox::critical( nullptr, tr( "Error" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type" ) );
914+
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type." ) );
915915
delete f;
916916
connectGpsSlot();
917917
return;
918918
}
919919
else if ( avoidIntersectionsReturn == 3 )
920920
{
921-
QMessageBox::critical( nullptr, tr( "Error" ), tr( "An error was reported during intersection removal" ) );
921+
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "An error was reported during intersection removal." ) );
922922
delete f;
923923
connectGpsSlot();
924924
return;
@@ -927,7 +927,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
927927
// Should never get here, as preconditions should have removed any that aren't handled
928928
else // layerWKBType == QgsWkbTypes::Polygon - unknown type
929929
{
930-
QMessageBox::critical( nullptr, tr( "Error" ), tr( "Cannot add feature. "
930+
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "Cannot add feature. "
931931
"Unknown WKB type. Choose a different layer and try again." ) );
932932
connectGpsSlot();
933933
delete f;
@@ -942,7 +942,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
942942
if ( !vlayer->commitChanges() ) //swiped... er... appropriated from QgisApp saveEdits()
943943
{
944944
QMessageBox::information( this,
945-
tr( "Error" ),
945+
tr( "Save Layer Edits" ),
946946
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
947947
.arg( vlayer->name(),
948948
vlayer->commitErrors().join( QStringLiteral( "\n " ) ) ) );

0 commit comments

Comments
 (0)