mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Use QString::arg multi argument method to avoid extra heap allocations
This commit is contained in:
parent
f50e1a757a
commit
5ed3d1b73f
@ -155,7 +155,7 @@ class QgsField
|
||||
if ( !sipRes )
|
||||
{
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
QString( "Value %1 (%2) could not be converted to field type %3." ).arg( a0->toString() ).arg ( a0->typeName() ).arg( sipCpp->type() ).toUtf8().constData() );
|
||||
QString( "Value %1 (%2) could not be converted to field type %3." ).arg( a0->toString(), a0->typeName() ).arg( sipCpp->type() ).toUtf8().constData() );
|
||||
sipError = sipErrorFail;
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ bool QgsOSMDatabase::prepareStatements()
|
||||
{
|
||||
const char* errMsg = sqlite3_errmsg( mDatabase ); // does not require free
|
||||
mError = QString( "Error preparing SQL command:\n%1\nSQL:\n%2" )
|
||||
.arg( QString::fromUtf8( errMsg ) ).arg( QString::fromUtf8( sql[i] ) );
|
||||
.arg( QString::fromUtf8( errMsg ), QString::fromUtf8( sql[i] ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -348,8 +348,8 @@ bool QgsOSMDatabase::createSpatialTable( const QString& tableName, const QString
|
||||
}
|
||||
|
||||
QString sqlAddGeomColumn = QString( "SELECT AddGeometryColumn(%1, 'geometry', 4326, %2, 'XY')" )
|
||||
.arg( quotedValue( tableName ) )
|
||||
.arg( quotedValue( geometryType ) );
|
||||
.arg( quotedValue( tableName ),
|
||||
quotedValue( geometryType ) );
|
||||
ret = sqlite3_exec( mDatabase, sqlAddGeomColumn.toUtf8().constData(), NULL, NULL, &errMsg );
|
||||
if ( ret != SQLITE_OK )
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ bool QgsOSMXmlImport::createDatabase()
|
||||
if ( sqlite3_exec( mDatabase, sqlInitStatements[i], 0, 0, &errMsg ) != SQLITE_OK )
|
||||
{
|
||||
mError = QString( "Error executing SQL command:\n%1\nSQL:\n%2" )
|
||||
.arg( QString::fromUtf8( errMsg ) ).arg( QString::fromUtf8( sqlInitStatements[i] ) );
|
||||
.arg( QString::fromUtf8( errMsg ), QString::fromUtf8( sqlInitStatements[i] ) );
|
||||
sqlite3_free( errMsg );
|
||||
closeDatabase();
|
||||
return false;
|
||||
@ -201,7 +201,7 @@ bool QgsOSMXmlImport::createDatabase()
|
||||
{
|
||||
const char* errMsg = sqlite3_errmsg( mDatabase ); // does not require free
|
||||
mError = QString( "Error preparing SQL command:\n%1\nSQL:\n%2" )
|
||||
.arg( QString::fromUtf8( errMsg ) ).arg( QString::fromUtf8( sqlInsertStatements[i] ) );
|
||||
.arg( QString::fromUtf8( errMsg ), QString::fromUtf8( sqlInsertStatements[i] ) );
|
||||
closeDatabase();
|
||||
return false;
|
||||
}
|
||||
|
@ -272,9 +272,9 @@ bool QgsAlignRaster::checkInputParameters()
|
||||
mErrorMessage = QString( "Failed to get suggested warp output.\n\n"
|
||||
"File:\n%1\n\n"
|
||||
"Source WKT:\n%2\n\nDestination WKT:\n%3" )
|
||||
.arg( r.inputFilename )
|
||||
.arg( info.mCrsWkt )
|
||||
.arg( mCrsWkt );
|
||||
.arg( r.inputFilename,
|
||||
info.mCrsWkt,
|
||||
mCrsWkt );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -118,8 +118,8 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenamePatternEdit_editingFinished()
|
||||
QMessageBox::warning( this
|
||||
, tr( "Could not evaluate filename pattern" )
|
||||
, tr( "Could not set filename pattern as '%1'.\nParser error:\n%2" )
|
||||
.arg( mAtlasFilenamePatternEdit->text() )
|
||||
.arg( atlasMap->filenamePatternErrorString() )
|
||||
.arg( mAtlasFilenamePatternEdit->text(),
|
||||
atlasMap->filenamePatternErrorString() )
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -149,8 +149,8 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()
|
||||
QMessageBox::warning( this
|
||||
, tr( "Could not evaluate filename pattern" )
|
||||
, tr( "Could not set filename pattern as '%1'.\nParser error:\n%2" )
|
||||
.arg( expression )
|
||||
.arg( atlasMap->filenamePatternErrorString() )
|
||||
.arg( expression,
|
||||
atlasMap->filenamePatternErrorString() )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ void QgsGPSInformationWidget::connectGps()
|
||||
}
|
||||
else if ( mRadGpsd->isChecked() )
|
||||
{
|
||||
port = QString( "%1:%2:%3" ).arg( mGpsdHost->text() ).arg( mGpsdPort->text() ).arg( mGpsdDevice->text() );
|
||||
port = QString( "%1:%2:%3" ).arg( mGpsdHost->text(), mGpsdPort->text(), mGpsdDevice->text() );
|
||||
}
|
||||
else if ( mRadInternal->isChecked() )
|
||||
{
|
||||
@ -847,8 +847,8 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
|
||||
QMessageBox::information( this,
|
||||
tr( "Error" ),
|
||||
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
|
||||
.arg( vlayer->name() )
|
||||
.arg( vlayer->commitErrors().join( "\n " ) ) );
|
||||
.arg( vlayer->name(),
|
||||
vlayer->commitErrors().join( "\n " ) ) );
|
||||
}
|
||||
|
||||
vlayer->startEditing();
|
||||
@ -977,8 +977,8 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
|
||||
QMessageBox::information( this,
|
||||
tr( "Error" ),
|
||||
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
|
||||
.arg( vlayer->name() )
|
||||
.arg( vlayer->commitErrors().join( "\n " ) ) );
|
||||
.arg( vlayer->name(),
|
||||
vlayer->commitErrors().join( "\n " ) ) );
|
||||
}
|
||||
|
||||
vlayer->startEditing();
|
||||
|
@ -947,7 +947,7 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning( "loading of qgis translation failed [%s]", QString( "%1/qgis_%2" ).arg( i18nPath ).arg( myTranslationCode ).toLocal8Bit().constData() );
|
||||
qWarning( "loading of qgis translation failed [%s]", QString( "%1/qgis_%2" ).arg( i18nPath, myTranslationCode ).toLocal8Bit().constData() );
|
||||
}
|
||||
|
||||
/* Translation file for Qt.
|
||||
@ -961,7 +961,7 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning( "loading of qt translation failed [%s]", QString( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ).arg( myTranslationCode ).toLocal8Bit().constData() );
|
||||
qWarning( "loading of qt translation failed [%s]", QString( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ), myTranslationCode ).toLocal8Bit().constData() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ QStringList QgsVectorLayerSaveAsDialog::datasourceOptions() const
|
||||
{
|
||||
QComboBox* cb = mDatasourceOptionsGroupBox->findChild<QComboBox*>( it.key() );
|
||||
if ( cb && !cb->itemData( cb->currentIndex() ).isNull() )
|
||||
options << QString( "%1=%2" ).arg( it.key() ).arg( cb->currentText() );
|
||||
options << QString( "%1=%2" ).arg( it.key(), cb->currentText() );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ QStringList QgsVectorLayerSaveAsDialog::datasourceOptions() const
|
||||
{
|
||||
QLineEdit* le = mDatasourceOptionsGroupBox->findChild<QLineEdit*>( it.key() );
|
||||
if ( le )
|
||||
options << QString( "%1=%2" ).arg( it.key() ).arg( le->text() );
|
||||
options << QString( "%1=%2" ).arg( it.key(), le->text() );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ QStringList QgsVectorLayerSaveAsDialog::datasourceOptions() const
|
||||
{
|
||||
QgsVectorFileWriter::HiddenOption *opt =
|
||||
dynamic_cast<QgsVectorFileWriter::HiddenOption*>( it.value() );
|
||||
options << QString( "%1=%2" ).arg( it.key() ).arg( opt->mValue );
|
||||
options << QString( "%1=%2" ).arg( it.key(), opt->mValue );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -393,14 +393,14 @@ QStringList QgsVectorLayerSaveAsDialog::layerOptions() const
|
||||
case QgsVectorFileWriter::Set:
|
||||
{
|
||||
QComboBox* cb = mLayerOptionsGroupBox->findChild<QComboBox*>( it.key() );
|
||||
options << QString( "%1=%2" ).arg( it.key() ).arg( cb->currentText() );
|
||||
options << QString( "%1=%2" ).arg( it.key(), cb->currentText() );
|
||||
break;
|
||||
}
|
||||
|
||||
case QgsVectorFileWriter::String:
|
||||
{
|
||||
QLineEdit* le = mLayerOptionsGroupBox->findChild<QLineEdit*>( it.key() );
|
||||
options << QString( "%1=%2" ).arg( it.key() ).arg( le->text() );
|
||||
options << QString( "%1=%2" ).arg( it.key(), le->text() );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -408,7 +408,7 @@ QStringList QgsVectorLayerSaveAsDialog::layerOptions() const
|
||||
{
|
||||
QgsVectorFileWriter::HiddenOption *opt =
|
||||
dynamic_cast<QgsVectorFileWriter::HiddenOption*>( it.value() );
|
||||
options << QString( "%1=%2" ).arg( it.key() ).arg( opt->mValue );
|
||||
options << QString( "%1=%2" ).arg( it.key(), opt->mValue );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void QgsOSMExportDialog::updateLayerName()
|
||||
layerType = "polylines";
|
||||
else
|
||||
layerType = "polygons";
|
||||
editLayerName->setText( QString( "%1_%2" ).arg( baseName ).arg( layerType ) );
|
||||
editLayerName->setText( QString( "%1_%2" ).arg( baseName, layerType ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -322,7 +322,7 @@ void QgsPluginManager::getCppPluginsMetadata()
|
||||
|
||||
for ( uint i = 0; i < pluginDir.count(); i++ )
|
||||
{
|
||||
QString lib = QString( "%1/%2" ).arg( myPluginDir ).arg( pluginDir[i] );
|
||||
QString lib = QString( "%1/%2" ).arg( myPluginDir, pluginDir[i] );
|
||||
|
||||
#ifdef TESTLIB
|
||||
// This doesn't work on windows and causes problems with plugins
|
||||
@ -354,7 +354,7 @@ void QgsPluginManager::getCppPluginsMetadata()
|
||||
bool loaded = myLib->load();
|
||||
if ( !loaded )
|
||||
{
|
||||
QgsDebugMsg( QString( "Failed to load: %1 (%2)" ).arg( myLib->fileName() ).arg( myLib->errorString() ) );
|
||||
QgsDebugMsg( QString( "Failed to load: %1 (%2)" ).arg( myLib->fileName(), myLib->errorString() ) );
|
||||
delete myLib;
|
||||
continue;
|
||||
}
|
||||
@ -680,15 +680,15 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
|
||||
QString errorMsg;
|
||||
if ( metadata->value( "error" ) == "incompatible" )
|
||||
{
|
||||
errorMsg = QString( "<b>%1</b><br/>%2" ).arg( tr( "This plugin is incompatible with this version of QGIS" ) ).arg( tr( "Plugin designed for QGIS %1", "compatible QGIS version(s)" ).arg( metadata->value( "error_details" ) ) );
|
||||
errorMsg = QString( "<b>%1</b><br/>%2" ).arg( tr( "This plugin is incompatible with this version of QGIS" ), tr( "Plugin designed for QGIS %1", "compatible QGIS version(s)" ).arg( metadata->value( "error_details" ) ) );
|
||||
}
|
||||
else if ( metadata->value( "error" ) == "dependent" )
|
||||
{
|
||||
errorMsg = QString( "<b>%1:</b><br/>%2" ).arg( tr( "This plugin requires a missing module" ) ).arg( metadata->value( "error_details" ) );
|
||||
errorMsg = QString( "<b>%1:</b><br/>%2" ).arg( tr( "This plugin requires a missing module" ), metadata->value( "error_details" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMsg = QString( "<b>%1</b><br/>%2" ).arg( tr( "This plugin is broken" ) ).arg( metadata->value( "error_details" ) );
|
||||
errorMsg = QString( "<b>%1</b><br/>%2" ).arg( tr( "This plugin is broken" ), metadata->value( "error_details" ) );
|
||||
}
|
||||
html += QString( "<table bgcolor=\"#FFFF88\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
|
||||
" <tr><td width=\"100%\" style=\"color:#CC0000\">%1</td></tr>"
|
||||
@ -780,26 +780,26 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
|
||||
|
||||
if ( ! metadata->value( "category" ).isEmpty() )
|
||||
{
|
||||
html += QString( "%1: %2 <br/>" ).arg( tr( "Category" ) ).arg( metadata->value( "category" ) );
|
||||
html += QString( "%1: %2 <br/>" ).arg( tr( "Category" ), metadata->value( "category" ) );
|
||||
}
|
||||
if ( ! metadata->value( "tags" ).isEmpty() )
|
||||
{
|
||||
html += QString( "%1: %2 <br/>" ).arg( tr( "Tags" ) ).arg( metadata->value( "tags" ) );
|
||||
html += QString( "%1: %2 <br/>" ).arg( tr( "Tags" ), metadata->value( "tags" ) );
|
||||
}
|
||||
if ( ! metadata->value( "homepage" ).isEmpty() || ! metadata->value( "tracker" ).isEmpty() || ! metadata->value( "code_repository" ).isEmpty() )
|
||||
{
|
||||
html += QString( "%1: " ).arg( tr( "More info" ) );
|
||||
if ( ! metadata->value( "homepage" ).isEmpty() )
|
||||
{
|
||||
html += QString( "<a href='%1'>%2</a> " ).arg( metadata->value( "homepage" ) ).arg( tr( "homepage" ) );
|
||||
html += QString( "<a href='%1'>%2</a> " ).arg( metadata->value( "homepage" ), tr( "homepage" ) );
|
||||
}
|
||||
if ( ! metadata->value( "tracker" ).isEmpty() )
|
||||
{
|
||||
html += QString( "<a href='%1'>%2</a> " ).arg( metadata->value( "tracker" ) ).arg( tr( "tracker" ) );
|
||||
html += QString( "<a href='%1'>%2</a> " ).arg( metadata->value( "tracker" ), tr( "tracker" ) );
|
||||
}
|
||||
if ( ! metadata->value( "code_repository" ).isEmpty() )
|
||||
{
|
||||
html += QString( "<a href='%1'>%2</a>" ).arg( metadata->value( "code_repository" ) ).arg( tr( "code_repository" ) );
|
||||
html += QString( "<a href='%1'>%2</a>" ).arg( metadata->value( "code_repository" ), tr( "code_repository" ) );
|
||||
}
|
||||
html += "<br/>";
|
||||
}
|
||||
@ -807,12 +807,12 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
|
||||
|
||||
if ( ! metadata->value( "author_email" ).isEmpty() )
|
||||
{
|
||||
html += QString( "%1: <a href='mailto:%2'>%3</a>" ).arg( tr( "Author" ) ).arg( metadata->value( "author_email" ) ).arg( metadata->value( "author_name" ) );
|
||||
html += QString( "%1: <a href='mailto:%2'>%3</a>" ).arg( tr( "Author" ), metadata->value( "author_email" ), metadata->value( "author_name" ) );
|
||||
html += "<br/><br/>";
|
||||
}
|
||||
else if ( ! metadata->value( "author_name" ).isEmpty() )
|
||||
{
|
||||
html += QString( "%1: %2" ).arg( tr( "Author" ) ).arg( metadata->value( "author_name" ) );
|
||||
html += QString( "%1: %2" ).arg( tr( "Author" ), metadata->value( "author_name" ) );
|
||||
html += "<br/><br/>";
|
||||
}
|
||||
|
||||
@ -820,11 +820,11 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
|
||||
{
|
||||
QString ver = metadata->value( "version_installed" );
|
||||
if ( ver == "-1" ) ver = "?";
|
||||
html += tr( "Installed version: %1 (in %2)<br/>" ).arg( ver ).arg( metadata->value( "library" ) );
|
||||
html += tr( "Installed version: %1 (in %2)<br/>" ).arg( ver, metadata->value( "library" ) );
|
||||
}
|
||||
if ( ! metadata->value( "version_available" ).isEmpty() )
|
||||
{
|
||||
html += tr( "Available version: %1 (in %2)<br/>" ).arg( metadata->value( "version_available" ) ).arg( metadata->value( "zip_repository" ) );
|
||||
html += tr( "Available version: %1 (in %2)<br/>" ).arg( metadata->value( "version_available" ), metadata->value( "zip_repository" ) );
|
||||
}
|
||||
|
||||
if ( ! metadata->value( "changelog" ).isEmpty() )
|
||||
@ -1160,8 +1160,8 @@ void QgsPluginManager::on_wvDetails_linkClicked( const QUrl & url )
|
||||
QString params = url.path();
|
||||
QString response;
|
||||
QgsPythonRunner::eval( QString( "pyplugin_installer.instance().sendVote('%1', '%2')" )
|
||||
.arg( params.split( "/" )[1] )
|
||||
.arg( params.split( "/" )[2] ), response );
|
||||
.arg( params.split( "/" )[1],
|
||||
params.split( "/" )[2] ), response );
|
||||
if ( response == "True" )
|
||||
{
|
||||
pushMessage( tr( "Vote sent successfully" ), QgsMessageBar::INFO );
|
||||
@ -1460,7 +1460,7 @@ void QgsPluginManager::updateWindowTitle()
|
||||
QListWidgetItem *curitem = mOptListWidget->currentItem();
|
||||
if ( curitem )
|
||||
{
|
||||
QString title = QString( "%1 | %2" ).arg( tr( "Plugins" ) ).arg( curitem->text() );
|
||||
QString title = QString( "%1 | %2" ).arg( tr( "Plugins" ), curitem->text() );
|
||||
if ( mOptionsListWidget->currentRow() < mOptionsListWidget->count() - 1 )
|
||||
{
|
||||
// if it's not the Settings tab, add the plugin count
|
||||
|
@ -475,14 +475,14 @@ void QgisApp::validateSrs( QgsCoordinateReferenceSystem &srs )
|
||||
authid = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid();
|
||||
srs.createFromOgcWmsCrs( authid );
|
||||
QgsDebugMsg( "Layer srs set from project: " + authid );
|
||||
messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to project CRS %1 - %2" ).arg( authid ).arg( srs.description() ), QgsMessageBar::WARNING, messageTimeout() );
|
||||
messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to project CRS %1 - %2" ).arg( authid, srs.description() ), QgsMessageBar::WARNING, messageTimeout() );
|
||||
}
|
||||
else ///Projections/defaultBehaviour==useGlobal
|
||||
{
|
||||
authid = mySettings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString();
|
||||
srs.createFromOgcWmsCrs( authid );
|
||||
QgsDebugMsg( "Layer srs set from default: " + authid );
|
||||
messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to CRS %1 - %2" ).arg( authid ).arg( srs.description() ), QgsMessageBar::WARNING, messageTimeout() );
|
||||
messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to CRS %1 - %2" ).arg( authid, srs.description() ), QgsMessageBar::WARNING, messageTimeout() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -748,7 +748,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
|
||||
connect( QgsMapLayerActionRegistry::instance(), SIGNAL( changed() ), this, SLOT( refreshActionFeatureAction() ) );
|
||||
|
||||
// set application's caption
|
||||
QString caption = tr( "QGIS - %1 ('%2')" ).arg( QGis::QGIS_VERSION ).arg( QGis::QGIS_RELEASE_NAME );
|
||||
QString caption = tr( "QGIS - %1 ('%2')" ).arg( QGis::QGIS_VERSION, QGis::QGIS_RELEASE_NAME );
|
||||
setWindowTitle( caption );
|
||||
|
||||
QgsMessageLog::logMessage( tr( "QGIS starting..." ), QString::null, QgsMessageLog::INFO );
|
||||
@ -2811,7 +2811,7 @@ void QgisApp::updateRecentProjectPaths()
|
||||
|
||||
Q_FOREACH ( const QgsWelcomePageItemsModel::RecentProjectData& recentProject, mRecentProjects )
|
||||
{
|
||||
QAction* action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title != recentProject.path ? recentProject.title : QFileInfo( recentProject.path ).baseName() ).arg( recentProject.path ) );
|
||||
QAction* action = mRecentProjectsMenu->addAction( QString( "%1 (%2)" ).arg( recentProject.title != recentProject.path ? recentProject.title : QFileInfo( recentProject.path ).baseName(), recentProject.path ) );
|
||||
action->setEnabled( QFile::exists(( recentProject.path ) ) );
|
||||
action->setData( recentProject.path );
|
||||
}
|
||||
@ -2840,7 +2840,7 @@ void QgisApp::saveRecentProjectPath( const QString& projectPath, bool savePrevie
|
||||
// Generate a unique file name
|
||||
QString fileName( QCryptographicHash::hash(( projectData.path.toUtf8() ), QCryptographicHash::Md5 ).toHex() );
|
||||
QString previewDir = QString( "%1/previewImages" ).arg( QgsApplication::qgisSettingsDirPath() );
|
||||
projectData.previewImagePath = QString( "%1/%2.png" ).arg( previewDir ).arg( fileName );
|
||||
projectData.previewImagePath = QString( "%1/%2.png" ).arg( previewDir, fileName );
|
||||
QDir().mkdir( previewDir );
|
||||
|
||||
// Render the map canvas
|
||||
@ -3281,15 +3281,15 @@ bool QgisApp::askUserForZipItemLayers( QString path )
|
||||
QgsLayerItem *layerItem = dynamic_cast<QgsLayerItem *>( item );
|
||||
if ( layerItem )
|
||||
{
|
||||
QgsDebugMsgLevel( QString( "item path=%1 provider=%2" ).arg( item->path() ).arg( layerItem->providerKey() ), 2 );
|
||||
QgsDebugMsgLevel( QString( "item path=%1 provider=%2" ).arg( item->path(), layerItem->providerKey() ), 2 );
|
||||
}
|
||||
if ( layerItem && layerItem->providerKey() == "gdal" )
|
||||
{
|
||||
layers << QString( "%1|%2|%3" ).arg( i ).arg( item->name() ).arg( "Raster" );
|
||||
layers << QString( "%1|%2|%3" ).arg( i ).arg( item->name(), "Raster" );
|
||||
}
|
||||
else if ( layerItem && layerItem->providerKey() == "ogr" )
|
||||
{
|
||||
layers << QString( "%1|%2|%3" ).arg( i ).arg( item->name() ).arg( tr( "Vector" ) );
|
||||
layers << QString( "%1|%2|%3" ).arg( i ).arg( item->name(), tr( "Vector" ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -3317,7 +3317,7 @@ bool QgisApp::askUserForZipItemLayers( QString path )
|
||||
if ( !layerItem )
|
||||
continue;
|
||||
|
||||
QgsDebugMsg( QString( "item path=%1 provider=%2" ).arg( item->path() ).arg( layerItem->providerKey() ) );
|
||||
QgsDebugMsg( QString( "item path=%1 provider=%2" ).arg( item->path(), layerItem->providerKey() ) );
|
||||
if ( layerItem->providerKey() == "gdal" )
|
||||
{
|
||||
if ( addRasterLayer( item->path(), QFileInfo( item->name() ).completeBaseName() ) )
|
||||
@ -4382,8 +4382,8 @@ bool QgisApp::fileSave()
|
||||
tr( "The loaded project file on disk was meanwhile changed. Do you want to overwrite the changes?\n"
|
||||
"\nLast modification date on load was: %1"
|
||||
"\nCurrent last modification date is: %2" )
|
||||
.arg( mProjectLastModified.toString( Qt::DefaultLocaleLongDate ) )
|
||||
.arg( fi.lastModified().toString( Qt::DefaultLocaleLongDate ) ),
|
||||
.arg( mProjectLastModified.toString( Qt::DefaultLocaleLongDate ),
|
||||
fi.lastModified().toString( Qt::DefaultLocaleLongDate ) ),
|
||||
QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
|
||||
return false;
|
||||
}
|
||||
@ -5141,7 +5141,7 @@ void QgisApp::labelingFontNotFound( QgsVectorLayer* vlayer, const QString& fontf
|
||||
// no timeout set, since notice needs attention and is only shown first time layer is labeled
|
||||
QgsMessageBarItem* fontMsg = new QgsMessageBarItem(
|
||||
tr( "Labeling" ),
|
||||
tr( "Font for layer <b><u>%1</u></b> was not found (<i>%2</i>). %3" ).arg( vlayer->name() ).arg( fontfamily ).arg( substitute ),
|
||||
tr( "Font for layer <b><u>%1</u></b> was not found (<i>%2</i>). %3" ).arg( vlayer->name(), fontfamily, substitute ),
|
||||
btnOpenPrefs,
|
||||
QgsMessageBar::WARNING,
|
||||
0,
|
||||
@ -6686,11 +6686,11 @@ QgsVectorLayer *QgisApp::pasteToNewMemoryVector()
|
||||
|
||||
Q_FOREACH ( QgsField f, clipboard()->fields().toList() )
|
||||
{
|
||||
QgsDebugMsg( QString( "field %1 (%2)" ).arg( f.name() ).arg( QVariant::typeToName( f.type() ) ) );
|
||||
QgsDebugMsg( QString( "field %1 (%2)" ).arg( f.name(), QVariant::typeToName( f.type() ) ) );
|
||||
if ( !layer->addAttribute( f ) )
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Warning" ),
|
||||
tr( "Cannot create field %1 (%2,%3)" ).arg( f.name() ).arg( f.typeName() ).arg( QVariant::typeToName( f.type() ) ),
|
||||
tr( "Cannot create field %1 (%2,%3)" ).arg( f.name(), f.typeName(), QVariant::typeToName( f.type() ) ),
|
||||
QMessageBox::Ok );
|
||||
delete layer;
|
||||
return 0;
|
||||
@ -7035,9 +7035,9 @@ void QgisApp::cancelEdits( QgsMapLayer *layer, bool leaveEditable, bool triggerR
|
||||
QMessageBox::information( 0,
|
||||
tr( "Error" ),
|
||||
tr( "Could not %1 changes to layer %2\n\nErrors: %3\n" )
|
||||
.arg( leaveEditable ? tr( "rollback" ) : tr( "cancel" ) )
|
||||
.arg( vlayer->name() )
|
||||
.arg( vlayer->commitErrors().join( "\n " ) ) );
|
||||
.arg( leaveEditable ? tr( "rollback" ) : tr( "cancel" ),
|
||||
vlayer->name(),
|
||||
vlayer->commitErrors().join( "\n " ) ) );
|
||||
}
|
||||
mMapCanvas->freeze( false );
|
||||
|
||||
@ -7135,8 +7135,8 @@ bool QgisApp::verifyEditsActionDialog( const QString& act, const QString& upon )
|
||||
switch ( QMessageBox::information( 0,
|
||||
tr( "Current edits" ),
|
||||
tr( "%1 current changes for %2 layer(s)?" )
|
||||
.arg( act )
|
||||
.arg( upon ),
|
||||
.arg( act,
|
||||
upon ),
|
||||
QMessageBox::Cancel | QMessageBox::Ok ) )
|
||||
{
|
||||
case QMessageBox::Ok:
|
||||
@ -7509,8 +7509,8 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *>& lyrList )
|
||||
msgBars.append( new QgsMessageBarItem(
|
||||
tr( "Duplicate layer: " ),
|
||||
tr( "%1 (%2 type unsupported)" )
|
||||
.arg( selectedLyr->name() )
|
||||
.arg( !unSppType.isEmpty() ? QString( "'" ) + unSppType + "' " : "" ),
|
||||
.arg( selectedLyr->name(),
|
||||
!unSppType.isEmpty() ? QString( "'" ) + unSppType + "' " : "" ),
|
||||
QgsMessageBar::WARNING,
|
||||
0,
|
||||
mInfoBar ) );
|
||||
@ -7810,7 +7810,7 @@ void QgisApp::loadPythonSupport()
|
||||
pythonlibName.prepend( "lib" );
|
||||
#endif
|
||||
QString version = QString( "%1.%2.%3" ).arg( QGis::QGIS_VERSION_INT / 10000 ).arg( QGis::QGIS_VERSION_INT / 100 % 100 ).arg( QGis::QGIS_VERSION_INT % 100 );
|
||||
QgsDebugMsg( QString( "load library %1 (%2)" ).arg( pythonlibName ).arg( version ) );
|
||||
QgsDebugMsg( QString( "load library %1 (%2)" ).arg( pythonlibName, version ) );
|
||||
QLibrary pythonlib( pythonlibName, version );
|
||||
// It's necessary to set these two load hints, otherwise Python library won't work correctly
|
||||
// see http://lists.kde.org/?l=pykde&m=117190116820758&w=2
|
||||
@ -10232,11 +10232,11 @@ void QgisApp::oldProjectVersionWarning( const QString& oldVersion )
|
||||
"<p>To remove this warning when opening an older project file, "
|
||||
"uncheck the box '%5' in the %4 menu."
|
||||
"<p>Version of the project file: %1<br>Current version of QGIS: %2" )
|
||||
.arg( oldVersion )
|
||||
.arg( QGis::QGIS_VERSION )
|
||||
.arg( "<a href=\"http://hub.qgis.org/projects/quantum-gis\">http://hub.qgis.org/projects/quantum-gis</a> " )
|
||||
.arg( tr( "<tt>Settings:Options:General</tt>", "Menu path to setting options" ) )
|
||||
.arg( tr( "Warn me when opening a project file saved with an older version of QGIS" ) );
|
||||
.arg( oldVersion,
|
||||
QGis::QGIS_VERSION,
|
||||
"<a href=\"http://hub.qgis.org/projects/quantum-gis\">http://hub.qgis.org/projects/quantum-gis</a> ",
|
||||
tr( "<tt>Settings:Options:General</tt>", "Menu path to setting options" ),
|
||||
tr( "Warn me when opening a project file saved with an older version of QGIS" ) );
|
||||
QString title = tr( "Project file is older" );
|
||||
|
||||
#ifdef ANDROID
|
||||
@ -10478,7 +10478,7 @@ void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *a
|
||||
for ( ;; )
|
||||
{
|
||||
bool ok = QgsCredentials::instance()->get(
|
||||
QString( "%1 at %2" ).arg( auth->realm() ).arg( reply->url().host() ),
|
||||
QString( "%1 at %2" ).arg( auth->realm(), reply->url().host() ),
|
||||
username, password,
|
||||
tr( "Authentication required" ) );
|
||||
if ( !ok )
|
||||
@ -10492,13 +10492,13 @@ void QgisApp::namAuthenticationRequired( QNetworkReply *reply, QAuthenticator *a
|
||||
|
||||
// credentials didn't change - stored ones probably wrong? clear password and retry
|
||||
QgsCredentials::instance()->put(
|
||||
QString( "%1 at %2" ).arg( auth->realm() ).arg( reply->url().host() ),
|
||||
QString( "%1 at %2" ).arg( auth->realm(), reply->url().host() ),
|
||||
username, QString::null );
|
||||
}
|
||||
|
||||
// save credentials
|
||||
QgsCredentials::instance()->put(
|
||||
QString( "%1 at %2" ).arg( auth->realm() ).arg( reply->url().host() ),
|
||||
QString( "%1 at %2" ).arg( auth->realm(), reply->url().host() ),
|
||||
username, password
|
||||
);
|
||||
}
|
||||
@ -10571,7 +10571,7 @@ void QgisApp::namSslErrors( QNetworkReply *reply, const QList<QSslError> &errors
|
||||
.arg( reply->url().port() != -1 ? reply->url().port() : 443 )
|
||||
.trimmed() );
|
||||
QString digest( QgsAuthCertUtils::shaHexForCert( reply->sslConfiguration().peerCertificate() ) );
|
||||
QString dgsthostport( QString( "%1:%2" ).arg( digest ).arg( hostport ) );
|
||||
QString dgsthostport( QString( "%1:%2" ).arg( digest, hostport ) );
|
||||
|
||||
const QHash<QString, QSet<QSslError::SslError> > &errscache( QgsAuthManager::instance()->getIgnoredSslErrorCache() );
|
||||
|
||||
@ -10602,8 +10602,8 @@ void QgisApp::namSslErrors( QNetworkReply *reply, const QList<QSslError> &errors
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "Errors %1 for cached item for %2" )
|
||||
.arg( errenums.isEmpty() ? "not found" : "did not match" )
|
||||
.arg( hostport ) );
|
||||
.arg( errenums.isEmpty() ? "not found" : "did not match",
|
||||
hostport ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant>& opts )
|
||||
QgsDebugMsg( QString( "fontFamily: %1" ).arg( fontFamily ) );
|
||||
if ( fontFamily.isEmpty() ) { return; }
|
||||
|
||||
ss += QString( "* { font: %1pt \"%2\"} " ).arg( fontSize ).arg( fontFamily );
|
||||
ss += QString( "* { font: %1pt \"%2\"} " ).arg( fontSize, fontFamily );
|
||||
|
||||
// QGroupBox and QgsCollapsibleGroupBox, mostly for Ubuntu and Mac
|
||||
bool gbxCustom = opts.value( "groupBoxCustom" ).toBool();
|
||||
@ -172,8 +172,8 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant>& opts )
|
||||
"selection-background-color: %1;"
|
||||
"selection-color: %2;"
|
||||
"}" )
|
||||
.arg( palette.highlight().color().name() )
|
||||
.arg( palette.highlightedText().color().name() );
|
||||
.arg( palette.highlight().color().name(),
|
||||
palette.highlightedText().color().name() );
|
||||
|
||||
QgsDebugMsg( QString( "Stylesheet built: %1" ).arg( ss ) );
|
||||
|
||||
|
@ -266,7 +266,7 @@ QList< LegendLayerAction > QgsAppLayerTreeViewMenuProvider::legendLayerActions(
|
||||
Q_FOREACH ( const LegendLayerAction& lyrAction, mLegendLayerActionMap[ type ] )
|
||||
{
|
||||
Q_UNUSED( lyrAction );
|
||||
QgsDebugMsg( QString( "%1/%2 - %3 layers" ).arg( lyrAction.menu ).arg( lyrAction.action->text() ).arg( lyrAction.layers.count() ) );
|
||||
QgsDebugMsg( QString( "%1/%2 - %3 layers" ).arg( lyrAction.menu, lyrAction.action->text() ).arg( lyrAction.layers.count() ) );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -693,7 +693,7 @@ void QgsAttributeTableDialog::on_mAddAttribute_clicked()
|
||||
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( dialog.field().name() ).arg( dialog.field().typeName() ) );
|
||||
QMessageBox::critical( this, tr( "Failed to add field" ), tr( "Failed to add field '%1' of type '%2'. Is the field name unique?" ).arg( dialog.field().name(), dialog.field().typeName() ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl, int fieldIdx
|
||||
, mFieldIdx( fieldIdx )
|
||||
{
|
||||
setupUi( this );
|
||||
setWindowTitle( tr( "Edit Widget Properties - %1 (%2)" ).arg( vl->fields()[fieldIdx].name() ).arg( vl->name() ) );
|
||||
setWindowTitle( tr( "Edit Widget Properties - %1 (%2)" ).arg( vl->fields()[fieldIdx].name(), vl->name() ) );
|
||||
|
||||
connect( selectionListWidget, SIGNAL( currentRowChanged( int ) ), this, SLOT( setStackPage( int ) ) );
|
||||
|
||||
|
@ -67,9 +67,9 @@ QgsBookmarks::QgsBookmarks( QWidget *parent ) : QDockWidget( parent )
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Error" ),
|
||||
tr( "Unable to open bookmarks database.\nDatabase: %1\nDriver: %2\nDatabase: %3" )
|
||||
.arg( QgsApplication::qgisUserDbFilePath() )
|
||||
.arg( db.lastError().driverText() )
|
||||
.arg( db.lastError().databaseText() )
|
||||
.arg( QgsApplication::qgisUserDbFilePath(),
|
||||
db.lastError().driverText(),
|
||||
db.lastError().databaseText() )
|
||||
);
|
||||
deleteLater();
|
||||
return;
|
||||
@ -163,8 +163,8 @@ void QgsBookmarks::addClicked()
|
||||
else
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Error" ), tr( "Unable to create the bookmark.\nDriver:%1\nDatabase:%2" )
|
||||
.arg( query.lastError().driverText() )
|
||||
.arg( query.lastError().databaseText() ) );
|
||||
.arg( query.lastError().driverText(),
|
||||
query.lastError().databaseText() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -302,8 +302,8 @@ void QgsBookmarks::importFromXML()
|
||||
if ( !query.exec( queryTxt ) )
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Error" ), tr( "Unable to create the bookmark.\nDriver: %1\nDatabase: %2" )
|
||||
.arg( query.lastError().driverText() )
|
||||
.arg( query.lastError().databaseText() ) );
|
||||
.arg( query.lastError().driverText(),
|
||||
query.lastError().databaseText() ) );
|
||||
}
|
||||
query.finish();
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ class QgsBrowserTreeFilterProxyModel : public QSortFilterProxyModel
|
||||
|
||||
void updateFilter()
|
||||
{
|
||||
QgsDebugMsg( QString( "filter = %1 syntax = %2" ).arg( mFilter ).arg( mPatternSyntax ) );
|
||||
QgsDebugMsg( QString( "filter = %1 syntax = %2" ).arg( mFilter, mPatternSyntax ) );
|
||||
mREList.clear();
|
||||
if ( mPatternSyntax == "normal" )
|
||||
{
|
||||
@ -176,7 +176,7 @@ class QgsBrowserTreeFilterProxyModel : public QSortFilterProxyModel
|
||||
{
|
||||
Q_FOREACH ( const QRegExp& rx, mREList )
|
||||
{
|
||||
QgsDebugMsg( QString( "value: [%1] rx: [%2] match: %3" ).arg( value ).arg( rx.pattern() ).arg( rx.exactMatch( value ) ) );
|
||||
QgsDebugMsg( QString( "value: [%1] rx: [%2] match: %3" ).arg( value, rx.pattern() ).arg( rx.exactMatch( value ) ) );
|
||||
if ( rx.exactMatch( value ) )
|
||||
return true;
|
||||
}
|
||||
@ -185,7 +185,7 @@ class QgsBrowserTreeFilterProxyModel : public QSortFilterProxyModel
|
||||
{
|
||||
Q_FOREACH ( const QRegExp& rx, mREList )
|
||||
{
|
||||
QgsDebugMsg( QString( "value: [%1] rx: [%2] match: %3" ).arg( value ).arg( rx.pattern() ).arg( rx.indexIn( value ) ) );
|
||||
QgsDebugMsg( QString( "value: [%1] rx: [%2] match: %3" ).arg( value, rx.pattern() ).arg( rx.indexIn( value ) ) );
|
||||
if ( rx.indexIn( value ) != -1 )
|
||||
return true;
|
||||
}
|
||||
|
@ -115,8 +115,8 @@ void QgsConfigureShortcutsDialog::saveShortcuts()
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Saving shortcuts" ),
|
||||
tr( "Cannot write file %1:\n%2." )
|
||||
.arg( fileName )
|
||||
.arg( file.errorString() ) );
|
||||
.arg( fileName,
|
||||
file.errorString() ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -163,8 +163,8 @@ void QgsConfigureShortcutsDialog::loadShortcuts()
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Loading shortcuts" ),
|
||||
tr( "Cannot read file %1:\n%2." )
|
||||
.arg( fileName )
|
||||
.arg( file.errorString() ) );
|
||||
.arg( fileName,
|
||||
file.errorString() ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -808,7 +808,7 @@ void QgsCustomization::customizeWidget( QWidget * widget, QEvent * event, QSetti
|
||||
|
||||
QgsDebugMsg( QString( "objectName = %1 event type = %2" ).arg( widget->objectName() ).arg( event->type() ) );
|
||||
|
||||
QgsDebugMsg( QString( "%1 x %2" ).arg( widget->metaObject()->className() ).arg( QDialog::staticMetaObject.className() ) );
|
||||
QgsDebugMsg( QString( "%1 x %2" ).arg( widget->metaObject()->className(), QDialog::staticMetaObject.className() ) );
|
||||
QString path = "/Customization/Widgets/";
|
||||
|
||||
QgsCustomization::customizeWidget( path, widget, settings );
|
||||
|
@ -155,7 +155,7 @@ bool QgsCustomProjectionDialog::deleteCRS( const QString& id )
|
||||
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8(), &myDatabase );
|
||||
if ( myResult != SQLITE_OK )
|
||||
{
|
||||
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ) ).arg( QgsApplication::qgisUserDbFilePath() ) );
|
||||
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ), QgsApplication::qgisUserDbFilePath() ) );
|
||||
// XXX This will likely never happen since on open, sqlite creates the
|
||||
// database if it does not exist.
|
||||
Q_ASSERT( myResult == SQLITE_OK );
|
||||
@ -164,7 +164,7 @@ bool QgsCustomProjectionDialog::deleteCRS( const QString& id )
|
||||
// XXX Need to free memory from the error msg if one is set
|
||||
if ( myResult != SQLITE_OK || sqlite3_step( myPreparedStatement ) != SQLITE_DONE )
|
||||
{
|
||||
QgsDebugMsg( QString( "failed to remove CRS from database in custom projection dialog: %1 [%2]" ).arg( mySql ).arg( sqlite3_errmsg( myDatabase ) ) );
|
||||
QgsDebugMsg( QString( "failed to remove CRS from database in custom projection dialog: %1 [%2]" ).arg( mySql, sqlite3_errmsg( myDatabase ) ) );
|
||||
}
|
||||
sqlite3_close( myDatabase );
|
||||
|
||||
@ -184,7 +184,7 @@ void QgsCustomProjectionDialog::insertProjection( const QString& myProjectionAc
|
||||
int myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8(), &myDatabase );
|
||||
if ( myResult != SQLITE_OK )
|
||||
{
|
||||
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ) ).arg( QgsApplication::qgisUserDbFilePath() ) );
|
||||
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ), QgsApplication::qgisUserDbFilePath() ) );
|
||||
// XXX This will likely never happen since on open, sqlite creates the
|
||||
// database if it does not exist.
|
||||
Q_ASSERT( myResult == SQLITE_OK );
|
||||
@ -192,7 +192,7 @@ void QgsCustomProjectionDialog::insertProjection( const QString& myProjectionAc
|
||||
int srsResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8(), &srsDatabase );
|
||||
if ( myResult != SQLITE_OK )
|
||||
{
|
||||
QgsDebugMsg( QString( "Can't open database %1 [%2]" ).arg( QgsApplication::srsDbFilePath() ).arg( sqlite3_errmsg( srsDatabase ) ) );
|
||||
QgsDebugMsg( QString( "Can't open database %1 [%2]" ).arg( QgsApplication::srsDbFilePath(), sqlite3_errmsg( srsDatabase ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -219,7 +219,7 @@ void QgsCustomProjectionDialog::insertProjection( const QString& myProjectionAc
|
||||
myResult = sqlite3_prepare( myDatabase, mySql.toUtf8(), mySql.length(), &myPreparedStatement, &myTail );
|
||||
if ( myResult != SQLITE_OK || sqlite3_step( myPreparedStatement ) != SQLITE_DONE )
|
||||
{
|
||||
QgsDebugMsg( QString( "Update or insert failed in custom projection dialog: %1 [%2]" ).arg( mySql ).arg( sqlite3_errmsg( myDatabase ) ) );
|
||||
QgsDebugMsg( QString( "Update or insert failed in custom projection dialog: %1 [%2]" ).arg( mySql, sqlite3_errmsg( myDatabase ) ) );
|
||||
}
|
||||
|
||||
sqlite3_finalize( myPreparedStatement );
|
||||
@ -229,7 +229,7 @@ void QgsCustomProjectionDialog::insertProjection( const QString& myProjectionAc
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QString( "prepare failed: %1 [%2]" ).arg( srsSql ).arg( sqlite3_errmsg( srsDatabase ) ) );
|
||||
QgsDebugMsg( QString( "prepare failed: %1 [%2]" ).arg( srsSql, sqlite3_errmsg( srsDatabase ) ) );
|
||||
}
|
||||
|
||||
sqlite3_close( srsDatabase );
|
||||
@ -244,7 +244,7 @@ bool QgsCustomProjectionDialog::saveCRS( QgsCoordinateReferenceSystem myCRS, con
|
||||
int return_id;
|
||||
QString myProjectionAcronym = myCRS.projectionAcronym();
|
||||
QString myEllipsoidAcronym = myCRS.ellipsoidAcronym();
|
||||
QgsDebugMsg( QString( "Saving a CRS:%1, %2, %3" ).arg( myName ).arg( myCRS.toProj4() ).arg( newEntry ) );
|
||||
QgsDebugMsg( QString( "Saving a CRS:%1, %2, %3" ).arg( myName, myCRS.toProj4() ).arg( newEntry ) );
|
||||
if ( newEntry )
|
||||
{
|
||||
return_id = myCRS.saveAsUserCRS( myName );
|
||||
@ -272,7 +272,7 @@ bool QgsCustomProjectionDialog::saveCRS( QgsCoordinateReferenceSystem myCRS, con
|
||||
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8(), &myDatabase );
|
||||
if ( myResult != SQLITE_OK )
|
||||
{
|
||||
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ) ).arg( QgsApplication::qgisUserDbFilePath() ) );
|
||||
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ), QgsApplication::qgisUserDbFilePath() ) );
|
||||
// XXX This will likely never happen since on open, sqlite creates the
|
||||
// database if it does not exist.
|
||||
Q_ASSERT( myResult == SQLITE_OK );
|
||||
@ -281,7 +281,7 @@ bool QgsCustomProjectionDialog::saveCRS( QgsCoordinateReferenceSystem myCRS, con
|
||||
// XXX Need to free memory from the error msg if one is set
|
||||
if ( myResult != SQLITE_OK || sqlite3_step( myPreparedStatement ) != SQLITE_DONE )
|
||||
{
|
||||
QgsDebugMsg( QString( "failed to write to database in custom projection dialog: %1 [%2]" ).arg( mySql ).arg( sqlite3_errmsg( myDatabase ) ) );
|
||||
QgsDebugMsg( QString( "failed to write to database in custom projection dialog: %1 [%2]" ).arg( mySql, sqlite3_errmsg( myDatabase ) ) );
|
||||
}
|
||||
|
||||
sqlite3_finalize( myPreparedStatement );
|
||||
|
@ -76,5 +76,5 @@ void QgsDecorationItem::setName( const char *name )
|
||||
mNameConfig = name;
|
||||
mNameConfig.remove( " " );
|
||||
mNameTranslated = tr( name );
|
||||
QgsDebugMsg( QString( "name=%1 nameconfig=%2 nametrans=%3" ).arg( mName ).arg( mNameConfig ).arg( mNameTranslated ) );
|
||||
QgsDebugMsg( QString( "name=%1 nameconfig=%2 nametrans=%3" ).arg( mName, mNameConfig, mNameTranslated ) );
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ bool QgsFieldsProperties::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() ).arg( field.typeName() ) );
|
||||
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() ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -103,10 +103,10 @@ QgsHandleBadLayers::QgsHandleBadLayers( const QList<QDomNode> &layers, const QDo
|
||||
bool providerFileBased = ( QgsProviderRegistry::instance()->providerCapabilities( provider ) & QgsDataProvider::File ) != 0;
|
||||
|
||||
QgsDebugMsg( QString( "name=%1 type=%2 provider=%3 datasource='%4'" )
|
||||
.arg( name )
|
||||
.arg( type )
|
||||
.arg( vectorProvider )
|
||||
.arg( datasource ) );
|
||||
.arg( name,
|
||||
type,
|
||||
vectorProvider,
|
||||
datasource ) );
|
||||
|
||||
mLayerList->setRowCount( j + 1 );
|
||||
|
||||
|
@ -518,7 +518,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsVectorLayer *vlayer, const QgsFeat
|
||||
|
||||
tblResults->setRowCount( j + 1 );
|
||||
|
||||
QgsDebugMsg( QString( "adding item #%1 / %2 / %3 / %4" ).arg( j ).arg( vlayer->name() ).arg( vlayer->attributeDisplayName( i ) ).arg( value2 ) );
|
||||
QgsDebugMsg( QString( "adding item #%1 / %2 / %3 / %4" ).arg( j ).arg( vlayer->name(), vlayer->attributeDisplayName( i ), value2 ) );
|
||||
|
||||
QTableWidgetItem *item = new QTableWidgetItem( vlayer->name() );
|
||||
item->setData( Qt::UserRole, QVariant::fromValue( qobject_cast<QObject *>( vlayer ) ) );
|
||||
@ -784,7 +784,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
|
||||
|
||||
for ( QMap<QString, QString>::const_iterator it = attributes.begin(); it != attributes.end(); ++it )
|
||||
{
|
||||
QgsDebugMsg( QString( "adding item #%1 / %2 / %3 / %4" ).arg( j ).arg( layer->name() ).arg( it.key() ).arg( it.value() ) );
|
||||
QgsDebugMsg( QString( "adding item #%1 / %2 / %3 / %4" ).arg( j ).arg( layer->name(), it.key(), it.value() ) );
|
||||
QTableWidgetItem *item = new QTableWidgetItem( layer->name() );
|
||||
item->setData( Qt::UserRole, QVariant::fromValue( qobject_cast<QObject *>( layer ) ) );
|
||||
item->setData( Qt::UserRole + 1, layer->id() );
|
||||
@ -1696,7 +1696,7 @@ void QgsIdentifyResultsDialog::copyFeatureAttributes()
|
||||
if ( attrIdx < 0 || attrIdx >= fields.count() )
|
||||
continue;
|
||||
|
||||
text += QString( "%1: %2\n" ).arg( fields[attrIdx].name() ).arg( it.value().toString() );
|
||||
text += QString( "%1: %2\n" ).arg( fields[attrIdx].name(), it.value().toString() );
|
||||
}
|
||||
}
|
||||
else if ( rlayer )
|
||||
@ -1710,7 +1710,7 @@ void QgsIdentifyResultsDialog::copyFeatureAttributes()
|
||||
QTreeWidgetItem *item = featItem->child( i );
|
||||
if ( item->childCount() > 0 )
|
||||
continue;
|
||||
text += QString( "%1: %2\n" ).arg( item->data( 0, Qt::DisplayRole ).toString() ).arg( item->data( 1, Qt::DisplayRole ).toString() );
|
||||
text += QString( "%1: %2\n" ).arg( item->data( 0, Qt::DisplayRole ).toString(), item->data( 1, Qt::DisplayRole ).toString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ void QgsMeasureDialog::updateUi()
|
||||
|
||||
if (( mCanvasUnits == QGis::Meters && mDisplayUnits == QGis::Feet ) || ( mCanvasUnits == QGis::Feet && mDisplayUnits == QGis::Meters ) )
|
||||
{
|
||||
toolTip += "<br> * " + tr( "Finally, the value is converted from %1 to %2." ).arg( QGis::tr( mCanvasUnits ) ).arg( QGis::tr( mDisplayUnits ) );
|
||||
toolTip += "<br> * " + tr( "Finally, the value is converted from %1 to %2." ).arg( QGis::tr( mCanvasUnits ), QGis::tr( mDisplayUnits ) );
|
||||
}
|
||||
|
||||
editTotal->setToolTip( toolTip );
|
||||
|
@ -353,7 +353,7 @@ bool QgsNewSpatialiteLayerDialog::apply()
|
||||
QTreeWidgetItemIterator it( mAttributeView );
|
||||
while ( *it )
|
||||
{
|
||||
sql += delim + QString( "%1 %2" ).arg( quotedIdentifier(( *it )->text( 0 ) ) ).arg(( *it )->text( 1 ) );
|
||||
sql += delim + QString( "%1 %2" ).arg( quotedIdentifier(( *it )->text( 0 ) ), ( *it )->text( 1 ) );
|
||||
|
||||
delim = ",";
|
||||
|
||||
@ -368,15 +368,15 @@ bool QgsNewSpatialiteLayerDialog::apply()
|
||||
QgsDebugMsg( sql ); // OK
|
||||
|
||||
QString sqlAddGeom = QString( "select AddGeometryColumn(%1,%2,%3,%4,2)" )
|
||||
.arg( quotedValue( leLayerName->text() ) )
|
||||
.arg( quotedValue( leGeometryColumn->text() ) )
|
||||
.arg( quotedValue( leLayerName->text() ),
|
||||
quotedValue( leGeometryColumn->text() ) )
|
||||
.arg( mCrsId.split( ':' ).value( 1, "0" ).toInt() )
|
||||
.arg( quotedValue( selectedType() ) );
|
||||
QgsDebugMsg( sqlAddGeom ); // OK
|
||||
|
||||
QString sqlCreateIndex = QString( "select CreateSpatialIndex(%1,%2)" )
|
||||
.arg( quotedValue( leLayerName->text() ) )
|
||||
.arg( quotedValue( leGeometryColumn->text() ) );
|
||||
.arg( quotedValue( leLayerName->text() ),
|
||||
quotedValue( leGeometryColumn->text() ) );
|
||||
QgsDebugMsg( sqlCreateIndex ); // OK
|
||||
|
||||
sqlite3 *db;
|
||||
@ -395,7 +395,7 @@ bool QgsNewSpatialiteLayerDialog::apply()
|
||||
{
|
||||
QMessageBox::warning( this,
|
||||
tr( "Error Creating SpatiaLite Table" ),
|
||||
tr( "Failed to create the SpatiaLite table %1. The database returned:\n%2" ).arg( leLayerName->text() ).arg( errmsg ) );
|
||||
tr( "Failed to create the SpatiaLite table %1. The database returned:\n%2" ).arg( leLayerName->text(), errmsg ) );
|
||||
sqlite3_free( errmsg );
|
||||
}
|
||||
else
|
||||
@ -422,9 +422,9 @@ bool QgsNewSpatialiteLayerDialog::apply()
|
||||
}
|
||||
|
||||
QgsVectorLayer *layer = new QgsVectorLayer( QString( "dbname='%1' table='%2'(%3) sql=" )
|
||||
.arg( mDatabaseComboBox->currentText() )
|
||||
.arg( leLayerName->text() )
|
||||
.arg( leGeometryColumn->text() ), leLayerName->text(), "spatialite" );
|
||||
.arg( mDatabaseComboBox->currentText(),
|
||||
leLayerName->text(),
|
||||
leGeometryColumn->text() ), leLayerName->text(), "spatialite" );
|
||||
if ( layer->isValid() )
|
||||
{
|
||||
// register this layer with the central layers registry
|
||||
|
@ -1748,7 +1748,7 @@ void QgsOptions::loadGdalDriverList()
|
||||
pszVirtualIO = "v";
|
||||
else
|
||||
pszVirtualIO = "";
|
||||
myDriversFlags[myGdalDriverDescription] = QString( "%1%2" ).arg( pszRWFlag ).arg( pszVirtualIO );
|
||||
myDriversFlags[myGdalDriverDescription] = QString( "%1%2" ).arg( pszRWFlag, pszVirtualIO );
|
||||
|
||||
// get driver extensions and long name
|
||||
// the gdal provider can override/add extensions but there is no interface to query this
|
||||
|
@ -130,9 +130,9 @@ void QgsPluginRegistry::dump()
|
||||
++it )
|
||||
{
|
||||
QgsDebugMsg( QString( "PLUGIN: %1 -> (%2, %3)" )
|
||||
.arg( it.key() )
|
||||
.arg( it->name() )
|
||||
.arg( it->library() ) );
|
||||
.arg( it.key(),
|
||||
it->name(),
|
||||
it->library() ) );
|
||||
}
|
||||
|
||||
if ( mPythonUtils && mPythonUtils->isEnabled() )
|
||||
@ -291,7 +291,7 @@ void QgsPluginRegistry::loadPythonPlugin( const QString& packageName )
|
||||
|
||||
// add to settings
|
||||
settings.setValue( "/PythonPlugins/" + packageName, true );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Loaded %1 (package: %2)" ).arg( pluginName ).arg( packageName ), QObject::tr( "Plugins" ), QgsMessageLog::INFO );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Loaded %1 (package: %2)" ).arg( pluginName, packageName ), QObject::tr( "Plugins" ), QgsMessageLog::INFO );
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ void QgsPluginRegistry::loadCppPlugin( const QString& theFullPathName )
|
||||
bool loaded = myLib.load();
|
||||
if ( !loaded )
|
||||
{
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1 (Reason: %2)" ).arg( myLib.fileName() ).arg( myLib.errorString() ), QObject::tr( "Plugins" ) );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1 (Reason: %2)" ).arg( myLib.fileName(), myLib.errorString() ), QObject::tr( "Plugins" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -344,7 +344,7 @@ void QgsPluginRegistry::loadCppPlugin( const QString& theFullPathName )
|
||||
addPlugin( baseName, QgsPluginMetadata( myLib.fileName(), pName(), pl ) );
|
||||
//add it to the qsettings file [ts]
|
||||
settings.setValue( "/Plugins/" + baseName, true );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Loaded %1 (Path: %2)" ).arg( pName() ).arg( myLib.fileName() ), QObject::tr( "Plugins" ), QgsMessageLog::INFO );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Loaded %1 (Path: %2)" ).arg( pName(), myLib.fileName() ), QObject::tr( "Plugins" ), QgsMessageLog::INFO );
|
||||
|
||||
QObject *o = dynamic_cast<QObject *>( pl );
|
||||
if ( o )
|
||||
@ -545,7 +545,7 @@ bool QgsPluginRegistry::checkCppPlugin( const QString& pluginFullPath )
|
||||
bool loaded = myLib.load();
|
||||
if ( ! loaded )
|
||||
{
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1 (Reason: %2)" ).arg( myLib.fileName() ).arg( myLib.errorString() ), QObject::tr( "Plugins" ) );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1 (Reason: %2)" ).arg( myLib.fileName(), myLib.errorString() ), QObject::tr( "Plugins" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -232,9 +232,12 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
|
||||
QString pyramidSentence4 = tr( "Please note that building internal pyramids may alter the original data file and once created they cannot be removed!" );
|
||||
QString pyramidSentence5 = tr( "Please note that building internal pyramids could corrupt your image - always make a backup of your data first!" );
|
||||
|
||||
tePyramidDescription->setHtml( pyramidFormat.arg( pyramidHeader ).arg( pyramidSentence1 )
|
||||
.arg( pyramidSentence2 ).arg( pyramidSentence3 )
|
||||
.arg( pyramidSentence4 ).arg( pyramidSentence5 ) );
|
||||
tePyramidDescription->setHtml( pyramidFormat.arg( pyramidHeader,
|
||||
pyramidSentence1,
|
||||
pyramidSentence2,
|
||||
pyramidSentence3,
|
||||
pyramidSentence4,
|
||||
pyramidSentence5 ) );
|
||||
|
||||
tableTransparency->horizontalHeader()->setResizeMode( 0, QHeaderView::Stretch );
|
||||
tableTransparency->horizontalHeader()->setResizeMode( 1, QHeaderView::Stretch );
|
||||
|
@ -87,8 +87,8 @@ void QgsWelcomePage::versionInfoReceived()
|
||||
{
|
||||
mVersionInformation->setVisible( true );
|
||||
mVersionInformation->setText( QString( "<b>%1</b>: %2" )
|
||||
.arg( tr( "There is a new QGIS version available" ) )
|
||||
.arg( versionInfo->downloadInfo() ) );
|
||||
.arg( tr( "There is a new QGIS version available" ),
|
||||
versionInfo->downloadInfo() ) );
|
||||
mVersionInformation->setStyleSheet( "QLabel{"
|
||||
" background-color: #dddd00;"
|
||||
" padding: 5px;"
|
||||
|
@ -72,7 +72,10 @@ void QgsWelcomePageItemDelegate::paint( QPainter* painter, const QStyleOptionVie
|
||||
int titleSize = QApplication::fontMetrics().height() * 1.1;
|
||||
int textSize = titleSize * 0.85;
|
||||
|
||||
doc.setHtml( QString( "<div style='font-size:%1px;'><span style='font-size:%2px;font-weight:bold;'>%3</span><br>%4<br>%5</div>" ).arg( textSize ).arg( titleSize ).arg( index.data( QgsWelcomePageItemsModel::TitleRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::PathRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
|
||||
doc.setHtml( QString( "<div style='font-size:%1px;'><span style='font-size:%2px;font-weight:bold;'>%3</span><br>%4<br>%5</div>" ).arg( textSize ).arg( titleSize )
|
||||
.arg( index.data( QgsWelcomePageItemsModel::TitleRole ).toString(),
|
||||
index.data( QgsWelcomePageItemsModel::PathRole ).toString(),
|
||||
index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
|
||||
doc.setTextWidth( option.rect.width() - ( !icon.isNull() ? icon.width() + 35 : 35 ) );
|
||||
|
||||
if ( !icon.isNull() )
|
||||
@ -105,7 +108,10 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem & option,
|
||||
int titleSize = QApplication::fontMetrics().height() * 1.1;
|
||||
int textSize = titleSize * 0.85;
|
||||
|
||||
doc.setHtml( QString( "<div style='font-size:%1px;'><span style='font-size:%2px;font-weight:bold;'>%3</span><br>%4<br>%5</div>" ).arg( textSize ).arg( titleSize ).arg( index.data( QgsWelcomePageItemsModel::TitleRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::PathRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
|
||||
doc.setHtml( QString( "<div style='font-size:%1px;'><span style='font-size:%2px;font-weight:bold;'>%3</span><br>%4<br>%5</div>" ).arg( textSize ).arg( titleSize )
|
||||
.arg( index.data( QgsWelcomePageItemsModel::TitleRole ).toString(),
|
||||
index.data( QgsWelcomePageItemsModel::PathRole ).toString(),
|
||||
index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
|
||||
doc.setTextWidth( width - ( !icon.isNull() ? icon.width() + 35 : 35 ) );
|
||||
|
||||
return QSize( width, qMax( doc.size().height() + 10, ( double )icon.height() ) + 20 );
|
||||
@ -145,7 +151,7 @@ QVariant QgsWelcomePageItemsModel::data( const QModelIndex& index, int role ) co
|
||||
{
|
||||
QgsCoordinateReferenceSystem crs;
|
||||
crs.createFromOgcWmsCrs( mRecentProjects.at( index.row() ).crs );
|
||||
return QString( "%1 (%2)" ).arg( mRecentProjects.at( index.row() ).crs ).arg( crs.description() );
|
||||
return QString( "%1 (%2)" ).arg( mRecentProjects.at( index.row() ).crs, crs.description() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ bool QgsAuthBasicMethod::updateNetworkRequest( QNetworkRequest &request, const Q
|
||||
|
||||
if ( !username.isEmpty() )
|
||||
{
|
||||
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( username ).arg( password ).toAscii().toBase64() );
|
||||
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( username, password ).toAscii().toBase64() );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ void QgsAuthIdentCertEdit::populateIdentityComboBox()
|
||||
QString org( SSL_SUBJECT_INFO( cert, QSslCertificate::Organization ) );
|
||||
if ( org.isEmpty() )
|
||||
org = tr( "Organization not defined" );
|
||||
idents.insert( QString( "%1 (%2)" ).arg( QgsAuthCertUtils::resolvedCertName( cert ) ).arg( org ),
|
||||
idents.insert( QString( "%1 (%2)" ).arg( QgsAuthCertUtils::resolvedCertName( cert ), org ),
|
||||
QgsAuthCertUtils::shaHexForCert( cert ) );
|
||||
}
|
||||
QgsStringMap::const_iterator it = idents.constBegin();
|
||||
|
@ -99,7 +99,7 @@ bool QgsAuthPkiPathsEdit::validateConfig()
|
||||
QDateTime enddate( cert.expiryDate() );
|
||||
|
||||
writePkiMessage( lePkiPathsMsg,
|
||||
tr( "%1 thru %2" ).arg( startdate.toString() ).arg( enddate.toString() ),
|
||||
tr( "%1 thru %2" ).arg( startdate.toString(), enddate.toString() ),
|
||||
( certvalid ? Valid : Invalid ) );
|
||||
|
||||
return validityChange( certvalid );
|
||||
|
@ -107,7 +107,7 @@ bool QgsAuthPkcs12Edit::validateConfig()
|
||||
bool bundlevalid = ( now >= startdate && now <= enddate );
|
||||
|
||||
writePkiMessage( lePkcs12Msg,
|
||||
tr( "%1 thru %2" ).arg( startdate.toString() ).arg( enddate.toString() ),
|
||||
tr( "%1 thru %2" ).arg( startdate.toString(), enddate.toString() ),
|
||||
( bundlevalid ? Valid : Invalid ) );
|
||||
|
||||
return validityChange( bundlevalid );
|
||||
|
@ -95,7 +95,7 @@ int main( int argc, char ** argv )
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning( "loading of qgis translation failed [%s]", QString( "%1/qgis_%2" ).arg( i18nPath ).arg( myTranslationCode ).toLocal8Bit().constData() );
|
||||
qWarning( "loading of qgis translation failed [%s]", QString( "%1/qgis_%2" ).arg( i18nPath, myTranslationCode ).toLocal8Bit().constData() );
|
||||
}
|
||||
|
||||
/* Translation file for Qt.
|
||||
@ -109,7 +109,7 @@ int main( int argc, char ** argv )
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning( "loading of qt translation failed [%s]", QString( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ).arg( myTranslationCode ).toLocal8Bit().constData() );
|
||||
qWarning( "loading of qt translation failed [%s]", QString( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ), myTranslationCode ).toLocal8Bit().constData() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ bool QgsAuthMethodConfig::uriToResource( const QString &accessurl, QString *reso
|
||||
QUrl url( accessurl );
|
||||
if ( url.isValid() )
|
||||
{
|
||||
res = QString( "%1://%2:%3%4" ).arg( url.scheme() ).arg( url.host() )
|
||||
res = QString( "%1://%2:%3%4" ).arg( url.scheme(), url.host() )
|
||||
.arg( url.port() ).arg( withpath ? url.path() : "" );
|
||||
}
|
||||
}
|
||||
|
@ -837,7 +837,7 @@ void QgsAuthManager::updateConfigAuthMethods()
|
||||
{
|
||||
mConfigAuthMethods.insert( query.value( 0 ).toString(),
|
||||
query.value( 1 ).toString() );
|
||||
cfgmethods << QString( "%1=%2" ).arg( query.value( 0 ).toString() ).arg( query.value( 1 ).toString() );
|
||||
cfgmethods << QString( "%1=%2" ).arg( query.value( 0 ).toString(), query.value( 1 ).toString() );
|
||||
}
|
||||
QgsDebugMsg( QString( "Stored auth config/methods:\n%1" ).arg( cfgmethods.join( ", " ) ) );
|
||||
}
|
||||
@ -1120,10 +1120,10 @@ bool QgsAuthManager::loadAuthenticationConfig( const QString &authcfg, QgsAuthMe
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QString( "Update of authcfg %1 FAILED for auth method %2" ).arg( authcfg ) .arg( authMethodKey ) );
|
||||
QgsDebugMsg( QString( "Update of authcfg %1 FAILED for auth method %2" ).arg( authcfg, authMethodKey ) );
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "Load %1 config SUCCESS for authcfg: %2" ).arg( full ? "full" : "base" ) .arg( authcfg ) );
|
||||
QgsDebugMsg( QString( "Load %1 config SUCCESS for authcfg: %2" ).arg( full ? "full" : "base", authcfg ) );
|
||||
return true;
|
||||
}
|
||||
if ( query.next() )
|
||||
@ -1815,7 +1815,7 @@ bool QgsAuthManager::storeSslCertCustomConfig( const QgsAuthConfigSslServer &con
|
||||
return false;
|
||||
|
||||
QgsDebugMsg( QString( "Store SSL cert custom config SUCCESS for host:port, id: %1, %2" )
|
||||
.arg( config.sslHostPort().trimmed() ).arg( id ) );
|
||||
.arg( config.sslHostPort().trimmed(), id ) );
|
||||
|
||||
updateIgnoredSslErrorsCacheFromConfig( config );
|
||||
|
||||
@ -1849,13 +1849,13 @@ const QgsAuthConfigSslServer QgsAuthManager::getSslCertCustomConfig( const QStri
|
||||
config.setSslCertificate( QSslCertificate( query.value( 2 ).toByteArray(), QSsl::Pem ) );
|
||||
config.setSslHostPort( query.value( 1 ).toString().trimmed() );
|
||||
config.loadConfigString( query.value( 3 ).toString() );
|
||||
QgsDebugMsg( QString( "SSL cert custom config retrieved for host:port, id: %1, %2" ).arg( hostport ).arg( id ) );
|
||||
QgsDebugMsg( QString( "SSL cert custom config retrieved for host:port, id: %1, %2" ).arg( hostport, id ) );
|
||||
}
|
||||
if ( query.next() )
|
||||
{
|
||||
QgsDebugMsg( QString( "Select contains more than one SSL cert custom config for host:port, id: %1, %2" ).arg( hostport ).arg( id ) );
|
||||
QgsDebugMsg( QString( "Select contains more than one SSL cert custom config for host:port, id: %1, %2" ).arg( hostport, id ) );
|
||||
emit messageOut( tr( "Authentication database contains duplicate SSL cert custom configs for host:port, id: %1, %2" )
|
||||
.arg( hostport ).arg( id ), authManTag(), WARNING );
|
||||
.arg( hostport, id ), authManTag(), WARNING );
|
||||
QgsAuthConfigSslServer emptyconfig;
|
||||
return emptyconfig;
|
||||
}
|
||||
@ -1952,14 +1952,14 @@ bool QgsAuthManager::existsSslCertCustomConfig( const QString &id , const QStrin
|
||||
{
|
||||
if ( query.first() )
|
||||
{
|
||||
QgsDebugMsg( QString( "SSL cert custom config exists for host:port, id: %1, %2" ).arg( hostport ).arg( id ) );
|
||||
QgsDebugMsg( QString( "SSL cert custom config exists for host:port, id: %1, %2" ).arg( hostport, id ) );
|
||||
res = true;
|
||||
}
|
||||
if ( query.next() )
|
||||
{
|
||||
QgsDebugMsg( QString( "Select contains more than one SSL cert custom config for host:port, id: %1, %2" ).arg( hostport ).arg( id ) );
|
||||
QgsDebugMsg( QString( "Select contains more than one SSL cert custom config for host:port, id: %1, %2" ).arg( hostport, id ) );
|
||||
emit messageOut( tr( "Authentication database contains duplicate SSL cert custom configs for host:port, id: %1, %2" )
|
||||
.arg( hostport ).arg( id ), authManTag(), WARNING );
|
||||
.arg( hostport, id ), authManTag(), WARNING );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1990,13 +1990,13 @@ bool QgsAuthManager::removeSslCertCustomConfig( const QString &id, const QString
|
||||
if ( !authDbCommit() )
|
||||
return false;
|
||||
|
||||
QString shahostport( QString( "%1:%2" ).arg( id ).arg( hostport ) );
|
||||
QString shahostport( QString( "%1:%2" ).arg( id, hostport ) );
|
||||
if ( mIgnoredSslErrorsCache.contains( shahostport ) )
|
||||
{
|
||||
mIgnoredSslErrorsCache.remove( shahostport );
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "REMOVED SSL cert custom config for host:port, id: %1, %2" ).arg( hostport ).arg( id ) );
|
||||
QgsDebugMsg( QString( "REMOVED SSL cert custom config for host:port, id: %1, %2" ).arg( hostport, id ) );
|
||||
dumpIgnoredSslErrorsCache_();
|
||||
return true;
|
||||
}
|
||||
@ -2014,7 +2014,7 @@ void QgsAuthManager::dumpIgnoredSslErrorsCache_()
|
||||
{
|
||||
errs << QgsAuthCertUtils::sslErrorEnumString( err );
|
||||
}
|
||||
QgsDebugMsg( QString( "%1 = %2" ).arg( i.key() ).arg( errs.join( ", " ) ) );
|
||||
QgsDebugMsg( QString( "%1 = %2" ).arg( i.key(), errs.join( ", " ) ) );
|
||||
++i;
|
||||
}
|
||||
}
|
||||
@ -2033,8 +2033,8 @@ bool QgsAuthManager::updateIgnoredSslErrorsCacheFromConfig( const QgsAuthConfigS
|
||||
}
|
||||
|
||||
QString shahostport( QString( "%1:%2" )
|
||||
.arg( QgsAuthCertUtils::shaHexForCert( config.sslCertificate() ).trimmed() )
|
||||
.arg( config.sslHostPort().trimmed() ) );
|
||||
.arg( QgsAuthCertUtils::shaHexForCert( config.sslCertificate() ).trimmed(),
|
||||
config.sslHostPort().trimmed() ) );
|
||||
if ( mIgnoredSslErrorsCache.contains( shahostport ) )
|
||||
{
|
||||
mIgnoredSslErrorsCache.remove( shahostport );
|
||||
@ -2114,8 +2114,8 @@ bool QgsAuthManager::rebuildIgnoredSslErrorCache()
|
||||
while ( query.next() )
|
||||
{
|
||||
QString shahostport( QString( "%1:%2" )
|
||||
.arg( query.value( 0 ).toString().trimmed() )
|
||||
.arg( query.value( 1 ).toString().trimmed() ) );
|
||||
.arg( query.value( 0 ).toString().trimmed(),
|
||||
query.value( 1 ).toString().trimmed() ) );
|
||||
QgsAuthConfigSslServer config;
|
||||
config.loadConfigString( query.value( 2 ).toString() );
|
||||
QList<QSslError::SslError> errenums( config.sslIgnoredErrorEnums() );
|
||||
@ -3231,9 +3231,9 @@ bool QgsAuthManager::authDbOpen() const
|
||||
if ( !authdb.open() )
|
||||
{
|
||||
QgsDebugMsg( QString( "Unable to establish database connection\nDatabase: %1\nDriver error: %2\nDatabase error: %3" )
|
||||
.arg( authenticationDbPath() )
|
||||
.arg( authdb.lastError().driverText() )
|
||||
.arg( authdb.lastError().databaseText() ) );
|
||||
.arg( authenticationDbPath(),
|
||||
authdb.lastError().driverText(),
|
||||
authdb.lastError().databaseText() ) );
|
||||
emit messageOut( tr( "Unable to establish authentication database connection" ), authManTag(), CRITICAL );
|
||||
return false;
|
||||
}
|
||||
@ -3258,8 +3258,8 @@ bool QgsAuthManager::authDbQuery( QSqlQuery *query ) const
|
||||
if ( query->lastError().isValid() )
|
||||
{
|
||||
QgsDebugMsg( QString( "Auth db query FAILED: %1\nError: %2" )
|
||||
.arg( query->executedQuery() )
|
||||
.arg( query->lastError().text() ) );
|
||||
.arg( query->executedQuery(),
|
||||
query->lastError().text() ) );
|
||||
emit messageOut( tr( "Auth db query FAILED" ), authManTag(), WARNING );
|
||||
return false;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ QgsAuthMethodRegistry::QgsAuthMethodRegistry( const QString& pluginPath )
|
||||
QLibrary myLib( fi.filePath() );
|
||||
if ( !myLib.load() )
|
||||
{
|
||||
QgsDebugMsg( QString( "Checking %1: ...invalid (lib not loadable): %2" ).arg( myLib.fileName() ).arg( myLib.errorString() ) );
|
||||
QgsDebugMsg( QString( "Checking %1: ...invalid (lib not loadable): %2" ).arg( myLib.fileName(), myLib.errorString() ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ QgsAuthMethod *QgsAuthMethodRegistry::authMethod( const QString &authMethodKey )
|
||||
QgsDebugMsg( "Auth method library name is " + myLib.fileName() );
|
||||
if ( !myLib.load() )
|
||||
{
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1: %2" ).arg( lib ).arg( myLib.errorString() ) );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1: %2" ).arg( lib, myLib.errorString() ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3351,7 +3351,7 @@ void QgsDxfExport::writePolyline( const QgsPolyline& line, const QString& layer,
|
||||
int n = line.size();
|
||||
if ( n == 0 )
|
||||
{
|
||||
QgsDebugMsg( QString( "writePolyline: empty line layer=%1 lineStyleName=%2" ).arg( layer ).arg( lineStyleName ) );
|
||||
QgsDebugMsg( QString( "writePolyline: empty line layer=%1 lineStyleName=%2" ).arg( layer, lineStyleName ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3360,7 +3360,7 @@ void QgsDxfExport::writePolyline( const QgsPolyline& line, const QString& layer,
|
||||
--n;
|
||||
if ( n < 2 )
|
||||
{
|
||||
QgsDebugMsg( QString( "writePolyline: line too short layer=%1 lineStyleName=%2" ).arg( layer ).arg( lineStyleName ) );
|
||||
QgsDebugMsg( QString( "writePolyline: line too short layer=%1 lineStyleName=%2" ).arg( layer, lineStyleName ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ bool QgsCompoundCurveV2::fromWkt( const QString& wkt )
|
||||
return false;
|
||||
mWkbType = parts.first;
|
||||
|
||||
QString defaultChildWkbType = QString( "LineString%1%2" ).arg( is3D() ? "Z" : "" ).arg( isMeasure() ? "M" : "" );
|
||||
QString defaultChildWkbType = QString( "LineString%1%2" ).arg( is3D() ? "Z" : "", isMeasure() ? "M" : "" );
|
||||
|
||||
Q_FOREACH ( const QString& childWkt, QgsGeometryUtils::wktGetChildBlocks( parts.second, defaultChildWkbType ) )
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ bool QgsCurvePolygonV2::fromWkt( const QString& wkt )
|
||||
return false;
|
||||
mWkbType = parts.first;
|
||||
|
||||
QString defaultChildWkbType = QString( "LineString%1%2" ).arg( is3D() ? "Z" : "" ).arg( isMeasure() ? "M" : "" );
|
||||
QString defaultChildWkbType = QString( "LineString%1%2" ).arg( is3D() ? "Z" : "", isMeasure() ? "M" : "" );
|
||||
|
||||
Q_FOREACH ( const QString& childWkt, QgsGeometryUtils::wktGetChildBlocks( parts.second, defaultChildWkbType ) )
|
||||
{
|
||||
|
@ -462,7 +462,7 @@ bool QgsGeometryCollectionV2::fromCollectionWkt( const QString &wkt, const QList
|
||||
return false;
|
||||
mWkbType = parts.first;
|
||||
|
||||
QString defChildWkbType = QString( "%1%2%3 " ).arg( defaultChildWkbType ).arg( is3D() ? "Z" : "" ).arg( isMeasure() ? "M" : "" );
|
||||
QString defChildWkbType = QString( "%1%2%3 " ).arg( defaultChildWkbType, is3D() ? "Z" : "", isMeasure() ? "M" : "" );
|
||||
|
||||
Q_FOREACH ( const QString& childWkt, QgsGeometryUtils::wktGetChildBlocks( parts.second, defChildWkbType ) )
|
||||
{
|
||||
|
@ -762,15 +762,15 @@ QString QgsApplication::showSettings()
|
||||
"SVG Search Paths:\t%8\n"
|
||||
"User DB Path:\t%9\n"
|
||||
"Auth DB Path:\t%10\n" )
|
||||
.arg( myEnvironmentVar )
|
||||
.arg( prefixPath() )
|
||||
.arg( pluginPath() )
|
||||
.arg( pkgDataPath() )
|
||||
.arg( themeName() )
|
||||
.arg( activeThemePath() )
|
||||
.arg( defaultThemePath() )
|
||||
.arg( svgPaths().join( tr( "\n\t\t", "match indentation of application state" ) ) )
|
||||
.arg( qgisMasterDbFilePath() )
|
||||
.arg( myEnvironmentVar,
|
||||
prefixPath(),
|
||||
pluginPath(),
|
||||
pkgDataPath(),
|
||||
themeName(),
|
||||
activeThemePath(),
|
||||
defaultThemePath(),
|
||||
svgPaths().join( tr( "\n\t\t", "match indentation of application state" ) ),
|
||||
qgisMasterDbFilePath() )
|
||||
.arg( qgisAuthDbFilePath() );
|
||||
return myState;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ QString QgsConditionalStyle::displayText() const
|
||||
if ( name().isEmpty() )
|
||||
return rule();
|
||||
else
|
||||
return QString( "%1 \n%2" ).arg( name() ).arg( rule() );
|
||||
return QString( "%1 \n%2" ).arg( name(), rule() );
|
||||
}
|
||||
|
||||
void QgsConditionalStyle::setSymbol( QgsSymbolV2* value )
|
||||
|
@ -144,8 +144,8 @@ bool QgsCoordinateReferenceSystem::createFromString( const QString &theDefinitio
|
||||
if ( srsid() == 0 )
|
||||
{
|
||||
QString myName = QString( " * %1 (%2)" )
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ) )
|
||||
.arg( toProj4() );
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ),
|
||||
toProj4() );
|
||||
saveAsUserCRS( myName );
|
||||
}
|
||||
}
|
||||
@ -198,7 +198,7 @@ void QgsCoordinateReferenceSystem::setupESRIWktFix()
|
||||
CPLSetConfigOption( "GDAL_FIX_ESRI_WKT", configNew );
|
||||
if ( strcmp( configNew, CPLGetConfigOption( "GDAL_FIX_ESRI_WKT", "" ) ) != 0 )
|
||||
QgsLogger::warning( QString( "GDAL_FIX_ESRI_WKT could not be set to %1 : %2" )
|
||||
.arg( configNew ).arg( CPLGetConfigOption( "GDAL_FIX_ESRI_WKT", "" ) ) );
|
||||
.arg( configNew, CPLGetConfigOption( "GDAL_FIX_ESRI_WKT", "" ) ) );
|
||||
QgsDebugMsg( QString( "set GDAL_FIX_ESRI_WKT : %1" ).arg( configNew ) );
|
||||
}
|
||||
else
|
||||
@ -458,8 +458,8 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt )
|
||||
if ( OSRAutoIdentifyEPSG( mCRS ) == OGRERR_NONE )
|
||||
{
|
||||
QString authid = QString( "%1:%2" )
|
||||
.arg( OSRGetAuthorityName( mCRS, NULL ) )
|
||||
.arg( OSRGetAuthorityCode( mCRS, NULL ) );
|
||||
.arg( OSRGetAuthorityName( mCRS, NULL ),
|
||||
OSRGetAuthorityCode( mCRS, NULL ) );
|
||||
QgsDebugMsg( "authid recognized as " + authid );
|
||||
return createFromOgcWmsCrs( authid );
|
||||
}
|
||||
@ -493,8 +493,8 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt )
|
||||
if ( mSrsId == 0 )
|
||||
{
|
||||
QString myName = QString( " * %1 (%2)" )
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ) )
|
||||
.arg( toProj4() );
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ),
|
||||
toProj4() );
|
||||
saveAsUserCRS( myName );
|
||||
}
|
||||
|
||||
@ -1039,8 +1039,8 @@ long QgsCoordinateReferenceSystem::findMatchingProj()
|
||||
// needed to populate the list
|
||||
QString mySql = QString( "select srs_id,parameters from tbl_srs where "
|
||||
"projection_acronym=%1 and ellipsoid_acronym=%2 order by deprecated" )
|
||||
.arg( quotedValue( mProjectionAcronym ) )
|
||||
.arg( quotedValue( mEllipsoidAcronym ) );
|
||||
.arg( quotedValue( mProjectionAcronym ),
|
||||
quotedValue( mEllipsoidAcronym ) );
|
||||
// Get the full path name to the sqlite3 spatial reference database.
|
||||
QString myDatabaseFileName = QgsApplication::srsDbFilePath();
|
||||
|
||||
@ -1250,8 +1250,8 @@ bool QgsCoordinateReferenceSystem::readXML( QDomNode & theNode )
|
||||
if ( mSrsId == 0 )
|
||||
{
|
||||
QString myName = QString( " * %1 (%2)" )
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ) )
|
||||
.arg( toProj4() );
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ),
|
||||
toProj4() );
|
||||
saveAsUserCRS( myName );
|
||||
}
|
||||
|
||||
@ -1499,8 +1499,8 @@ bool QgsCoordinateReferenceSystem::saveAsUserCRS( const QString& name )
|
||||
if ( myResult != SQLITE_OK )
|
||||
{
|
||||
QgsDebugMsg( QString( "Can't open or create database %1: %2" )
|
||||
.arg( QgsApplication::qgisUserDbFilePath() )
|
||||
.arg( sqlite3_errmsg( myDatabase ) ) );
|
||||
.arg( QgsApplication::qgisUserDbFilePath(),
|
||||
sqlite3_errmsg( myDatabase ) ) );
|
||||
return false;
|
||||
}
|
||||
QgsDebugMsg( QString( "Update or insert sql \n%1" ).arg( mySql ) );
|
||||
@ -1784,7 +1784,7 @@ int QgsCoordinateReferenceSystem::syncDb()
|
||||
else
|
||||
{
|
||||
updated++;
|
||||
QgsDebugMsgLevel( QString( "SQL: %1\n OLD:%2\n NEW:%3" ).arg( sql ).arg( srsProj4 ).arg( proj4 ), 3 );
|
||||
QgsDebugMsgLevel( QString( "SQL: %1\n OLD:%2\n NEW:%3" ).arg( sql, srsProj4, proj4 ), 3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1809,10 +1809,10 @@ int QgsCoordinateReferenceSystem::syncDb()
|
||||
name = QObject::tr( "Imported from GDAL" );
|
||||
|
||||
sql = QString( "INSERT INTO tbl_srs(description,projection_acronym,ellipsoid_acronym,parameters,srid,auth_name,auth_id,is_geo,deprecated) VALUES (%1,%2,%3,%4,%5,'EPSG',%5,%6,0)" )
|
||||
.arg( quotedValue( name ) )
|
||||
.arg( quotedValue( projRegExp.cap( 1 ) ) )
|
||||
.arg( quotedValue( ellps ) )
|
||||
.arg( quotedValue( proj4 ) )
|
||||
.arg( quotedValue( name ),
|
||||
quotedValue( projRegExp.cap( 1 ) ),
|
||||
quotedValue( ellps ),
|
||||
quotedValue( proj4 ) )
|
||||
.arg( it.key() )
|
||||
.arg( OSRIsGeographic( crs ) );
|
||||
|
||||
@ -1866,11 +1866,11 @@ int QgsCoordinateReferenceSystem::syncDb()
|
||||
const char *auth_id = ( const char * ) sqlite3_column_text( select, 1 );
|
||||
const char *params = ( const char * ) sqlite3_column_text( select, 2 );
|
||||
|
||||
QString input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toLower() ).arg( auth_id );
|
||||
QString input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toLower(), auth_id );
|
||||
projPJ pj = pj_init_plus( input.toAscii() );
|
||||
if ( !pj )
|
||||
{
|
||||
input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toUpper() ).arg( auth_id );
|
||||
input = QString( "+init=%1:%2" ).arg( QString( auth_name ).toUpper(), auth_id );
|
||||
pj = pj_init_plus( input.toAscii() );
|
||||
}
|
||||
|
||||
@ -1892,14 +1892,14 @@ int QgsCoordinateReferenceSystem::syncDb()
|
||||
if ( proj4 != params )
|
||||
{
|
||||
sql = QString( "UPDATE tbl_srs SET parameters=%1 WHERE auth_name=%2 AND auth_id=%3" )
|
||||
.arg( quotedValue( proj4 ) )
|
||||
.arg( quotedValue( auth_name ) )
|
||||
.arg( quotedValue( auth_id ) );
|
||||
.arg( quotedValue( proj4 ),
|
||||
quotedValue( auth_name ),
|
||||
quotedValue( auth_id ) );
|
||||
|
||||
if ( sqlite3_exec( database, sql.toUtf8(), 0, 0, &errMsg ) == SQLITE_OK )
|
||||
{
|
||||
updated++;
|
||||
QgsDebugMsgLevel( QString( "SQL: %1\n OLD:%2\n NEW:%3" ).arg( sql ).arg( params ).arg( proj4 ), 3 );
|
||||
QgsDebugMsgLevel( QString( "SQL: %1\n OLD:%2\n NEW:%3" ).arg( sql, params, proj4 ), 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -701,10 +701,10 @@ void QgsCoordinateTransform::transformCoords( const int& numPoints, double *x, d
|
||||
"%2"
|
||||
"PROJ.4: %3 +to %4\n"
|
||||
"Error: %5" )
|
||||
.arg( dir )
|
||||
.arg( points )
|
||||
.arg( srcdef ).arg( dstdef )
|
||||
.arg( QString::fromUtf8( pj_strerrno( projResult ) ) );
|
||||
.arg( dir,
|
||||
points,
|
||||
srcdef, dstdef,
|
||||
QString::fromUtf8( pj_strerrno( projResult ) ) );
|
||||
|
||||
pj_dalloc( srcdef );
|
||||
pj_dalloc( dstdef );
|
||||
|
@ -53,7 +53,7 @@ bool QgsCredentials::get( const QString& realm, QString &username, QString &pass
|
||||
QPair<QString, QString> credentials = mCredentialCache.take( realm );
|
||||
username = credentials.first;
|
||||
password = credentials.second;
|
||||
QgsDebugMsg( QString( "retrieved realm:%1 username:%2 password:%3" ).arg( realm ).arg( username ).arg( password ) );
|
||||
QgsDebugMsg( QString( "retrieved realm:%1 username:%2 password:%3" ).arg( realm, username, password ) );
|
||||
|
||||
if ( !password.isNull() )
|
||||
return true;
|
||||
@ -61,7 +61,7 @@ bool QgsCredentials::get( const QString& realm, QString &username, QString &pass
|
||||
|
||||
if ( request( realm, username, password, message ) )
|
||||
{
|
||||
QgsDebugMsg( QString( "requested realm:%1 username:%2 password:%3" ).arg( realm ).arg( username ).arg( password ) );
|
||||
QgsDebugMsg( QString( "requested realm:%1 username:%2 password:%3" ).arg( realm, username, password ) );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -73,7 +73,7 @@ bool QgsCredentials::get( const QString& realm, QString &username, QString &pass
|
||||
|
||||
void QgsCredentials::put( const QString& realm, const QString& username, const QString& password )
|
||||
{
|
||||
QgsDebugMsg( QString( "inserting realm:%1 username:%2 password:%3" ).arg( realm ).arg( username ).arg( password ) );
|
||||
QgsDebugMsg( QString( "inserting realm:%1 username:%2 password:%3" ).arg( realm, username, password ) );
|
||||
mCredentialCache.insert( realm, QPair<QString, QString>( username, password ) );
|
||||
}
|
||||
|
||||
|
@ -33,10 +33,10 @@ const QString QgsDartMeasurement::toString() const
|
||||
}
|
||||
|
||||
QString dashMessage = QString( "<%1 name=\"%2\" type=\"%3\">%4</%1>" )
|
||||
.arg( elementName )
|
||||
.arg( mName )
|
||||
.arg( typeToString( mType ) )
|
||||
.arg( mValue );
|
||||
.arg( elementName,
|
||||
mName,
|
||||
typeToString( mType ),
|
||||
mValue );
|
||||
return dashMessage;
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ QgsDataItem::QgsDataItem( QgsDataItem::Type type, QgsDataItem* parent, const QSt
|
||||
|
||||
QgsDataItem::~QgsDataItem()
|
||||
{
|
||||
QgsDebugMsgLevel( QString( "mName = %1 mPath = %2 mChildren.size() = %3" ).arg( mName ).arg( mPath ).arg( mChildren.size() ), 2 );
|
||||
QgsDebugMsgLevel( QString( "mName = %1 mPath = %2 mChildren.size() = %3" ).arg( mName, mPath ).arg( mChildren.size() ), 2 );
|
||||
Q_FOREACH ( QgsDataItem *child, mChildren )
|
||||
{
|
||||
if ( !child ) // should not happen
|
||||
@ -1293,7 +1293,7 @@ QVector<QgsDataItem*> QgsZipItem::createChildren()
|
||||
|
||||
mZipFileList.clear();
|
||||
|
||||
QgsDebugMsgLevel( QString( "mFilePath = %1 path = %2 name= %3 scanZipSetting= %4 vsiPrefix= %5" ).arg( mFilePath ).arg( path() ).arg( name() ).arg( scanZipSetting ).arg( mVsiPrefix ), 2 );
|
||||
QgsDebugMsgLevel( QString( "mFilePath = %1 path = %2 name= %3 scanZipSetting= %4 vsiPrefix= %5" ).arg( mFilePath, path(), name(), scanZipSetting, mVsiPrefix ), 2 );
|
||||
|
||||
// if scanZipBrowser == no: skip to the next file
|
||||
if ( scanZipSetting == "no" )
|
||||
@ -1332,7 +1332,7 @@ QVector<QgsDataItem*> QgsZipItem::createChildren()
|
||||
dataItem_t *dataItem = mDataItemPtr[i];
|
||||
if ( dataItem )
|
||||
{
|
||||
QgsDebugMsgLevel( QString( "trying to load item %1 with %2" ).arg( tmpPath ).arg( mProviderNames[i] ), 3 );
|
||||
QgsDebugMsgLevel( QString( "trying to load item %1 with %2" ).arg( tmpPath, mProviderNames[i] ), 3 );
|
||||
QgsDataItem * item = dataItem( tmpPath, this );
|
||||
if ( item )
|
||||
{
|
||||
@ -1370,7 +1370,7 @@ QgsDataItem* QgsZipItem::itemFromPath( QgsDataItem* parent, const QString& fileP
|
||||
QgsZipItem * zipItem = 0;
|
||||
bool populated = false;
|
||||
|
||||
QgsDebugMsgLevel( QString( "path = %1 name= %2 scanZipSetting= %3 vsiPrefix= %4" ).arg( path ).arg( name ).arg( scanZipSetting ).arg( vsiPrefix ), 3 );
|
||||
QgsDebugMsgLevel( QString( "path = %1 name= %2 scanZipSetting= %3 vsiPrefix= %4" ).arg( path, name, scanZipSetting, vsiPrefix ), 3 );
|
||||
|
||||
// don't scan if scanZipBrowser == no
|
||||
if ( scanZipSetting == "no" )
|
||||
@ -1400,11 +1400,11 @@ QgsDataItem* QgsZipItem::itemFromPath( QgsDataItem* parent, const QString& fileP
|
||||
{
|
||||
zipItem->populate( zipItem->createChildren() );
|
||||
populated = true; // there is no QgsDataItem::isPopulated() function
|
||||
QgsDebugMsgLevel( QString( "Got zipItem with %1 children, path=%2, name=%3" ).arg( zipItem->rowCount() ).arg( zipItem->path() ).arg( zipItem->name() ), 3 );
|
||||
QgsDebugMsgLevel( QString( "Got zipItem with %1 children, path=%2, name=%3" ).arg( zipItem->rowCount() ).arg( zipItem->path(), zipItem->name() ), 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsgLevel( QString( "Delaying populating zipItem with path=%1, name=%2" ).arg( zipItem->path() ).arg( zipItem->name() ), 3 );
|
||||
QgsDebugMsgLevel( QString( "Delaying populating zipItem with path=%1, name=%2" ).arg( zipItem->path(), zipItem->name() ), 3 );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1431,7 +1431,7 @@ QgsDataItem* QgsZipItem::itemFromPath( QgsDataItem* parent, const QString& fileP
|
||||
delete zipItem;
|
||||
}
|
||||
|
||||
QgsDebugMsgLevel( QString( "will try to create a normal dataItem from filePath= %2 or vsiPath = %3" ).arg( filePath ).arg( vsiPath ), 3 );
|
||||
QgsDebugMsgLevel( QString( "will try to create a normal dataItem from filePath= %2 or vsiPath = %3" ).arg( filePath, vsiPath ), 3 );
|
||||
|
||||
// try to open using registered providers (gdal and ogr)
|
||||
for ( int i = 0; i < mProviderNames.size(); i++ )
|
||||
@ -1467,7 +1467,7 @@ const QStringList &QgsZipItem::getZipFileList()
|
||||
QSettings settings;
|
||||
QString scanZipSetting = settings.value( "/qgis/scanZipInBrowser2", "basic" ).toString();
|
||||
|
||||
QgsDebugMsgLevel( QString( "mFilePath = %1 name= %2 scanZipSetting= %3 vsiPrefix= %4" ).arg( mFilePath ).arg( name() ).arg( scanZipSetting ).arg( mVsiPrefix ), 3 );
|
||||
QgsDebugMsgLevel( QString( "mFilePath = %1 name= %2 scanZipSetting= %3 vsiPrefix= %4" ).arg( mFilePath, name(), scanZipSetting, mVsiPrefix ), 3 );
|
||||
|
||||
// if scanZipBrowser == no: skip to the next file
|
||||
if ( scanZipSetting == "no" )
|
||||
|
@ -567,9 +567,9 @@ QString QgsDataSourceURI::uri( bool expandAuthConfig ) const
|
||||
columnName.replace( ")", "\\)" );
|
||||
|
||||
theUri += QString( " table=%1%2 sql=%3" )
|
||||
.arg( quotedTablename() )
|
||||
.arg( mGeometryColumn.isNull() ? QString() : QString( " (%1)" ).arg( columnName ) )
|
||||
.arg( mSql );
|
||||
.arg( quotedTablename(),
|
||||
mGeometryColumn.isNull() ? QString() : QString( " (%1)" ).arg( columnName ),
|
||||
mSql );
|
||||
|
||||
return theUri;
|
||||
}
|
||||
@ -608,8 +608,8 @@ QString QgsDataSourceURI::quotedTablename() const
|
||||
{
|
||||
if ( !mSchema.isEmpty() )
|
||||
return QString( "\"%1\".\"%2\"" )
|
||||
.arg( escape( mSchema, '"' ) )
|
||||
.arg( escape( mTable, '"' ) );
|
||||
.arg( escape( mSchema, '"' ),
|
||||
escape( mTable, '"' ) );
|
||||
else
|
||||
return QString( "\"%1\"" )
|
||||
.arg( escape( mTable, '"' ) );
|
||||
|
@ -231,8 +231,8 @@ bool QgsDistanceArea::setEllipsoid( const QString& ellipsoid )
|
||||
if ( destCRS.srsid() == 0 )
|
||||
{
|
||||
QString myName = QString( " * %1 (%2)" )
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ) )
|
||||
.arg( destCRS.toProj4() );
|
||||
.arg( QObject::tr( "Generated CRS", "A CRS automatically generated from layer info get this prefix for description" ),
|
||||
destCRS.toProj4() );
|
||||
destCRS.saveAsUserCRS( myName );
|
||||
}
|
||||
//
|
||||
@ -465,7 +465,7 @@ double QgsDistanceArea::measureLine( const QgsPoint &p1, const QgsPoint &p2 ) co
|
||||
{
|
||||
QgsPoint pp1 = p1, pp2 = p2;
|
||||
|
||||
QgsDebugMsgLevel( QString( "Measuring from %1 to %2" ).arg( p1.toString( 4 ) ).arg( p2.toString( 4 ) ), 3 );
|
||||
QgsDebugMsgLevel( QString( "Measuring from %1 to %2" ).arg( p1.toString( 4 ), p2.toString( 4 ) ), 3 );
|
||||
if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
|
||||
{
|
||||
QgsDebugMsgLevel( QString( "Ellipsoidal calculations is enabled, using ellipsoid %1" ).arg( mEllipsoid ), 4 );
|
||||
@ -473,7 +473,7 @@ double QgsDistanceArea::measureLine( const QgsPoint &p1, const QgsPoint &p2 ) co
|
||||
QgsDebugMsgLevel( QString( "To proj4 : %1" ).arg( mCoordTransform->destCRS().toProj4() ), 4 );
|
||||
pp1 = mCoordTransform->transform( p1 );
|
||||
pp2 = mCoordTransform->transform( p2 );
|
||||
QgsDebugMsgLevel( QString( "New points are %1 and %2, calculating..." ).arg( pp1.toString( 4 ) ).arg( pp2.toString( 4 ) ), 4 );
|
||||
QgsDebugMsgLevel( QString( "New points are %1 and %2, calculating..." ).arg( pp1.toString( 4 ), pp2.toString( 4 ) ), 4 );
|
||||
result = computeDistanceBearing( pp1, pp2 );
|
||||
}
|
||||
else
|
||||
|
@ -110,8 +110,8 @@ QString QgsError::message( QgsErrorMessage::Format theFormat ) const
|
||||
QString location = QString( "%1 : %2 : %3" ).arg( file ).arg( m.line() ).arg( m.function() );
|
||||
if ( !srcUrl.isEmpty() )
|
||||
{
|
||||
QString url = QString( "%1/%2#L%3" ).arg( srcUrl ).arg( file ).arg( m.line() );
|
||||
str += QString( "<br>(<a href='%1'>%2</a>)" ).arg( url ).arg( location );
|
||||
QString url = QString( "%1/%2#L%3" ).arg( srcUrl, file ).arg( m.line() );
|
||||
str += QString( "<br>(<a href='%1'>%2</a>)" ).arg( url, location );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -809,7 +809,7 @@ static QVariant fcnRegexpReplace( const QVariantList& values, const QgsExpressio
|
||||
QRegExp re( regexp );
|
||||
if ( !re.isValid() )
|
||||
{
|
||||
parent->setEvalErrorString( QObject::tr( "Invalid regular expression '%1': %2" ).arg( regexp ).arg( re.errorString() ) );
|
||||
parent->setEvalErrorString( QObject::tr( "Invalid regular expression '%1': %2" ).arg( regexp, re.errorString() ) );
|
||||
return QVariant();
|
||||
}
|
||||
return QVariant( str.replace( re, after ) );
|
||||
@ -823,7 +823,7 @@ static QVariant fcnRegexpMatch( const QVariantList& values, const QgsExpressionC
|
||||
QRegExp re( regexp );
|
||||
if ( !re.isValid() )
|
||||
{
|
||||
parent->setEvalErrorString( QObject::tr( "Invalid regular expression '%1': %2" ).arg( regexp ).arg( re.errorString() ) );
|
||||
parent->setEvalErrorString( QObject::tr( "Invalid regular expression '%1': %2" ).arg( regexp, re.errorString() ) );
|
||||
return QVariant();
|
||||
}
|
||||
return QVariant( str.contains( re ) ? 1 : 0 );
|
||||
@ -837,7 +837,7 @@ static QVariant fcnRegexpSubstr( const QVariantList& values, const QgsExpression
|
||||
QRegExp re( regexp );
|
||||
if ( !re.isValid() )
|
||||
{
|
||||
parent->setEvalErrorString( QObject::tr( "Invalid regular expression '%1': %2" ).arg( regexp ).arg( re.errorString() ) );
|
||||
parent->setEvalErrorString( QObject::tr( "Invalid regular expression '%1': %2" ).arg( regexp, re.errorString() ) );
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
@ -2795,7 +2795,7 @@ bool QgsExpression::NodeUnaryOperator::prepare( QgsExpression *parent, const Qgs
|
||||
|
||||
QString QgsExpression::NodeUnaryOperator::dump() const
|
||||
{
|
||||
return QString( "%1 %2" ).arg( UnaryOperatorText[mOp] ).arg( mOperand->dump() );
|
||||
return QString( "%1 %2" ).arg( UnaryOperatorText[mOp], mOperand->dump() );
|
||||
}
|
||||
|
||||
//
|
||||
@ -3150,7 +3150,7 @@ QString QgsExpression::NodeBinaryOperator::dump() const
|
||||
fmt += rOp && ( rOp->precedence() < precedence() ) ? "(%3)" : "%3";
|
||||
}
|
||||
|
||||
return fmt.arg( mOpLeft->dump() ).arg( BinaryOperatorText[mOp] ).arg( mOpRight->dump() );
|
||||
return fmt.arg( mOpLeft->dump(), BinaryOperatorText[mOp], mOpRight->dump() );
|
||||
}
|
||||
|
||||
//
|
||||
@ -3213,7 +3213,7 @@ bool QgsExpression::NodeInOperator::prepare( QgsExpression *parent, const QgsExp
|
||||
|
||||
QString QgsExpression::NodeInOperator::dump() const
|
||||
{
|
||||
return QString( "%1 %2 IN (%3)" ).arg( mNode->dump() ).arg( mNotIn ? "NOT" : "" ).arg( mList->dump() );
|
||||
return QString( "%1 %2 IN (%3)" ).arg( mNode->dump(), mNotIn ? "NOT" : "", mList->dump() );
|
||||
}
|
||||
|
||||
//
|
||||
@ -3271,9 +3271,9 @@ QString QgsExpression::NodeFunction::dump() const
|
||||
{
|
||||
Function* fd = Functions()[mFnIndex];
|
||||
if ( fd->params() == 0 )
|
||||
return QString( "%1%2" ).arg( fd->name() ).arg( fd->name().startsWith( '$' ) ? "" : "()" ); // special column
|
||||
return QString( "%1%2" ).arg( fd->name(), fd->name().startsWith( '$' ) ? "" : "()" ); // special column
|
||||
else
|
||||
return QString( "%1(%2)" ).arg( fd->name() ).arg( mArgs ? mArgs->dump() : QString() ); // function
|
||||
return QString( "%1(%2)" ).arg( fd->name(), mArgs ? mArgs->dump() : QString() ); // function
|
||||
}
|
||||
|
||||
QStringList QgsExpression::NodeFunction::referencedColumns() const
|
||||
@ -3324,7 +3324,7 @@ QString QgsExpression::NodeLiteral::dump() const
|
||||
case QVariant::Double: return QString::number( mValue.toDouble() );
|
||||
case QVariant::String: return quotedString( mValue.toString() );
|
||||
case QVariant::Bool: return mValue.toBool() ? "TRUE" : "FALSE";
|
||||
default: return tr( "[unsupported type;%1; value:%2]" ).arg( mValue.typeName() ).arg( mValue.toString() );
|
||||
default: return tr( "[unsupported type;%1; value:%2]" ).arg( mValue.typeName(), mValue.toString() );
|
||||
}
|
||||
}
|
||||
|
||||
@ -3418,7 +3418,7 @@ QString QgsExpression::NodeCondition::dump() const
|
||||
QString msg( "CASE" );
|
||||
Q_FOREACH ( WhenThen* cond, mConditions )
|
||||
{
|
||||
msg += QString( " WHEN %1 THEN %2" ).arg( cond->mWhenExp->dump() ).arg( cond->mThenExp->dump() );
|
||||
msg += QString( " WHEN %1 THEN %2" ).arg( cond->mWhenExp->dump(), cond->mThenExp->dump() );
|
||||
}
|
||||
if ( mElseExp )
|
||||
msg += QString( " ELSE %1" ).arg( mElseExp->dump() );
|
||||
@ -3476,14 +3476,14 @@ QString QgsExpression::helptext( QString name )
|
||||
#endif
|
||||
|
||||
QString helpContents( QString( "<h3>%1</h3>\n<div class=\"description\"><p>%2</p></div>" )
|
||||
.arg( tr( "%1 %2" ).arg( f.mType ).arg( name ) )
|
||||
.arg( f.mDescription ) );
|
||||
.arg( tr( "%1 %2" ).arg( f.mType, name ),
|
||||
f.mDescription ) );
|
||||
|
||||
Q_FOREACH ( const HelpVariant &v, f.mVariants )
|
||||
{
|
||||
if ( f.mVariants.size() > 1 )
|
||||
{
|
||||
helpContents += QString( "<h3>%1</h3>\n<div class=\"description\">%2</p></div>" ).arg( v.mName ).arg( v.mDescription );
|
||||
helpContents += QString( "<h3>%1</h3>\n<div class=\"description\">%2</p></div>" ).arg( v.mName, v.mDescription );
|
||||
}
|
||||
|
||||
if ( f.mType != tr( "group" ) )
|
||||
@ -3494,12 +3494,12 @@ QString QgsExpression::helptext( QString name )
|
||||
if ( v.mArguments.size() == 1 )
|
||||
{
|
||||
helpContents += QString( "<code><span class=\"functionname\">%1</span> <span class=\"argument\">%2</span></code>" )
|
||||
.arg( name ).arg( v.mArguments[0].mArg );
|
||||
.arg( name, v.mArguments[0].mArg );
|
||||
}
|
||||
else if ( v.mArguments.size() == 2 )
|
||||
{
|
||||
helpContents += QString( "<code><span class=\"argument\">%1</span> <span class=\"functionname\">%2</span> <span class=\"argument\">%3</span></code>" )
|
||||
.arg( v.mArguments[0].mArg ).arg( name ).arg( v.mArguments[1].mArg );
|
||||
.arg( v.mArguments[0].mArg, name, v.mArguments[1].mArg );
|
||||
}
|
||||
}
|
||||
else if ( f.mType != tr( "group" ) )
|
||||
@ -3539,7 +3539,7 @@ QString QgsExpression::helptext( QString name )
|
||||
if ( a.mSyntaxOnly )
|
||||
continue;
|
||||
|
||||
helpContents += QString( "<tr><td class=\"argument\">%1</td><td>%2</td></tr>" ).arg( a.mArg ).arg( a.mDescription );
|
||||
helpContents += QString( "<tr><td class=\"argument\">%1</td><td>%2</td></tr>" ).arg( a.mArg, a.mDescription );
|
||||
}
|
||||
|
||||
helpContents += "</table>\n</div>\n";
|
||||
@ -3564,7 +3564,7 @@ QString QgsExpression::helptext( QString name )
|
||||
|
||||
if ( !v.mNotes.isEmpty() )
|
||||
{
|
||||
helpContents += QString( "<h4>%1</h4>\n<div class=\"notes\"><p>%2</p></div>\n" ).arg( tr( "Notes" ) ).arg( v.mNotes );
|
||||
helpContents += QString( "<h4>%1</h4>\n<div class=\"notes\"><p>%2</p></div>\n" ).arg( tr( "Notes" ), v.mNotes );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ bool QgsFontUtils::loadStandardTestFonts( const QStringList& loadstyles )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
QString familyStyle = QString( "%1 %2" ).arg( fontFamily ).arg( fontstyle );
|
||||
QString familyStyle = QString( "%1 %2" ).arg( fontFamily, fontstyle );
|
||||
|
||||
if ( fontFamilyHasStyle( fontFamily, fontstyle ) )
|
||||
{
|
||||
@ -260,7 +260,7 @@ bool QgsFontUtils::loadStandardTestFonts( const QStringList& loadstyles )
|
||||
loaded = ( fontID != -1 );
|
||||
fontsLoaded = ( fontsLoaded || loaded );
|
||||
QgsDebugMsg( QString( "Test font '%1' %2 from filesystem [%3]" )
|
||||
.arg( familyStyle ).arg( loaded ? "loaded" : "FAILED to load" ).arg( fontPath ) );
|
||||
.arg( familyStyle, loaded ? "loaded" : "FAILED to load", fontPath ) );
|
||||
QFontDatabase db;
|
||||
QgsDebugMsg( QString( "font families in %1: %2" ).arg( fontID ).arg( db.applicationFontFamilies( fontID ).join( "," ) ) );
|
||||
}
|
||||
@ -274,7 +274,7 @@ bool QgsFontUtils::loadStandardTestFonts( const QStringList& loadstyles )
|
||||
fontsLoaded = ( fontsLoaded || loaded );
|
||||
}
|
||||
QgsDebugMsg( QString( "Test font '%1' %2 from testdata.qrc" )
|
||||
.arg( familyStyle ).arg( loaded ? "loaded" : "FAILED to load" ) );
|
||||
.arg( familyStyle, loaded ? "loaded" : "FAILED to load" ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ int QgsGml::getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectangl
|
||||
}
|
||||
else if ( !userName.isNull() || !password.isNull() )
|
||||
{
|
||||
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( userName ).arg( password ).toAscii().toBase64() );
|
||||
request.setRawHeader( "Authorization", "Basic " + QString( "%1:%2" ).arg( userName, password ).toAscii().toBase64() );
|
||||
}
|
||||
QNetworkReply* reply = QgsNetworkAccessManager::instance()->get( request );
|
||||
|
||||
|
@ -196,7 +196,7 @@ bool QgsGmlSchema::xsdFeatureClass( const QDomElement &element, const QString &
|
||||
else
|
||||
{
|
||||
// TODO: get type from referenced element
|
||||
QgsDebugMsg( QString( "field %1.%2 is referencing %3 - not supported" ).arg( typeName ).arg( fieldName ) );
|
||||
QgsDebugMsg( QString( "field %1.%2 is referencing %3 - not supported" ).arg( typeName, fieldName ) );
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@ -218,7 +218,7 @@ bool QgsGmlSchema::xsdFeatureClass( const QDomElement &element, const QString &
|
||||
QVariant::Type fieldType = QVariant::String;
|
||||
if ( fieldTypeName.isEmpty() )
|
||||
{
|
||||
QgsDebugMsg( QString( "Cannot get %1.%2 field type" ).arg( typeName ).arg( fieldName ) );
|
||||
QgsDebugMsg( QString( "Cannot get %1.%2 field type" ).arg( typeName, fieldName ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -361,7 +361,7 @@ void QgsGmlSchema::startElement( const XML_Char* el, const XML_Char** attr )
|
||||
mLevel++;
|
||||
|
||||
QString elementName = QString::fromUtf8( el );
|
||||
QgsDebugMsgLevel( QString( "-> %1 %2 %3" ).arg( mLevel ).arg( elementName ).arg( mLevel >= mSkipLevel ? "skip" : "" ), 5 );
|
||||
QgsDebugMsgLevel( QString( "-> %1 %2 %3" ).arg( mLevel ).arg( elementName, mLevel >= mSkipLevel ? "skip" : "" ), 5 );
|
||||
|
||||
if ( mLevel >= mSkipLevel )
|
||||
{
|
||||
|
@ -85,8 +85,8 @@ const QString QgsLegacyHelpers::convertEditType( QgsVectorLayer::EditType editTy
|
||||
editTypeElement.hasAttribute( "filterAttributeValue" ) )
|
||||
{
|
||||
filterExpression = QString( "\"%1\"='%2'" )
|
||||
.arg( editTypeElement.attribute( "filterAttributeColumn" ) )
|
||||
.arg( editTypeElement.attribute( "filterAttributeValue" ) );
|
||||
.arg( editTypeElement.attribute( "filterAttributeColumn" ),
|
||||
editTypeElement.attribute( "filterAttributeValue" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1046,7 +1046,7 @@ QString QgsMapLayer::loadDefaultStyle( bool & theResultFlag )
|
||||
|
||||
bool QgsMapLayer::loadNamedStyleFromDb( const QString &db, const QString &theURI, QString &qml )
|
||||
{
|
||||
QgsDebugMsg( QString( "db = %1 uri = %2" ).arg( db ).arg( theURI ) );
|
||||
QgsDebugMsg( QString( "db = %1 uri = %2" ).arg( db, theURI ) );
|
||||
|
||||
bool theResultFlag = false;
|
||||
|
||||
@ -1056,7 +1056,7 @@ bool QgsMapLayer::loadNamedStyleFromDb( const QString &db, const QString &theURI
|
||||
const char *myTail;
|
||||
int myResult;
|
||||
|
||||
QgsDebugMsg( QString( "Trying to load style for \"%1\" from \"%2\"" ).arg( theURI ).arg( db ) );
|
||||
QgsDebugMsg( QString( "Trying to load style for \"%1\" from \"%2\"" ).arg( theURI, db ) );
|
||||
|
||||
if ( db.isEmpty() || !QFile( db ).exists() )
|
||||
return false;
|
||||
@ -1091,7 +1091,7 @@ bool QgsMapLayer::loadNamedStyleFromDb( const QString &db, const QString &theURI
|
||||
|
||||
QString QgsMapLayer::loadNamedStyle( const QString &theURI, bool &theResultFlag )
|
||||
{
|
||||
QgsDebugMsg( QString( "uri = %1 myURI = %2" ).arg( theURI ).arg( publicSource() ) );
|
||||
QgsDebugMsg( QString( "uri = %1 myURI = %2" ).arg( theURI, publicSource() ) );
|
||||
|
||||
theResultFlag = false;
|
||||
|
||||
@ -1139,7 +1139,7 @@ QString QgsMapLayer::loadNamedStyle( const QString &theURI, bool &theResultFlag
|
||||
|
||||
theResultFlag = importNamedStyle( myDocument, myErrorMessage );
|
||||
if ( !theResultFlag )
|
||||
myErrorMessage = tr( "Loading style file %1 failed because:\n%2" ).arg( theURI ).arg( myErrorMessage );
|
||||
myErrorMessage = tr( "Loading style file %1 failed because:\n%2" ).arg( theURI, myErrorMessage );
|
||||
|
||||
return myErrorMessage;
|
||||
}
|
||||
@ -1524,7 +1524,7 @@ QString QgsMapLayer::loadSldStyle( const QString &theURI, bool &theResultFlag )
|
||||
theResultFlag = readSld( namedLayerElem, errorMsg );
|
||||
if ( !theResultFlag )
|
||||
{
|
||||
myErrorMessage = tr( "Loading style file %1 failed because:\n%2" ).arg( theURI ).arg( errorMsg );
|
||||
myErrorMessage = tr( "Loading style file %1 failed because:\n%2" ).arg( theURI, errorMsg );
|
||||
return myErrorMessage;
|
||||
}
|
||||
|
||||
|
@ -205,9 +205,9 @@ void QgsMapRenderer::adjustExtentToSize()
|
||||
dymax = mExtent.yMaximum() + whitespace;
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mapUnitsPerPixelX ) ).arg( qgsDoubleToString( mapUnitsPerPixelY ) ) );
|
||||
QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( myWidth ) ).arg( qgsDoubleToString( myHeight ) ) );
|
||||
QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() ) ).arg( qgsDoubleToString( mExtent.height() ) ) );
|
||||
QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mapUnitsPerPixelX ), qgsDoubleToString( mapUnitsPerPixelY ) ) );
|
||||
QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( myWidth ), qgsDoubleToString( myHeight ) ) );
|
||||
QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() ), qgsDoubleToString( mExtent.height() ) ) );
|
||||
QgsDebugMsg( mExtent.toString() );
|
||||
|
||||
// update extent
|
||||
@ -216,9 +216,9 @@ void QgsMapRenderer::adjustExtentToSize()
|
||||
mExtent.setYMinimum( dymin );
|
||||
mExtent.setYMaximum( dymax );
|
||||
|
||||
QgsDebugMsg( QString( "Adjusted map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() / myWidth ) ).arg( qgsDoubleToString( mExtent.height() / myHeight ) ) );
|
||||
QgsDebugMsg( QString( "Adjusted map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() / myWidth ), qgsDoubleToString( mExtent.height() / myHeight ) ) );
|
||||
|
||||
QgsDebugMsg( QString( "Recalced pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() / mMapUnitsPerPixel ) ).arg( qgsDoubleToString( mExtent.height() / mMapUnitsPerPixel ) ) );
|
||||
QgsDebugMsg( QString( "Recalced pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() / mMapUnitsPerPixel ), qgsDoubleToString( mExtent.height() / mMapUnitsPerPixel ) ) );
|
||||
|
||||
// update the scale
|
||||
updateScale();
|
||||
|
@ -183,12 +183,12 @@ void QgsMapSettings::updateDerived()
|
||||
}
|
||||
#endif
|
||||
|
||||
QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mapUnitsPerPixelX ) ).arg( qgsDoubleToString( mapUnitsPerPixelY ) ) );
|
||||
QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mSize.width() ) ).arg( qgsDoubleToString( mSize.height() ) ) );
|
||||
QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() ) ).arg( qgsDoubleToString( mExtent.height() ) ) );
|
||||
QgsDebugMsg( QString( "Map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mapUnitsPerPixelX ), qgsDoubleToString( mapUnitsPerPixelY ) ) );
|
||||
QgsDebugMsg( QString( "Pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mSize.width() ), qgsDoubleToString( mSize.height() ) ) );
|
||||
QgsDebugMsg( QString( "Extent dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mExtent.width() ), qgsDoubleToString( mExtent.height() ) ) );
|
||||
QgsDebugMsg( mExtent.toString() );
|
||||
QgsDebugMsg( QString( "Adjusted map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mVisibleExtent.width() / myWidth ) ).arg( qgsDoubleToString( mVisibleExtent.height() / myHeight ) ) );
|
||||
QgsDebugMsg( QString( "Recalced pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mVisibleExtent.width() / mMapUnitsPerPixel ) ).arg( qgsDoubleToString( mVisibleExtent.height() / mMapUnitsPerPixel ) ) );
|
||||
QgsDebugMsg( QString( "Adjusted map units per pixel (x,y) : %1, %2" ).arg( qgsDoubleToString( mVisibleExtent.width() / myWidth ), qgsDoubleToString( mVisibleExtent.height() / myHeight ) ) );
|
||||
QgsDebugMsg( QString( "Recalced pixmap dimensions (x,y) : %1, %2" ).arg( qgsDoubleToString( mVisibleExtent.width() / mMapUnitsPerPixel ), qgsDoubleToString( mVisibleExtent.height() / mMapUnitsPerPixel ) ) );
|
||||
QgsDebugMsg( QString( "Scale (assuming meters as map units) = 1:%1" ).arg( qgsDoubleToString( mScale ) ) );
|
||||
QgsDebugMsg( QString( "Rotation: %1 degrees" ).arg( mRotation ) );
|
||||
|
||||
|
@ -42,7 +42,7 @@ QgsMessageLog *QgsMessageLog::instance()
|
||||
|
||||
void QgsMessageLog::logMessage( const QString& message, const QString& tag, QgsMessageLog::MessageLevel level )
|
||||
{
|
||||
QgsDebugMsg( QString( "%1 %2[%3] %4" ).arg( QDateTime::currentDateTime().toString( Qt::ISODate ) ).arg( tag ).arg( level ).arg( message ) );
|
||||
QgsDebugMsg( QString( "%1 %2[%3] %4" ).arg( QDateTime::currentDateTime().toString( Qt::ISODate ), tag ).arg( level ).arg( message ) );
|
||||
|
||||
QgsMessageLog::instance()->emitMessage( message, tag, level );
|
||||
}
|
||||
|
@ -66,9 +66,9 @@ QgsMimeDataUtils::Uri::Uri( QString& encData )
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "type:%1 key:%2 name:%3 uri:%4 supportedCRS:%5 supportedFormats:%6" )
|
||||
.arg( layerType ).arg( providerKey ).arg( name ).arg( uri )
|
||||
.arg( supportedCrs.join( ", " ) )
|
||||
.arg( supportedFormats.join( ", " ) ) );
|
||||
.arg( layerType, providerKey, name, uri,
|
||||
supportedCrs.join( ", " ),
|
||||
supportedFormats.join( ", " ) ) );
|
||||
}
|
||||
|
||||
QString QgsMimeDataUtils::Uri::data() const
|
||||
|
@ -71,7 +71,7 @@ class QgsNetworkProxyFactory : public QNetworkProxyFactory
|
||||
{
|
||||
if ( url.startsWith( exclude ) )
|
||||
{
|
||||
QgsDebugMsg( QString( "using default proxy for %1 [exclude %2]" ).arg( url ).arg( exclude ) );
|
||||
QgsDebugMsg( QString( "using default proxy for %1 [exclude %2]" ).arg( url, exclude ) );
|
||||
return QList<QNetworkProxy>() << QNetworkProxy();
|
||||
}
|
||||
}
|
||||
@ -147,11 +147,11 @@ void QgsNetworkAccessManager::setFallbackProxyAndExcludes( const QNetworkProxy &
|
||||
proxy.type() == QNetworkProxy::HttpProxy ? "HttpProxy" :
|
||||
proxy.type() == QNetworkProxy::HttpCachingProxy ? "HttpCachingProxy" :
|
||||
proxy.type() == QNetworkProxy::FtpCachingProxy ? "FtpCachingProxy" :
|
||||
"Undefined" )
|
||||
.arg( proxy.hostName() )
|
||||
"Undefined",
|
||||
proxy.hostName() )
|
||||
.arg( proxy.port() )
|
||||
.arg( proxy.user() )
|
||||
.arg( proxy.password().isEmpty() ? "not set" : "set" ) );
|
||||
.arg( proxy.user(),
|
||||
proxy.password().isEmpty() ? "not set" : "set" ) );
|
||||
|
||||
mFallbackProxy = proxy;
|
||||
mExcludedURLs = excludes;
|
||||
@ -349,7 +349,7 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
|
||||
QgsDebugMsg( QString( "setting proxy %1 %2:%3 %4/%5" )
|
||||
.arg( proxyType )
|
||||
.arg( proxyHost ).arg( proxyPort )
|
||||
.arg( proxyUser ).arg( proxyPassword )
|
||||
.arg( proxyUser, proxyPassword )
|
||||
);
|
||||
proxy = QNetworkProxy( proxyType, proxyHost, proxyPort, proxyUser, proxyPassword );
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ void QgsNetworkContentFetcher::contentLoaded( bool ok )
|
||||
|
||||
if ( mReply->error() != QNetworkReply::NoError )
|
||||
{
|
||||
QgsMessageLog::logMessage( tr( "HTTP fetch %1 failed with error %2" ).arg( mReply->url().toString() ).arg( mReply->errorString() ) );
|
||||
QgsMessageLog::logMessage( tr( "HTTP fetch %1 failed with error %2" ).arg( mReply->url().toString(), mReply->errorString() ) );
|
||||
mContentLoaded = true;
|
||||
emit finished();
|
||||
return;
|
||||
@ -145,7 +145,7 @@ void QgsNetworkContentFetcher::contentLoaded( bool ok )
|
||||
QVariant status = mReply->attribute( QNetworkRequest::HttpStatusCodeAttribute );
|
||||
if ( !status.isNull() && status.toInt() >= 400 )
|
||||
{
|
||||
QgsMessageLog::logMessage( tr( "HTTP fetch %1 failed with error %2" ).arg( mReply->url().toString() ).arg( status.toString() ) );
|
||||
QgsMessageLog::logMessage( tr( "HTTP fetch %1 failed with error %2" ).arg( mReply->url().toString(), status.toString() ) );
|
||||
}
|
||||
mContentLoaded = true;
|
||||
emit finished();
|
||||
|
@ -484,10 +484,10 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit
|
||||
}
|
||||
else
|
||||
{
|
||||
showWarning( tr( "%1: Unknown data type %2. Not using type affinity for the field." ).arg( fields[idx].name() ).arg( QVariant::typeToName( type ) ) );
|
||||
showWarning( tr( "%1: Unknown data type %2. Not using type affinity for the field." ).arg( fields[idx].name(), QVariant::typeToName( type ) ) );
|
||||
}
|
||||
|
||||
sql += delim + QString( "'%1' %2" ).arg( fields[idx].name() ).arg( dataType );
|
||||
sql += delim + QString( "'%1' %2" ).arg( fields[idx].name(), dataType );
|
||||
delim = ",";
|
||||
}
|
||||
sql += ")";
|
||||
@ -544,8 +544,8 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit
|
||||
{
|
||||
// add new layer
|
||||
QgsVectorLayer* newLayer = new QgsVectorLayer( QString( "dbname='%1' table='%2'%3 sql=" )
|
||||
.arg( offlineDbPath )
|
||||
.arg( tableName ).arg( layer->hasGeometryType() ? "(Geometry)" : "" ),
|
||||
.arg( offlineDbPath,
|
||||
tableName, layer->hasGeometryType() ? "(Geometry)" : "" ),
|
||||
layer->name() + " (offline)", "spatialite" );
|
||||
if ( newLayer->isValid() )
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ QgsGeometry* QgsOgcUtils::geometryFromGML( const QDomNode& geometryNode )
|
||||
QgsGeometry* QgsOgcUtils::geometryFromGML( const QString& xmlString )
|
||||
{
|
||||
// wrap the string into a root tag to have "gml" namespace (and also as a default namespace)
|
||||
QString xml = QString( "<tmp xmlns=\"%1\" xmlns:gml=\"%1\">%2</tmp>" ).arg( GML_NAMESPACE ).arg( xmlString );
|
||||
QString xml = QString( "<tmp xmlns=\"%1\" xmlns:gml=\"%1\">%2</tmp>" ).arg( GML_NAMESPACE, xmlString );
|
||||
QDomDocument doc;
|
||||
if ( !doc.setContent( xml, true ) )
|
||||
return 0;
|
||||
|
@ -2613,7 +2613,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont
|
||||
( *labelFeature )->setLabelText( labelText );
|
||||
|
||||
// store the label's calculated font for later use during painting
|
||||
QgsDebugMsgLevel( QString( "PAL font stored definedFont: %1, Style: %2" ).arg( labelFont.toString() ).arg( labelFont.styleName() ), 4 );
|
||||
QgsDebugMsgLevel( QString( "PAL font stored definedFont: %1, Style: %2" ).arg( labelFont.toString(), labelFont.styleName() ), 4 );
|
||||
lf->setDefinedFont( labelFont );
|
||||
|
||||
// TODO: only for placement which needs character info
|
||||
|
@ -136,7 +136,7 @@ QString QgsPoint::toString( int thePrecision ) const
|
||||
{
|
||||
QString x = qIsFinite( m_x ) ? QString::number( m_x, 'f', thePrecision ) : QObject::tr( "infinite" );
|
||||
QString y = qIsFinite( m_y ) ? QString::number( m_y, 'f', thePrecision ) : QObject::tr( "infinite" );
|
||||
return QString( "%1,%2" ).arg( x ).arg( y );
|
||||
return QString( "%1,%2" ).arg( x, y );
|
||||
}
|
||||
|
||||
QString QgsPoint::toDegreesMinutesSeconds( int thePrecision, const bool useSuffix, const bool padded ) const
|
||||
@ -339,7 +339,7 @@ QString QgsPoint::toDegreesMinutes( int thePrecision, const bool useSuffix, cons
|
||||
|
||||
QString QgsPoint::wellKnownText() const
|
||||
{
|
||||
return QString( "POINT(%1 %2)" ).arg( qgsDoubleToString( m_x ) ).arg( qgsDoubleToString( m_y ) );
|
||||
return QString( "POINT(%1 %2)" ).arg( qgsDoubleToString( m_x ), qgsDoubleToString( m_y ) );
|
||||
}
|
||||
|
||||
double QgsPoint::sqrDist( double x, double y ) const
|
||||
|
@ -804,7 +804,7 @@ bool QgsProject::read()
|
||||
|
||||
imp_->file.close();
|
||||
|
||||
setError( tr( "%1 for file %2" ).arg( errorString ).arg( imp_->file.fileName() ) );
|
||||
setError( tr( "%1 for file %2" ).arg( errorString, imp_->file.fileName() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -32,12 +32,12 @@ void QgsPropertyValue::dump( int tabs ) const
|
||||
|
||||
for ( QStringList::const_iterator i = sl.begin(); i != sl.end(); ++i )
|
||||
{
|
||||
QgsDebugMsg( QString( "%1[%2] " ).arg( tabString ).arg( *i ) );
|
||||
QgsDebugMsg( QString( "%1[%2] " ).arg( tabString, *i ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QString( "%1%2" ).arg( tabString ).arg( value_.toString() ) );
|
||||
QgsDebugMsg( QString( "%1%2" ).arg( tabString, value_.toString() ) );
|
||||
}
|
||||
} // QgsPropertyValue::dump()
|
||||
|
||||
@ -293,7 +293,7 @@ void QgsPropertyKey::dump( int tabs ) const
|
||||
|
||||
tabString.fill( '\t', tabs );
|
||||
|
||||
QgsDebugMsg( QString( "%1name: %2" ).arg( tabString ).arg( name() ) );
|
||||
QgsDebugMsg( QString( "%1name: %2" ).arg( tabString, name() ) );
|
||||
|
||||
tabs++;
|
||||
tabString.fill( '\t', tabs );
|
||||
@ -309,20 +309,20 @@ void QgsPropertyKey::dump( int tabs ) const
|
||||
|
||||
if ( QVariant::StringList == propertyValue->value().type() )
|
||||
{
|
||||
QgsDebugMsg( QString( "%1key: <%2> value:" ).arg( tabString ).arg( i.key() ) );
|
||||
QgsDebugMsg( QString( "%1key: <%2> value:" ).arg( tabString, i.key() ) );
|
||||
propertyValue->dump( tabs + 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QString( "%1key: <%2> value: %3" ).arg( tabString ).arg( i.key() ).arg( propertyValue->value().toString() ) );
|
||||
QgsDebugMsg( QString( "%1key: <%2> value: %3" ).arg( tabString, i.key(), propertyValue->value().toString() ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QString( "%1key: <%2> subkey: <%3>" )
|
||||
.arg( tabString )
|
||||
.arg( i.key() )
|
||||
.arg( dynamic_cast<QgsPropertyKey*>( i.value() )->name() ) );
|
||||
.arg( tabString,
|
||||
i.key(),
|
||||
dynamic_cast<QgsPropertyKey*>( i.value() )->name() ) );
|
||||
i.value()->dump( tabs + 1 );
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ QgsProviderRegistry::QgsProviderRegistry( const QString& pluginPath )
|
||||
QLibrary myLib( fi.filePath() );
|
||||
if ( !myLib.load() )
|
||||
{
|
||||
QgsDebugMsg( QString( "Checking %1: ...invalid (lib not loadable): %2" ).arg( myLib.fileName() ).arg( myLib.errorString() ) );
|
||||
QgsDebugMsg( QString( "Checking %1: ...invalid (lib not loadable): %2" ).arg( myLib.fileName(), myLib.errorString() ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -369,7 +369,7 @@ QgsDataProvider *QgsProviderRegistry::provider( QString const & providerKey, QSt
|
||||
QgsDebugMsg( "Library name is " + myLib.fileName() );
|
||||
if ( !myLib.load() )
|
||||
{
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1: %2" ).arg( lib ).arg( myLib.errorString() ) );
|
||||
QgsMessageLog::logMessage( QObject::tr( "Failed to load %1: %2" ).arg( lib, myLib.errorString() ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -125,11 +125,11 @@ bool QgsRenderChecker::isKnownAnomaly( const QString& theDiffImageFile )
|
||||
QString myAnomalyHash = imageToHash( controlImagePath() + mControlName + "/" + myFile );
|
||||
QString myHashMessage = QString(
|
||||
"Checking if anomaly %1 (hash %2)<br>" )
|
||||
.arg( myFile )
|
||||
.arg( myAnomalyHash );
|
||||
.arg( myFile,
|
||||
myAnomalyHash );
|
||||
myHashMessage += QString( " matches %1 (hash %2)" )
|
||||
.arg( theDiffImageFile )
|
||||
.arg( myImageHash );
|
||||
.arg( theDiffImageFile,
|
||||
myImageHash );
|
||||
//foo CDash
|
||||
emitDashMessage( "Anomaly check", QgsDartMeasurement::Text, myHashMessage );
|
||||
|
||||
@ -232,10 +232,10 @@ bool QgsRenderChecker::runTest( const QString& theTestName,
|
||||
|
||||
QTextStream stream( &wldFile );
|
||||
stream << QString( "%1\r\n0 \r\n0 \r\n%2\r\n%3\r\n%4\r\n" )
|
||||
.arg( qgsDoubleToString( mMapSettings.mapUnitsPerPixel() ) )
|
||||
.arg( qgsDoubleToString( -mMapSettings.mapUnitsPerPixel() ) )
|
||||
.arg( qgsDoubleToString( r.xMinimum() + mMapSettings.mapUnitsPerPixel() / 2.0 ) )
|
||||
.arg( qgsDoubleToString( r.yMaximum() - mMapSettings.mapUnitsPerPixel() / 2.0 ) );
|
||||
.arg( qgsDoubleToString( mMapSettings.mapUnitsPerPixel() ),
|
||||
qgsDoubleToString( -mMapSettings.mapUnitsPerPixel() ),
|
||||
qgsDoubleToString( r.xMinimum() + mMapSettings.mapUnitsPerPixel() / 2.0 ),
|
||||
qgsDoubleToString( r.yMaximum() - mMapSettings.mapUnitsPerPixel() / 2.0 ) );
|
||||
}
|
||||
|
||||
return compareImages( theTestName, theMismatchCount );
|
||||
@ -349,10 +349,10 @@ bool QgsRenderChecker::compareImages( const QString& theTestName,
|
||||
"</tr>"
|
||||
"</table>\n"
|
||||
"<script>\naddComparison(\"td-%1-%7\",\"file://%3\",\"file://%4\",%5,%6);\n</script>\n" )
|
||||
.arg( theTestName )
|
||||
.arg( myDiffImageFile )
|
||||
.arg( mRenderedImageFile )
|
||||
.arg( mExpectedImageFile )
|
||||
.arg( theTestName,
|
||||
myDiffImageFile,
|
||||
mRenderedImageFile,
|
||||
mExpectedImageFile )
|
||||
.arg( imgWidth ).arg( imgHeight )
|
||||
.arg( renderCounter++ );
|
||||
|
||||
|
@ -202,14 +202,14 @@ class CORE_EXPORT QgsRenderChecker
|
||||
|
||||
inline bool compareWkt( const QString& a, const QString& b, double tolerance = 0.000001 )
|
||||
{
|
||||
QgsDebugMsg( QString( "a:%1 b:%2 tol:%3" ).arg( a ).arg( b ).arg( tolerance ) );
|
||||
QgsDebugMsg( QString( "a:%1 b:%2 tol:%3" ).arg( a, b ).arg( tolerance ) );
|
||||
QRegExp re( "-?\\d+(?:\\.\\d+)?(?:[eE]\\d+)?" );
|
||||
|
||||
QString a0( a ), b0( b );
|
||||
a0.replace( re, "#" );
|
||||
b0.replace( re, "#" );
|
||||
|
||||
QgsDebugMsg( QString( "a0:%1 b0:%2" ).arg( a0 ).arg( b0 ) );
|
||||
QgsDebugMsg( QString( "a0:%1 b0:%2" ).arg( a0, b0 ) );
|
||||
|
||||
if ( a0 != b0 )
|
||||
return false;
|
||||
|
@ -36,7 +36,7 @@ bool QgsScaleUtils::saveScaleList( const QString &fileName, const QStringList &s
|
||||
QFile file( fileName );
|
||||
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
errorMessage = QString( "Cannot write file %1:\n%2." ).arg( fileName ).arg( file.errorString() );
|
||||
errorMessage = QString( "Cannot write file %1:\n%2." ).arg( fileName, file.errorString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ bool QgsScaleUtils::loadScaleList( const QString &fileName, QStringList &scales,
|
||||
QFile file( fileName );
|
||||
if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||
{
|
||||
errorMessage = QString( "Cannot read file %1:\n%2." ).arg( fileName ).arg( file.errorString() );
|
||||
errorMessage = QString( "Cannot read file %1:\n%2." ).arg( fileName, file.errorString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -252,8 +252,8 @@ bool QgsVectorDataProvider::supportedType( const QgsField &field ) const
|
||||
{
|
||||
int i;
|
||||
QgsDebugMsgLevel( QString( "field name = %1 type = %2 length = %3 precision = %4" )
|
||||
.arg( field.name() )
|
||||
.arg( QVariant::typeToName( field.type() ) )
|
||||
.arg( field.name(),
|
||||
QVariant::typeToName( field.type() ) )
|
||||
.arg( field.length() )
|
||||
.arg( field.precision() ), 2 );
|
||||
for ( i = 0; i < mNativeTypes.size(); i++ )
|
||||
|
@ -126,8 +126,8 @@ QgsVectorFileWriter::QgsVectorFileWriter(
|
||||
if ( !poDriver )
|
||||
{
|
||||
mErrorMessage = QObject::tr( "OGR driver for '%1' not found (OGR error: %2)" )
|
||||
.arg( driverName )
|
||||
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
|
||||
.arg( driverName,
|
||||
QString::fromUtf8( CPLGetLastErrorMsg() ) );
|
||||
mError = ErrDriverNotFound;
|
||||
return;
|
||||
}
|
||||
@ -439,8 +439,8 @@ QgsVectorFileWriter::QgsVectorFileWriter(
|
||||
{
|
||||
QgsDebugMsg( "error creating field " + attrField.name() );
|
||||
mErrorMessage = QObject::tr( "creation of field %1 failed (OGR error: %2)" )
|
||||
.arg( attrField.name() )
|
||||
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
|
||||
.arg( attrField.name(),
|
||||
QString::fromUtf8( CPLGetLastErrorMsg() ) );
|
||||
mError = ErrAttributeCreationFailed;
|
||||
OGR_Fld_Destroy( fld );
|
||||
return;
|
||||
@ -475,8 +475,8 @@ QgsVectorFileWriter::QgsVectorFileWriter(
|
||||
{
|
||||
QgsDebugMsg( "error creating field " + attrField.name() );
|
||||
mErrorMessage = QObject::tr( "created field %1 not found (OGR error: %2)" )
|
||||
.arg( attrField.name() )
|
||||
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
|
||||
.arg( attrField.name(),
|
||||
QString::fromUtf8( CPLGetLastErrorMsg() ) );
|
||||
mError = ErrAttributeCreationFailed;
|
||||
return;
|
||||
}
|
||||
@ -1713,8 +1713,8 @@ OGRFeatureH QgsVectorFileWriter::createFeature( QgsFeature& feature )
|
||||
mErrorMessage = QObject::tr( "Invalid variant type for field %1[%2]: received %3 with type %4" )
|
||||
.arg( mFields[fldIdx].name() )
|
||||
.arg( ogrField )
|
||||
.arg( attrValue.typeName() )
|
||||
.arg( attrValue.toString() );
|
||||
.arg( attrValue.typeName(),
|
||||
attrValue.toString() );
|
||||
QgsMessageLog::logMessage( mErrorMessage, QObject::tr( "OGR" ) );
|
||||
mError = ErrFeatureWriteFailed;
|
||||
return 0;
|
||||
@ -2123,7 +2123,7 @@ bool QgsVectorFileWriter::deleteShapeFile( const QString& theFileName )
|
||||
QFile f( dir.canonicalPath() + "/" + file );
|
||||
if ( !f.remove( ) )
|
||||
{
|
||||
QgsDebugMsg( QString( "Removing file %1 failed: %2" ).arg( file ).arg( f.errorString() ) );
|
||||
QgsDebugMsg( QString( "Removing file %1 failed: %2" ).arg( file, f.errorString() ) );
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
@ -3789,7 +3789,7 @@ QString QgsVectorLayer::metadata()
|
||||
}
|
||||
|
||||
myMetadata += tr( "xMin,yMin %1,%2 : xMax,yMax %3,%4" )
|
||||
.arg( xMin ).arg( yMin ).arg( xMax ).arg( yMax );
|
||||
.arg( xMin, yMin, xMax, yMax );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4049,7 +4049,7 @@ int QgsVectorLayer::listStylesInDatabase( QStringList &ids, QStringList &names,
|
||||
if ( !listStylesExternalMethod )
|
||||
{
|
||||
delete myLib;
|
||||
msgError = QObject::tr( "Provider %1 has no %2 method" ).arg( mProviderKey ).arg( "listStyles" );
|
||||
msgError = QObject::tr( "Provider %1 has no %2 method" ).arg( mProviderKey, "listStyles" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4070,7 +4070,7 @@ QString QgsVectorLayer::getStyleFromDatabase( const QString& styleId, QString &m
|
||||
if ( !getStyleByIdMethod )
|
||||
{
|
||||
delete myLib;
|
||||
msgError = QObject::tr( "Provider %1 has no %2 method" ).arg( mProviderKey ).arg( "getStyleById" );
|
||||
msgError = QObject::tr( "Provider %1 has no %2 method" ).arg( mProviderKey, "getStyleById" );
|
||||
return QObject::tr( "" );
|
||||
}
|
||||
|
||||
@ -4095,7 +4095,7 @@ void QgsVectorLayer::saveStyleToDatabase( const QString& name, const QString& de
|
||||
if ( !saveStyleExternalMethod )
|
||||
{
|
||||
delete myLib;
|
||||
msgError = QObject::tr( "Provider %1 has no %2 method" ).arg( mProviderKey ).arg( "saveStyle" );
|
||||
msgError = QObject::tr( "Provider %1 has no %2 method" ).arg( mProviderKey, "saveStyle" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -367,17 +367,17 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
|
||||
<< tr( "Provider: %1" ).arg( L->providerType() )
|
||||
<< tr( "Storage: %1" ).arg( L->storageType() )
|
||||
<< QString( "%1: name=%2 type=%3 typeName=%4 len=%5 precision=%6" )
|
||||
.arg( tr( "expected field" ) )
|
||||
.arg( oldField.name() )
|
||||
.arg( QVariant::typeToName( oldField.type() ) )
|
||||
.arg( oldField.typeName() )
|
||||
.arg( tr( "expected field" ),
|
||||
oldField.name(),
|
||||
QVariant::typeToName( oldField.type() ),
|
||||
oldField.typeName() )
|
||||
.arg( oldField.length() )
|
||||
.arg( oldField.precision() )
|
||||
<< QString( "%1: name=%2 type=%3 typeName=%4 len=%5 precision=%6" )
|
||||
.arg( tr( "retrieved field" ) )
|
||||
.arg( newField.name() )
|
||||
.arg( QVariant::typeToName( newField.type() ) )
|
||||
.arg( newField.typeName() )
|
||||
.arg( tr( "retrieved field" ),
|
||||
newField.name(),
|
||||
QVariant::typeToName( newField.type() ),
|
||||
newField.typeName() )
|
||||
.arg( newField.length() )
|
||||
.arg( newField.precision() );
|
||||
attributeChangesOk = false; // don't try attribute updates - they'll fail.
|
||||
|
@ -72,7 +72,7 @@ QgsVectorLayerImport::QgsVectorLayerImport( const QString &uri,
|
||||
{
|
||||
delete myLib;
|
||||
mError = ErrProviderUnsupportedFeature;
|
||||
mErrorMessage = QObject::tr( "Provider %1 has no %2 method" ).arg( providerKey ).arg( "createEmptyLayer" );
|
||||
mErrorMessage = QObject::tr( "Provider %1 has no %2 method" ).arg( providerKey, "createEmptyLayer" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -296,8 +296,8 @@ void QgsVectorLayerLabelProvider::drawLabel( QgsRenderContext& context, pal::Lab
|
||||
|
||||
//font
|
||||
QFont dFont = lf->definedFont();
|
||||
QgsDebugMsgLevel( QString( "PAL font tmpLyr: %1, Style: %2" ).arg( tmpLyr.textFont.toString() ).arg( tmpLyr.textFont.styleName() ), 4 );
|
||||
QgsDebugMsgLevel( QString( "PAL font definedFont: %1, Style: %2" ).arg( dFont.toString() ).arg( dFont.styleName() ), 4 );
|
||||
QgsDebugMsgLevel( QString( "PAL font tmpLyr: %1, Style: %2" ).arg( tmpLyr.textFont.toString(), tmpLyr.textFont.styleName() ), 4 );
|
||||
QgsDebugMsgLevel( QString( "PAL font definedFont: %1, Style: %2" ).arg( dFont.toString(), dFont.styleName() ), 4 );
|
||||
tmpLyr.textFont = dFont;
|
||||
|
||||
if ( tmpLyr.multilineAlign == QgsPalLayerSettings::MultiFollowPlacement )
|
||||
|
@ -48,7 +48,7 @@ bool QgsRasterChecker::runTest( const QString& theVerifiedKey, QString theVerifi
|
||||
QgsRasterDataProvider* verifiedProvider = ( QgsRasterDataProvider* ) QgsProviderRegistry::instance()->provider( theVerifiedKey, theVerifiedUri );
|
||||
if ( !verifiedProvider || !verifiedProvider->isValid() )
|
||||
{
|
||||
error( QString( "Cannot load provider %1 with URI: %2" ).arg( theVerifiedKey ).arg( theVerifiedUri ), mReport );
|
||||
error( QString( "Cannot load provider %1 with URI: %2" ).arg( theVerifiedKey, theVerifiedUri ), mReport );
|
||||
ok = false;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ bool QgsRasterChecker::runTest( const QString& theVerifiedKey, QString theVerifi
|
||||
QgsRasterDataProvider* expectedProvider = ( QgsRasterDataProvider* ) QgsProviderRegistry::instance()->provider( theExpectedKey, theExpectedUri );
|
||||
if ( !expectedProvider || !expectedProvider->isValid() )
|
||||
{
|
||||
error( QString( "Cannot load provider %1 with URI: %2" ).arg( theExpectedKey ).arg( theExpectedUri ), mReport );
|
||||
error( QString( "Cannot load provider %1 with URI: %2" ).arg( theExpectedKey, theExpectedUri ), mReport );
|
||||
ok = false;
|
||||
}
|
||||
|
||||
@ -130,9 +130,9 @@ bool QgsRasterChecker::runTest( const QString& theVerifiedKey, QString theVerifi
|
||||
|
||||
mReport += "<table><tr>";
|
||||
mReport += "<td>Data comparison</td>";
|
||||
mReport += QString( "<td style='%1 %2 border: 1px solid'>correct value</td>" ).arg( mCellStyle ).arg( mOkStyle );
|
||||
mReport += QString( "<td style='%1 %2 border: 1px solid'>correct value</td>" ).arg( mCellStyle, mOkStyle );
|
||||
mReport += "<td></td>";
|
||||
mReport += QString( "<td style='%1 %2 border: 1px solid'>wrong value<br>expected value</td></tr>" ).arg( mCellStyle ).arg( mErrStyle );
|
||||
mReport += QString( "<td style='%1 %2 border: 1px solid'>wrong value<br>expected value</td></tr>" ).arg( mCellStyle, mErrStyle );
|
||||
mReport += "</tr></table>";
|
||||
mReport += "<br>";
|
||||
|
||||
@ -171,7 +171,7 @@ bool QgsRasterChecker::runTest( const QString& theVerifiedKey, QString theVerifi
|
||||
allOk = false;
|
||||
valStr = QString( "%1<br>%2" ).arg( verifiedVal ).arg( expectedVal );
|
||||
}
|
||||
htmlTable += QString( "<td style='%1 %2'>%3</td>" ).arg( mCellStyle ).arg( cellOk ? mOkStyle : mErrStyle ).arg( valStr );
|
||||
htmlTable += QString( "<td style='%1 %2'>%3</td>" ).arg( mCellStyle, cellOk ? mOkStyle : mErrStyle, valStr );
|
||||
}
|
||||
htmlTable += "</tr>";
|
||||
}
|
||||
@ -231,8 +231,8 @@ void QgsRasterChecker::compare( const QString& theParamName, double verifiedVal,
|
||||
void QgsRasterChecker::compareRow( const QString& theParamName, const QString& verifiedVal, const QString& expectedVal, QString &theReport, bool theOk, const QString& theDifference, const QString& theTolerance )
|
||||
{
|
||||
theReport += "<tr>\n";
|
||||
theReport += QString( "<td style='%1'>%2</td><td style='%1 %3'>%4</td><td style='%1'>%5</td>\n" ).arg( mCellStyle ).arg( theParamName ).arg( theOk ? mOkStyle : mErrStyle ).arg( verifiedVal ).arg( expectedVal );
|
||||
theReport += QString( "<td style='%1'>%2</td>\n" ).arg( mCellStyle ).arg( theDifference );
|
||||
theReport += QString( "<td style='%1'>%2</td>\n" ).arg( mCellStyle ).arg( theTolerance );
|
||||
theReport += QString( "<td style='%1'>%2</td><td style='%1 %3'>%4</td><td style='%1'>%5</td>\n" ).arg( mCellStyle, theParamName, theOk ? mOkStyle : mErrStyle, verifiedVal, expectedVal );
|
||||
theReport += QString( "<td style='%1'>%2</td>\n" ).arg( mCellStyle, theDifference );
|
||||
theReport += QString( "<td style='%1'>%2</td>\n" ).arg( mCellStyle, theTolerance );
|
||||
theReport += "</tr>";
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ void QgsRasterLayer::setDataProvider( QString const & provider )
|
||||
if ( !mDataProvider->isValid() )
|
||||
{
|
||||
setError( mDataProvider->error() );
|
||||
appendError( ERR( tr( "Provider is not valid (provider: %1, URI: %2" ).arg( mProviderKey ).arg( mDataSource ) ) );
|
||||
appendError( ERR( tr( "Provider is not valid (provider: %1, URI: %2" ).arg( mProviderKey, mDataSource ) ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ bool QgsRasterPipe::connect( QVector<QgsRasterInterface*> theInterfaces )
|
||||
#ifdef QGISDEBUG
|
||||
const QgsRasterInterface &a = *theInterfaces[i];
|
||||
const QgsRasterInterface &b = *theInterfaces[i-1];
|
||||
QgsDebugMsg( QString( "cannot connect %1 to %2" ).arg( typeid( a ).name() ).arg( typeid( b ).name() ) );
|
||||
QgsDebugMsg( QString( "cannot connect %1 to %2" ).arg( typeid( a ).name(), typeid( b ).name() ) );
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
@ -230,9 +230,9 @@ QString QgsRasterRenderer::minMaxOriginLabel( int theOrigin )
|
||||
|
||||
label = QCoreApplication::translate( "QgsRasterRenderer", "%1 %2 of %3.",
|
||||
"min/max origin label in raster properties, where %1 - estimated/exact, %2 - values (min/max, stddev, etc.), %3 - extent" )
|
||||
.arg( est_exact )
|
||||
.arg( values )
|
||||
.arg( extent );
|
||||
.arg( est_exact,
|
||||
values,
|
||||
extent );
|
||||
return label;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ void QgsRendererCategoryV2::setRenderState( bool render )
|
||||
|
||||
QString QgsRendererCategoryV2::dump() const
|
||||
{
|
||||
return QString( "%1::%2::%3:%4\n" ).arg( mValue.toString() ).arg( mLabel ).arg( mSymbol->dump() ).arg( mRender );
|
||||
return QString( "%1::%2::%3:%4\n" ).arg( mValue.toString(), mLabel, mSymbol->dump() ).arg( mRender );
|
||||
}
|
||||
|
||||
void QgsRendererCategoryV2::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
|
||||
@ -130,15 +130,15 @@ void QgsRendererCategoryV2::toSld( QDomDocument &doc, QDomElement &element, QgsS
|
||||
|
||||
QDomElement descrElem = doc.createElement( "se:Description" );
|
||||
QDomElement titleElem = doc.createElement( "se:Title" );
|
||||
QString descrStr = QString( "%1 is '%2'" ).arg( attrName ).arg( mValue.toString() );
|
||||
QString descrStr = QString( "%1 is '%2'" ).arg( attrName, mValue.toString() );
|
||||
titleElem.appendChild( doc.createTextNode( !mLabel.isEmpty() ? mLabel : descrStr ) );
|
||||
descrElem.appendChild( titleElem );
|
||||
ruleElem.appendChild( descrElem );
|
||||
|
||||
// create the ogc:Filter for the range
|
||||
QString filterFunc = QString( "%1 = '%2'" )
|
||||
.arg( attrName.replace( "\"", "\"\"" ) )
|
||||
.arg( mValue.toString().replace( "'", "''" ) );
|
||||
.arg( attrName.replace( "\"", "\"\"" ),
|
||||
mValue.toString().replace( "'", "''" ) );
|
||||
QgsSymbolLayerV2Utils::createFunctionElement( doc, ruleElem, filterFunc );
|
||||
|
||||
mSymbol->toSld( doc, ruleElem, props );
|
||||
|
@ -477,7 +477,7 @@ void QgsCptCityArchive::initArchives( bool loadAll )
|
||||
QgsCptCityArchive::initArchive( it.key(), it.value() );
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QString( "not loading archive [%1] because dir %2 does not exist " ).arg( it.key() ).arg( it.value() ) );
|
||||
QgsDebugMsg( QString( "not loading archive [%1] because dir %2 does not exist " ).arg( it.key(), it.value() ) );
|
||||
}
|
||||
}
|
||||
mDefaultArchiveName = defArchiveName;
|
||||
@ -959,7 +959,7 @@ QVector<QgsCptCityDataItem*> QgsCptCityDirectoryItem::createChildren()
|
||||
children << childItem;
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "name= %1 path= %2 found %3 children" ).arg( mName ).arg( mPath ).arg( children.count() ) );
|
||||
QgsDebugMsg( QString( "name= %1 path= %2 found %3 children" ).arg( mName, mPath ).arg( children.count() ) );
|
||||
|
||||
return children;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ void QgsEllipseSymbolLayerV2::writeSldMarker( QDomDocument &doc, QDomElement &el
|
||||
{
|
||||
// the symbol has an angle and the symbol layer have a rotation
|
||||
// property set
|
||||
angleFunc = QString( "%1 + %2" ).arg( angleFunc ).arg( ddRotation->useExpression() ? ddRotation->expressionString() : ddRotation->field() );
|
||||
angleFunc = QString( "%1 + %2" ).arg( angleFunc, ddRotation->useExpression() ? ddRotation->expressionString() : ddRotation->field() );
|
||||
}
|
||||
else if ( !qgsDoubleNear( mAngle, 0.0 ) )
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ void QgsRendererRangeV2::setRenderState( bool render )
|
||||
|
||||
QString QgsRendererRangeV2::dump() const
|
||||
{
|
||||
return QString( "%1 - %2::%3::%4\n" ).arg( mLowerValue ).arg( mUpperValue ).arg( mLabel ).arg( mSymbol.data() ? mSymbol->dump() : "(no symbol)" );
|
||||
return QString( "%1 - %2::%3::%4\n" ).arg( mLowerValue ).arg( mUpperValue ).arg( mLabel, mSymbol.data() ? mSymbol->dump() : "(no symbol)" );
|
||||
}
|
||||
|
||||
void QgsRendererRangeV2::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
|
||||
|
@ -151,7 +151,7 @@ QString QgsRuleBasedRendererV2::Rule::dump( int indent ) const
|
||||
QString symbolDump = ( mSymbol ? mSymbol->dump() : QString( "[]" ) );
|
||||
QString msg = off + QString( "RULE %1 - scale [%2,%3] - filter %4 - symbol %5\n" )
|
||||
.arg( mLabel ).arg( mScaleMinDenom ).arg( mScaleMaxDenom )
|
||||
.arg( mFilterExp ).arg( symbolDump );
|
||||
.arg( mFilterExp, symbolDump );
|
||||
|
||||
QStringList lst;
|
||||
Q_FOREACH ( Rule* rule, mChildren )
|
||||
@ -449,7 +449,7 @@ bool QgsRuleBasedRendererV2::Rule::startRender( QgsRenderContext& context, const
|
||||
filter = sf;
|
||||
}
|
||||
else if ( mFilterExp.trimmed().length() && sf.trimmed().length() )
|
||||
filter = QString( "(%1) AND (%2)" ).arg( mFilterExp ).arg( sf );
|
||||
filter = QString( "(%1) AND (%2)" ).arg( mFilterExp, sf );
|
||||
else if ( mFilterExp.trimmed().length() )
|
||||
filter = mFilterExp;
|
||||
else if ( !sf.length() )
|
||||
@ -1077,7 +1077,7 @@ void QgsRuleBasedRendererV2::refineRuleCategories( QgsRuleBasedRendererV2::Rule*
|
||||
value = QString::number( cat.value().toDouble(), 'f', 4 );
|
||||
else
|
||||
value = QgsExpression::quotedString( cat.value().toString() );
|
||||
QString filter = QString( "%1 = %2" ).arg( attr ).arg( value );
|
||||
QString filter = QString( "%1 = %2" ).arg( attr, value );
|
||||
QString label = filter;
|
||||
initialRule->appendChild( new Rule( cat.symbol()->clone(), 0, 0, filter, label ) );
|
||||
}
|
||||
@ -1105,10 +1105,9 @@ void QgsRuleBasedRendererV2::refineRuleRanges( QgsRuleBasedRendererV2::Rule* ini
|
||||
{
|
||||
// due to the loss of precision in double->string conversion we may miss out values at the limit of the range
|
||||
// TODO: have a possibility to construct expressions directly as a parse tree to avoid loss of precision
|
||||
QString filter = QString( "%1 %2 %3 AND %1 <= %4" ).arg( attr )
|
||||
.arg( firstRange ? ">=" : ">" )
|
||||
.arg( QString::number( rng.lowerValue(), 'f', 4 ) )
|
||||
.arg( QString::number( rng.upperValue(), 'f', 4 ) );
|
||||
QString filter = QString( "%1 %2 %3 AND %1 <= %4" ).arg( attr, firstRange ? ">=" : ">",
|
||||
QString::number( rng.lowerValue(), 'f', 4 ),
|
||||
QString::number( rng.upperValue(), 'f', 4 ) );
|
||||
firstRange = false;
|
||||
QString label = filter;
|
||||
initialRule->appendChild( new Rule( rng.symbol()->clone(), 0, 0, filter, label ) );
|
||||
|
@ -400,7 +400,7 @@ QByteArray QgsSvgCache::getImageData( const QString &path ) const
|
||||
|
||||
if ( reply->error() != QNetworkReply::NoError )
|
||||
{
|
||||
QgsMessageLog::logMessage( tr( "SVG request failed [error: %1 - url: %2]" ).arg( reply->errorString() ).arg( reply->url().toString() ), tr( "SVG" ) );
|
||||
QgsMessageLog::logMessage( tr( "SVG request failed [error: %1 - url: %2]" ).arg( reply->errorString(), reply->url().toString() ), tr( "SVG" ) );
|
||||
|
||||
reply->deleteLater();
|
||||
return QByteArray();
|
||||
|
@ -1779,7 +1779,7 @@ bool QgsSymbolLayerV2Utils::fillFromSld( QDomElement &element, Qt::BrushStyle &b
|
||||
QgsStringMap svgParams = getSvgParameterList( element );
|
||||
for ( QgsStringMap::iterator it = svgParams.begin(); it != svgParams.end(); ++it )
|
||||
{
|
||||
QgsDebugMsg( QString( "found SvgParameter %1: %2" ).arg( it.key() ).arg( it.value() ) );
|
||||
QgsDebugMsg( QString( "found SvgParameter %1: %2" ).arg( it.key(), it.value() ) );
|
||||
|
||||
if ( it.key() == "fill" )
|
||||
color = QColor( it.value() );
|
||||
@ -1918,7 +1918,7 @@ bool QgsSymbolLayerV2Utils::lineFromSld( QDomElement &element,
|
||||
QgsStringMap svgParams = getSvgParameterList( element );
|
||||
for ( QgsStringMap::iterator it = svgParams.begin(); it != svgParams.end(); ++it )
|
||||
{
|
||||
QgsDebugMsg( QString( "found SvgParameter %1: %2" ).arg( it.key() ).arg( it.value() ) );
|
||||
QgsDebugMsg( QString( "found SvgParameter %1: %2" ).arg( it.key(), it.value() ) );
|
||||
|
||||
if ( it.key() == "stroke" )
|
||||
{
|
||||
|
@ -321,8 +321,7 @@ void QgsDualView::previewColumnChanged( QObject* action )
|
||||
QMessageBox::warning( this,
|
||||
tr( "Could not set preview column" ),
|
||||
tr( "Could not set column '%1' as preview column.\nParser error:\n%2" )
|
||||
.arg( previewAction->text() )
|
||||
.arg( mFeatureList->parserErrorString() )
|
||||
.arg( previewAction->text(), mFeatureList->parserErrorString() )
|
||||
);
|
||||
}
|
||||
else
|
||||
|
@ -495,8 +495,8 @@ void QgsAuthCertInfo::populateInfoGeneralSection()
|
||||
if (( isissuer || isca ) && isselfsigned )
|
||||
{
|
||||
certype = QString( "%1 %2" )
|
||||
.arg( tr( "Root" ) )
|
||||
.arg( QgsAuthCertUtils::certificateUsageTypeString( QgsAuthCertUtils::CertAuthorityUsage ) );
|
||||
.arg( tr( "Root" ),
|
||||
QgsAuthCertUtils::certificateUsageTypeString( QgsAuthCertUtils::CertAuthorityUsage ) );
|
||||
}
|
||||
if ( isselfsigned )
|
||||
{
|
||||
@ -521,7 +521,7 @@ void QgsAuthCertInfo::populateInfoGeneralSection()
|
||||
QString alg( pubkey.algorithm() == QSsl::Rsa ? "RSA" : "DSA" );
|
||||
int bitsize( pubkey.length() );
|
||||
addFieldItem( mSecGeneral, tr( "Public key" ),
|
||||
QString( "%1, %2 bits" ).arg( alg ).arg( bitsize == -1 ? QString( "?" ) : QString::number( bitsize ) ),
|
||||
QString( "%1, %2 bits" ).arg( alg, bitsize == -1 ? QString( "?" ) : QString::number( bitsize ) ),
|
||||
LineEdit );
|
||||
addFieldItem( mSecGeneral, tr( "Signature algorithm" ),
|
||||
QgsAuthCertUtils::qcaSignatureAlgorithm( mCurrentACert.signatureAlgorithm() ),
|
||||
|
@ -123,6 +123,6 @@ const QString QgsAuthCertTrustPolicyComboBox::defaultTrustText( QgsAuthCertUtils
|
||||
}
|
||||
}
|
||||
return QString( "%1 (%2)" )
|
||||
.arg( QgsAuthCertUtils::getCertTrustName( QgsAuthCertUtils::DefaultTrust ) )
|
||||
.arg( QgsAuthCertUtils::getCertTrustName( defaultpolicy ) );
|
||||
.arg( QgsAuthCertUtils::getCertTrustName( QgsAuthCertUtils::DefaultTrust ),
|
||||
QgsAuthCertUtils::getCertTrustName( defaultpolicy ) );
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ void QgsAuthConfigEdit::loadConfig()
|
||||
if ( indx == -1 )
|
||||
{
|
||||
QgsDebugMsg( QString( "Loading FAILED for authcfg (%1): no edit widget loaded for auth method '%2'" )
|
||||
.arg( mAuthCfg ).arg( authMethodKey ) );
|
||||
.arg( mAuthCfg, authMethodKey ) );
|
||||
if ( cmbAuthMethods->count() > 0 )
|
||||
{
|
||||
cmbAuthMethods->setCurrentIndex( 0 );
|
||||
@ -201,7 +201,7 @@ void QgsAuthConfigEdit::loadConfig()
|
||||
if ( !editWidget )
|
||||
{
|
||||
QgsDebugMsg( QString( "Cast to edit widget FAILED for authcfg (%1) and auth method key (%2)" )
|
||||
.arg( mAuthCfg ).arg( authMethodKey ) );
|
||||
.arg( mAuthCfg, authMethodKey ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -49,17 +49,17 @@ QColor QgsAuthGuiUtils::yellowColor()
|
||||
|
||||
QString QgsAuthGuiUtils::greenTextStyleSheet( const QString &selector )
|
||||
{
|
||||
return QString( "%1{color: %2;}" ).arg( selector ).arg( QgsAuthGuiUtils::greenColor().name() );
|
||||
return QString( "%1{color: %2;}" ).arg( selector, QgsAuthGuiUtils::greenColor().name() );
|
||||
}
|
||||
|
||||
QString QgsAuthGuiUtils::orangeTextStyleSheet( const QString &selector )
|
||||
{
|
||||
return QString( "%1{color: %2;}" ).arg( selector ).arg( QgsAuthGuiUtils::orangeColor().name() );
|
||||
return QString( "%1{color: %2;}" ).arg( selector, QgsAuthGuiUtils::orangeColor().name() );
|
||||
}
|
||||
|
||||
QString QgsAuthGuiUtils::redTextStyleSheet( const QString &selector )
|
||||
{
|
||||
return QString( "%1{color: %2;}" ).arg( selector ).arg( QgsAuthGuiUtils::redColor().name() );
|
||||
return QString( "%1{color: %2;}" ).arg( selector, QgsAuthGuiUtils::redColor().name() );
|
||||
}
|
||||
|
||||
bool QgsAuthGuiUtils::isDisabled( QgsMessageBar *msgbar, int timeout )
|
||||
|
@ -301,7 +301,7 @@ bool QgsAuthImportIdentityDialog::validatePkiPaths()
|
||||
QDateTime startdate( clientcert.effectiveDate() );
|
||||
QDateTime enddate( clientcert.expiryDate() );
|
||||
|
||||
writeValidation( tr( "%1 thru %2" ).arg( startdate.toString() ).arg( enddate.toString() ),
|
||||
writeValidation( tr( "%1 thru %2" ).arg( startdate.toString(), enddate.toString() ),
|
||||
( isvalid ? Valid : Invalid ) );
|
||||
//TODO: set enabled on cert info button, relative to cert validity
|
||||
|
||||
@ -419,7 +419,7 @@ bool QgsAuthImportIdentityDialog::validatePkiPkcs12()
|
||||
QDateTime now( QDateTime::currentDateTime() );
|
||||
bool bundlevalid = ( now >= startdate && now <= enddate );
|
||||
|
||||
writeValidation( tr( "%1 thru %2" ).arg( startdate.toString() ).arg( enddate.toString() ),
|
||||
writeValidation( tr( "%1 thru %2" ).arg( startdate.toString(), enddate.toString() ),
|
||||
( bundlevalid ? Valid : Invalid ) );
|
||||
|
||||
if ( bundlevalid )
|
||||
|
@ -314,7 +314,7 @@ void QgsAuthServersEditor::on_btnRemoveServer_clicked()
|
||||
if ( !QgsAuthManager::instance()->existsSslCertCustomConfig( digest, hostport ) )
|
||||
{
|
||||
QgsDebugMsg( QString( "SSL custom config does not exist in database for host:port, id %1:" )
|
||||
.arg( hostport ).arg( digest ) );
|
||||
.arg( hostport, digest ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -332,7 +332,7 @@ void QgsAuthServersEditor::on_btnRemoveServer_clicked()
|
||||
if ( !QgsAuthManager::instance()->removeSslCertCustomConfig( digest, hostport ) )
|
||||
{
|
||||
messageBar()->pushMessage( tr( "ERROR removing SSL custom config from authentication database for host:port, id %1:" )
|
||||
.arg( hostport ).arg( digest ),
|
||||
.arg( hostport, digest ),
|
||||
QgsMessageBar::CRITICAL );
|
||||
return;
|
||||
}
|
||||
|
@ -69,8 +69,8 @@ QgsAuthSslErrorsDialog::QgsAuthSslErrorsDialog( QNetworkReply *reply,
|
||||
{
|
||||
saveButton()->setEnabled( false );
|
||||
|
||||
saveButton()->setText( QString( "%1 && %2" ).arg( saveButton()->text() )
|
||||
.arg( ignoreButton()->text() ) );
|
||||
saveButton()->setText( QString( "%1 && %2" ).arg( saveButton()->text(),
|
||||
ignoreButton()->text() ) );
|
||||
|
||||
grpbxSslConfig->setChecked( false );
|
||||
grpbxSslConfig->setCollapsed( true );
|
||||
@ -169,7 +169,7 @@ void QgsAuthSslErrorsDialog::on_buttonBox_clicked( QAbstractButton *button )
|
||||
{
|
||||
case QDialogButtonBox::Ignore:
|
||||
QgsAuthManager::instance()->updateIgnoredSslErrorsCache(
|
||||
QString( "%1:%2" ).arg( mDigest ).arg( mHostPort ),
|
||||
QString( "%1:%2" ).arg( mDigest, mHostPort ),
|
||||
mSslErrors );
|
||||
accept();
|
||||
break;
|
||||
@ -192,8 +192,8 @@ void QgsAuthSslErrorsDialog::populateErrorsList()
|
||||
Q_FOREACH ( const QSslError &err, mSslErrors )
|
||||
{
|
||||
errs << QString( "* %1: %2" )
|
||||
.arg( QgsAuthCertUtils::sslErrorEnumString( err.error() ) )
|
||||
.arg( err.errorString() );
|
||||
.arg( QgsAuthCertUtils::sslErrorEnumString( err.error() ),
|
||||
err.errorString() );
|
||||
}
|
||||
teSslErrors->setPlainText( errs.join( "\n" ) );
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user