Skip to content

Commit

Permalink
Merge pull request #6329 from DelazJ/QMessageBoxTitles
Browse files Browse the repository at this point in the history
Fix some message boxes titles
  • Loading branch information
jef-n committed Feb 17, 2018
2 parents dedfb5c + b3b17b6 commit 030714c
Show file tree
Hide file tree
Showing 20 changed files with 141 additions and 141 deletions.
2 changes: 1 addition & 1 deletion src/analysis/interpolation/DualEdgeTriangulation.cpp
Expand Up @@ -2796,7 +2796,7 @@ bool DualEdgeTriangulation::saveToTAFF( QString filename ) const
QFile outputfile( filename );
if ( !outputfile.open( IO_WriteOnly ) )
{
QMessageBox::warning( 0, "warning", "File could not be written", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );
QMessageBox::warning( 0, tr( "Warning" ), tr( "File could not be written." ), QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/3d/qgspoint3dsymbolwidget.cpp
Expand Up @@ -74,7 +74,7 @@ void QgsPoint3DSymbolWidget::onChooseModelClicked( bool )
QFileInfo fileInfo( filePath );
if ( !fileInfo.exists() || !fileInfo.isReadable() )
{
QMessageBox::critical( nullptr, tr( "Invalid file" ), tr( "Error, file does not exist or is not readable" ) );
QMessageBox::critical( nullptr, tr( "Invalid File" ), tr( "Error, file does not exist or is not readable." ) );
return;
}

Expand Down
14 changes: 7 additions & 7 deletions src/app/gps/qgsgpsinformationwidget.cpp
Expand Up @@ -788,15 +788,15 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
//lines: bail out if there are not at least two vertices
if ( layerWKBType == QgsWkbTypes::LineString && mCaptureList.size() < 2 )
{
QMessageBox::information( nullptr, tr( "Not enough vertices" ),
QMessageBox::information( nullptr, tr( "Add Feature" ),
tr( "Cannot close a line feature until it has at least two vertices." ) );
return;
}

//polygons: bail out if there are not at least three vertices
if ( layerWKBType == QgsWkbTypes::Polygon && mCaptureList.size() < 3 )
{
QMessageBox::information( nullptr, tr( "Not enough vertices" ),
QMessageBox::information( nullptr, tr( "Add Feature" ),
tr( "Cannot close a polygon feature until it has at least three vertices." ) );
return;
}
Expand Down Expand Up @@ -833,7 +833,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
if ( !vlayer->commitChanges() ) //assumed to be vector layer and is editable and is in editing mode (preconditions have been tested)
{
QMessageBox::information( this,
tr( "Error" ),
tr( "Save Layer Edits" ),
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
.arg( vlayer->name(),
vlayer->commitErrors().join( QStringLiteral( "\n " ) ) ) );
Expand Down Expand Up @@ -911,14 +911,14 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
else if ( avoidIntersectionsReturn == 2 )
{
//bail out...
QMessageBox::critical( nullptr, tr( "Error" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type" ) );
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "The feature could not be added because removing the polygon intersections would change the geometry type." ) );
delete f;
connectGpsSlot();
return;
}
else if ( avoidIntersectionsReturn == 3 )
{
QMessageBox::critical( nullptr, tr( "Error" ), tr( "An error was reported during intersection removal" ) );
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "An error was reported during intersection removal." ) );
delete f;
connectGpsSlot();
return;
Expand All @@ -927,7 +927,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
// Should never get here, as preconditions should have removed any that aren't handled
else // layerWKBType == QgsWkbTypes::Polygon - unknown type
{
QMessageBox::critical( nullptr, tr( "Error" ), tr( "Cannot add feature. "
QMessageBox::critical( nullptr, tr( "Add Feature" ), tr( "Cannot add feature. "
"Unknown WKB type. Choose a different layer and try again." ) );
connectGpsSlot();
delete f;
Expand All @@ -942,7 +942,7 @@ void QgsGpsInformationWidget::mBtnCloseFeature_clicked()
if ( !vlayer->commitChanges() ) //swiped... er... appropriated from QgisApp saveEdits()
{
QMessageBox::information( this,
tr( "Error" ),
tr( "Save Layer Edits" ),
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
.arg( vlayer->name(),
vlayer->commitErrors().join( QStringLiteral( "\n " ) ) ) );
Expand Down

0 comments on commit 030714c

Please sign in to comment.