Skip to content
Permalink
Browse files

Fix message box title

  • Loading branch information
DelazJ committed Feb 18, 2018
1 parent 6c64c5a commit 28e282ac02118e252126e959fa500757fc10c0f2
@@ -325,11 +325,11 @@ void QgsPluginRegistry::loadCppPlugin( const QString &fullPathName )

QString baseName = QFileInfo( fullPathName ).baseName();

// first check to see if its already loaded
// first check to see if it's already loaded
if ( isLoaded( baseName ) )
{
// plugin is loaded
// QMessageBox::warning(this, "Already Loaded", description + " is already loaded");
// QMessageBox::warning(this, "Loading Plugins", description + " is already loaded");
return;
}

@@ -399,7 +399,7 @@ void QgsPluginRegistry::loadCppPlugin( const QString &fullPathName )
else
{
// something went wrong
QMessageBox::warning( mQgisInterface->mainWindow(), QObject::tr( "Error Loading Plugin" ),
QMessageBox::warning( mQgisInterface->mainWindow(), QObject::tr( "Loading Plugins" ),
QObject::tr( "There was an error loading a plugin. "
"The following diagnostic information may help the QGIS developers resolve the issue:\n%1." )
.arg( myError ) );
@@ -149,7 +149,7 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
//check we are not embedding from/to the same project
if ( mProjectFileLineEdit->isVisible() && mProjectFileLineEdit->text() == QgsProject::instance()->fileName() )
{
QMessageBox::critical( nullptr, tr( "Recursive embedding not possible" ), tr( "It is not possible to embed layers / groups from the current project." ) );
QMessageBox::critical( nullptr, tr( "Embed Layers and Groups" ), tr( "Recursive embedding is not allowed. It is not possible to embed layers / groups from the current project." ) );
return;
}

@@ -2028,7 +2028,7 @@ void QgsProjectProperties::scaleItemChanged( QListWidgetItem *changedScaleItem )
}
else
{
QMessageBox::warning( this, tr( "Invalid scale" ), tr( "The text you entered is not a valid scale." ) );
QMessageBox::warning( this, tr( "Set Scale" ), tr( "The text you entered is not a valid scale." ) );
changedScaleItem->setText( changedScaleItem->data( Qt::UserRole ).toString() );
}

@@ -1113,28 +1113,28 @@ void QgsRasterLayerProperties::buttonBuildPyramids_clicked()
}
else if ( res == QLatin1String( "ERROR_WRITE_ACCESS" ) )
{
QMessageBox::warning( this, tr( "Write access denied" ),
QMessageBox::warning( this, tr( "Building Pyramids" ),
tr( "Write access denied. Adjust the file permissions and try again." ) );
}
else if ( res == QLatin1String( "ERROR_WRITE_FORMAT" ) )
{
QMessageBox::warning( this, tr( "Building pyramids failed." ),
QMessageBox::warning( this, tr( "Building Pyramids" ),
tr( "The file was not writable. Some formats do not "
"support pyramid overviews. Consult the GDAL documentation if in doubt." ) );
}
else if ( res == QLatin1String( "FAILED_NOT_SUPPORTED" ) )
{
QMessageBox::warning( this, tr( "Building pyramids failed." ),
QMessageBox::warning( this, tr( "Building Pyramids" ),
tr( "Building pyramid overviews is not supported on this type of raster." ) );
}
else if ( res == QLatin1String( "ERROR_JPEG_COMPRESSION" ) )
{
QMessageBox::warning( this, tr( "Building pyramids failed." ),
QMessageBox::warning( this, tr( "Building Pyramids" ),
tr( "Building internal pyramid overviews is not supported on raster layers with JPEG compression and your current libtiff library." ) );
}
else if ( res == QLatin1String( "ERROR_VIRTUAL" ) )
{
QMessageBox::warning( this, tr( "Building pyramids failed." ),
QMessageBox::warning( this, tr( "Building Pyramids" ),
tr( "Building pyramid overviews is not supported on this type of raster." ) );
}

@@ -1352,7 +1352,7 @@ void QgsRasterLayerProperties::pbnExportTransparentPixelValues_clicked()
{
QgsSettings myQSettings;
QString myLastDir = myQSettings.value( QStringLiteral( "lastRasterFileFilterDir" ), QDir::homePath() ).toString();
QString myFileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
QString myFileName = QFileDialog::getSaveFileName( this, tr( "Save File" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
if ( !myFileName.isEmpty() )
{
if ( !myFileName.endsWith( QLatin1String( ".txt" ), Qt::CaseInsensitive ) )
@@ -1390,7 +1390,7 @@ void QgsRasterLayerProperties::pbnExportTransparentPixelValues_clicked()
}
else
{
QMessageBox::warning( this, tr( "Write access denied" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
QMessageBox::warning( this, tr( "Export Transparent Pixels" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
}
}
}
@@ -1609,12 +1609,12 @@ void QgsRasterLayerProperties::pbnImportTransparentPixelValues_clicked()

if ( myImportError )
{
QMessageBox::warning( this, tr( "Import Error" ), tr( "The following lines contained errors\n\n%1" ).arg( myBadLines ) );
QMessageBox::warning( this, tr( "Import Transparent Pixels" ), tr( "The following lines contained errors\n\n%1" ).arg( myBadLines ) );
}
}
else if ( !myFileName.isEmpty() )
{
QMessageBox::warning( this, tr( "Read access denied" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) );
QMessageBox::warning( this, tr( "Import Transparent Pixels" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) );
}
tableTransparency->resizeColumnsToContents();
tableTransparency->resizeRowsToContents();
@@ -1837,7 +1837,7 @@ void QgsRasterLayerProperties::loadStyle_clicked()
}
else
{
QMessageBox::information( this, tr( "Saved Style" ), message );
QMessageBox::information( this, tr( "Save Style" ), message );
}
}

@@ -1866,7 +1866,7 @@ void QgsRasterLayerProperties::saveStyleAs_clicked()
if ( defaultLoadedFlag )
settings.setValue( QStringLiteral( "style/lastStyleDir" ), QFileInfo( outputFileName ).absolutePath() );
else
QMessageBox::information( this, tr( "Saved Style" ), message );
QMessageBox::information( this, tr( "Save Style" ), message );
}

void QgsRasterLayerProperties::restoreWindowModality()
@@ -1923,7 +1923,7 @@ void QgsRasterLayerProperties::saveMetadataAs()
QgsSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( QStringLiteral( "style/lastStyleDir" ), QDir::homePath() ).toString();

QString myOutputFileName = QFileDialog::getSaveFileName( this, tr( "Save layer metadata as QMD" ),
QString myOutputFileName = QFileDialog::getSaveFileName( this, tr( "Save Layer Metadata as QMD" ),
myLastUsedDir, tr( "QMD File" ) + " (*.qmd)" );
if ( myOutputFileName.isNull() ) //dialog canceled
{
@@ -1943,7 +1943,7 @@ void QgsRasterLayerProperties::saveMetadataAs()
if ( defaultLoadedFlag )
myQSettings.setValue( QStringLiteral( "style/lastStyleDir" ), QFileInfo( myOutputFileName ).absolutePath() );
else
QMessageBox::information( this, tr( "Saved Metadata" ), message );
QMessageBox::information( this, tr( "Save Metadata" ), message );
}

void QgsRasterLayerProperties::saveDefaultMetadata()
@@ -644,15 +644,15 @@ void QgsLabelingRulePropsWidget::testFilter()
QgsExpression filter( editFilter->text() );
if ( filter.hasParserError() )
{
QMessageBox::critical( this, tr( "Error" ), tr( "Filter expression parsing error:\n" ) + filter.parserErrorString() );
QMessageBox::critical( this, tr( "Test Filter" ), tr( "Filter expression parsing error:\n" ) + filter.parserErrorString() );
return;
}

QgsExpressionContext context( _globalProjectAtlasMapLayerScopes( mMapCanvas, mLayer ) );

if ( !filter.prepare( &context ) )
{
QMessageBox::critical( this, tr( "Evaluation error" ), filter.evalErrorString() );
QMessageBox::critical( this, tr( "Test Filter" ), filter.evalErrorString() );
return;
}

@@ -675,7 +675,7 @@ void QgsLabelingRulePropsWidget::testFilter()

QApplication::restoreOverrideCursor();

QMessageBox::information( this, tr( "Filter" ), tr( "Filter returned %n feature(s)", "number of filtered features", count ) );
QMessageBox::information( this, tr( "Test Filter" ), tr( "Filter returned %n feature(s)", "number of filtered features", count ) );
}


@@ -69,7 +69,7 @@ void QgsSaveStyleToDbDialog::accept()
{
if ( getName().isEmpty() )
{
QMessageBox::information( this, tr( "Save style in database" ), tr( "A name is mandatory" ) );
QMessageBox::information( this, tr( "Save Style in Database" ), tr( "A name is mandatory." ) );
return;
}
QDialog::accept();
@@ -80,7 +80,7 @@ void QgsSaveStyleToDbDialog::mFilePickButton_clicked()
QgsSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( QStringLiteral( "style/lastStyleDir" ), QDir::homePath() ).toString();

QString myFileName = QFileDialog::getOpenFileName( this, tr( "Attach Qt Designer UI file" ), myLastUsedDir, tr( "Qt Designer UI file .ui" ) + " (*.ui)" );
QString myFileName = QFileDialog::getOpenFileName( this, tr( "Attach Qt Designer UI File" ), myLastUsedDir, tr( "Qt Designer UI file .ui" ) + " (*.ui)" );
if ( myFileName.isNull() )
{
return;
@@ -98,7 +98,7 @@ void QgsSaveStyleToDbDialog::mFilePickButton_clicked()

if ( !doc.setContent( content ) || doc.documentElement().tagName().compare( QLatin1String( "ui" ) ) )
{
QMessageBox::warning( this, tr( "Wrong file" ),
QMessageBox::warning( this, tr( "Attach UI File" ),
tr( "The selected file does not appear to be a valid Qt Designer UI file." ) );
return;
}
@@ -274,7 +274,7 @@ bool QgsSourceFieldsProperties::addAttribute( const QgsField &field )
else
{
mLayer->destroyEditCommand();
QMessageBox::critical( this, tr( "Failed to add field" ), tr( "Failed to add field '%1' of type '%2'. Is the field name unique?" ).arg( field.name(), field.typeName() ) );
QMessageBox::critical( this, tr( "Add Field" ), tr( "Failed to add field '%1' of type '%2'. Is the field name unique?" ).arg( field.name(), field.typeName() ) );
return false;
}
}
@@ -387,7 +387,7 @@ void QgsSourceFieldsProperties::attributesListCellChanged( int row, int column )
else
{
mLayer->destroyEditCommand();
QMessageBox::critical( this, tr( "Failed to rename field" ), tr( "Failed to rename field to '%1'. Is the field name unique?" ).arg( nameItem->text() ) );
QMessageBox::critical( this, tr( "Rename Field" ), tr( "Failed to rename field to '%1'. Is the field name unique?" ).arg( nameItem->text() ) );
}
}
}
@@ -744,7 +744,7 @@ void QgsVectorLayerProperties::apply()
}
if ( ! mLayer->setDependencies( deps ) )
{
QMessageBox::warning( nullptr, tr( "Dependency cycle" ), tr( "This configuration introduces a cycle in data dependencies and will be ignored" ) );
QMessageBox::warning( nullptr, tr( "Save Dependency" ), tr( "This configuration introduces a cycle in data dependencies and will be ignored." ) );
}

#ifdef HAVE_3D
@@ -882,7 +882,7 @@ void QgsVectorLayerProperties::loadDefaultStyle_clicked()
if ( msg.compare( tr( "Loaded from Provider" ) ) )
{
QMessageBox::information( this, tr( "Default Style" ),
tr( "No default style was found for this layer" ) );
tr( "No default style was found for this layer." ) );
}
else
{
@@ -953,7 +953,7 @@ void QgsVectorLayerProperties::loadStyle_clicked()
QgsSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( QStringLiteral( "style/lastStyleDir" ), QDir::homePath() ).toString();

QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load layer properties from style file" ), myLastUsedDir,
QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load Layer Properties from Style File" ), myLastUsedDir,
tr( "QGIS Layer Style File" ) + " (*.qml);;" + tr( "SLD File" ) + " (*.sld)" );
if ( myFileName.isNull() )
{
@@ -1003,7 +1003,7 @@ void QgsVectorLayerProperties::loadMetadata()
QgsSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( QStringLiteral( "style/lastStyleDir" ), QDir::homePath() ).toString();

QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load layer metadata from metadata file" ), myLastUsedDir,
QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load Layer Metadata from Metadata File" ), myLastUsedDir,
tr( "QGIS Layer Metadata File" ) + " (*.qmd)" );
if ( myFileName.isNull() )
{
@@ -1037,7 +1037,7 @@ void QgsVectorLayerProperties::saveMetadataAs()
QgsSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( QStringLiteral( "style/lastStyleDir" ), QDir::homePath() ).toString();

QString myOutputFileName = QFileDialog::getSaveFileName( this, tr( "Save layer metadata as QMD" ),
QString myOutputFileName = QFileDialog::getSaveFileName( this, tr( "Save Layer Metadata as QMD" ),
myLastUsedDir, tr( "QMD File" ) + " (*.qmd)" );
if ( myOutputFileName.isNull() ) //dialog canceled
{
@@ -1064,7 +1064,7 @@ void QgsVectorLayerProperties::saveMetadataAs()
else
{
//let the user know what went wrong
QMessageBox::information( this, tr( "Saved Metadata" ), myMessage );
QMessageBox::information( this, tr( "Save Metadata" ), myMessage );
}

QFileInfo myFI( myOutputFileName );
@@ -1166,7 +1166,7 @@ void QgsVectorLayerProperties::saveStyleAs( StyleType styleType )
extension = QgsMapLayer::extensionPropertyType( QgsMapLayer::Style );
}

QString myOutputFileName = QFileDialog::getSaveFileName( this, tr( "Save layer properties as style file" ),
QString myOutputFileName = QFileDialog::getSaveFileName( this, tr( "Save Layer Properties as Style File" ),
myLastUsedDir, format );
if ( myOutputFileName.isNull() ) //dialog canceled
{
@@ -1202,7 +1202,7 @@ void QgsVectorLayerProperties::saveStyleAs( StyleType styleType )
else
{
//let the user know what went wrong
QMessageBox::information( this, tr( "Saved Style" ), myMessage );
QMessageBox::information( this, tr( "Save Style" ), myMessage );
}

QFileInfo myFI( myOutputFileName );
@@ -1272,7 +1272,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
int sectionLimit = mLayer->listStylesInDatabase( ids, names, descriptions, errorMsg );
if ( !errorMsg.isNull() )
{
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ), errorMsg );
QMessageBox::warning( this, tr( "Load Styles from Database" ), errorMsg );
return;
}

@@ -1287,7 +1287,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
QString qmlStyle = mLayer->getStyleFromDatabase( selectedStyleId, errorMsg );
if ( !errorMsg.isNull() )
{
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ), errorMsg );
QMessageBox::warning( this, tr( "Load Styles from Database" ), errorMsg );
return;
}

@@ -1300,7 +1300,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
}
else
{
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ),
QMessageBox::warning( this, tr( "Load Styles from Database" ),
tr( "The retrieved style is not a valid named style. Error message: %1" )
.arg( errorMsg ) );
}
@@ -830,7 +830,7 @@ bool QgsProject::readProjectFile( const QString &filename )
{
// want to make this class as GUI independent as possible; so commented out
#if 0
QMessageBox::critical( 0, tr( "Project File Read Error" ),
QMessageBox::critical( 0, tr( "Read Project File" ),
tr( "%1 at line %2 column %3" ).arg( errorMsg ).arg( line ).arg( column ) );
#endif

@@ -746,28 +746,28 @@ void QgsRasterFileWriter::buildPyramids( const QString &filename )
QString title, message;
if ( res == QLatin1String( "ERROR_WRITE_ACCESS" ) )
{
title = QObject::tr( "Building pyramids failed - write access denied" );
title = QObject::tr( "Building Pyramids" );
message = QObject::tr( "Write access denied. Adjust the file permissions and try again." );
}
else if ( res == QLatin1String( "ERROR_WRITE_FORMAT" ) )
{
title = QObject::tr( "Building pyramids failed." );
title = QObject::tr( "Building Pyramids" );
message = QObject::tr( "The file was not writable. Some formats do not "
"support pyramid overviews. Consult the GDAL documentation if in doubt." );
}
else if ( res == QLatin1String( "FAILED_NOT_SUPPORTED" ) )
{
title = QObject::tr( "Building pyramids failed." );
title = QObject::tr( "Building Pyramids" );
message = QObject::tr( "Building pyramid overviews is not supported on this type of raster." );
}
else if ( res == QLatin1String( "ERROR_JPEG_COMPRESSION" ) )
{
title = QObject::tr( "Building pyramids failed." );
title = QObject::tr( "Building Pyramids" );
message = QObject::tr( "Building internal pyramid overviews is not supported on raster layers with JPEG compression and your current libtiff library." );
}
else if ( res == QLatin1String( "ERROR_VIRTUAL" ) )
{
title = QObject::tr( "Building pyramids failed." );
title = QObject::tr( "Building Pyramids" );
message = QObject::tr( "Building pyramid overviews is not supported on this type of raster." );
}
QMessageBox::warning( nullptr, title, message );
@@ -487,7 +487,7 @@ void QgsDualView::previewColumnChanged( QAction *previewAction, const QString &e
if ( !mFeatureList->setDisplayExpression( QStringLiteral( "COALESCE( \"%1\", '<NULL>' )" ).arg( expression ) ) )
{
QMessageBox::warning( this,
tr( "Could not set preview column" ),
tr( "Column Preview" ),
tr( "Could not set column '%1' as preview column.\nParser error:\n%2" )
.arg( previewAction->text(), mFeatureList->parserErrorString() )
);
@@ -265,7 +265,7 @@ QString QgsAuthGuiUtils::getOpenFileName( QWidget *parent, const QString &title,
void QgsAuthGuiUtils::passwordHelperDelete( QgsMessageBar *msgbar, int timeout, QWidget *parent )
{
if ( QMessageBox::warning( parent,
QObject::tr( "Delete confirmation" ),
QObject::tr( "Delete Password" ),
QObject::tr( "Do you really want to delete the master password from your %1?" )
.arg( QgsAuthManager::AUTH_PASSWORD_HELPER_DISPLAY_NAME ),
QMessageBox::Ok | QMessageBox::Cancel,
@@ -316,9 +316,9 @@ void QgsAuthServersEditor::btnRemoveServer_clicked()
}

if ( QMessageBox::warning(
this, tr( "Remove SSL Custom Config" ),
this, tr( "Remove SSL Custom Configuration" ),
tr( "Are you sure you want to remove the selected "
"SSL custom config from the database?\n\n"
"SSL custom configuration from the database?\n\n"
"Operation can NOT be undone!" ),
QMessageBox::Ok | QMessageBox::Cancel,
QMessageBox::Cancel ) == QMessageBox::Cancel )

0 comments on commit 28e282a

Please sign in to comment.
You can’t perform that action at this time.