mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Add QStringLiteral(), QStringLiteral( "" ) and QLatin1String( "" )
to banned keywords And replace use with QString()
This commit is contained in:
parent
07037ec44a
commit
e0fa9eb9cf
@ -793,7 +793,8 @@ void QgsDwgImporter::addLType( const DRW_LType &data )
|
||||
}
|
||||
}
|
||||
|
||||
QString typeName( data.name.c_str() ), dash( QLatin1String( "" ) );
|
||||
QString typeName( data.name.c_str() );
|
||||
QString dash;
|
||||
if ( !upath.empty() )
|
||||
{
|
||||
QStringList l;
|
||||
@ -866,9 +867,9 @@ QString QgsDwgImporter::linetypeString( const std::string &olinetype, const std:
|
||||
QString linetype( olinetype.c_str() );
|
||||
|
||||
if ( linetype == QLatin1String( "bylayer" ) )
|
||||
return mLayerLinetype.value( layer.c_str(), QLatin1String( "" ) );
|
||||
return mLayerLinetype.value( layer.c_str(), QString() );
|
||||
else
|
||||
return mLinetype.value( linetype, QLatin1String( "" ) );
|
||||
return mLinetype.value( linetype, QString() );
|
||||
}
|
||||
|
||||
void QgsDwgImporter::addLayer( const DRW_Layer &data )
|
||||
|
@ -760,11 +760,11 @@ void QgsGpsInformationWidget::displayGPSInformation( const QgsGpsInformation &in
|
||||
mTxtVacc->setEnabled( false );
|
||||
mTxtVacc->setText( tr( "Not available" ) );
|
||||
}
|
||||
mTxtFixMode->setText( info.fixMode == 'A' ? tr( "Automatic" ) : info.fixMode == 'M' ? tr( "Manual" ) : QLatin1String( "" ) ); // A=automatic 2d/3d, M=manual; allowing for anything else
|
||||
mTxtFixMode->setText( info.fixMode == 'A' ? tr( "Automatic" ) : info.fixMode == 'M' ? tr( "Manual" ) : QString() ); // A=automatic 2d/3d, M=manual; allowing for anything else
|
||||
mTxtFixType->setText( info.fixType == 3 ? tr( "3D" ) : info.fixType == 2 ? tr( "2D" ) : info.fixType == 1 ? tr( "No fix" ) : QString::number( info.fixType ) ); // 1=no fix, 2=2D, 3=3D; allowing for anything else
|
||||
mTxtQuality->setText( info.quality == 2 ? tr( "Differential" ) : info.quality == 1 ? tr( "Non-differential" ) : info.quality == 0 ? tr( "No position" ) : info.quality > 2 ? QString::number( info.quality ) : QLatin1String( "" ) ); // allowing for anything else
|
||||
mTxtQuality->setText( info.quality == 2 ? tr( "Differential" ) : info.quality == 1 ? tr( "Non-differential" ) : info.quality == 0 ? tr( "No position" ) : info.quality > 2 ? QString::number( info.quality ) : QString() ); // allowing for anything else
|
||||
mTxtSatellitesUsed->setText( QString::number( info.satellitesUsed ) );
|
||||
mTxtStatus->setText( info.status == 'A' ? tr( "Valid" ) : info.status == 'V' ? tr( "Invalid" ) : QLatin1String( "" ) );
|
||||
mTxtStatus->setText( info.status == 'A' ? tr( "Valid" ) : info.status == 'V' ? tr( "Invalid" ) : QString() );
|
||||
} //position
|
||||
|
||||
// Avoid refreshing / panning if we haven't moved
|
||||
|
@ -509,7 +509,7 @@ void QgsPluginManager::reloadModelData()
|
||||
|
||||
if ( !mCurrentlyDisplayedPlugin.isEmpty() )
|
||||
{
|
||||
wvDetails->setHtml( QLatin1String( "" ) );
|
||||
wvDetails->setHtml( QString() );
|
||||
buttonInstall->setEnabled( false );
|
||||
buttonUninstall->setEnabled( false );
|
||||
}
|
||||
@ -1161,12 +1161,12 @@ void QgsPluginManager::setCurrentTab( int idx )
|
||||
{
|
||||
case PLUGMAN_TAB_ALL:
|
||||
// all (statuses ends with Z are for spacers to always sort properly)
|
||||
acceptedStatuses << QStringLiteral( "installed" ) << QStringLiteral( "not installed" ) << QStringLiteral( "new" ) << QStringLiteral( "orphan" ) << QStringLiteral( "newer" ) << QStringLiteral( "upgradeable" ) << QStringLiteral( "not installedZ" ) << QStringLiteral( "installedZ" ) << QStringLiteral( "upgradeableZ" ) << QStringLiteral( "orphanZ" ) << QStringLiteral( "newerZZ" ) << QLatin1String( "" );
|
||||
acceptedStatuses << QStringLiteral( "installed" ) << QStringLiteral( "not installed" ) << QStringLiteral( "new" ) << QStringLiteral( "orphan" ) << QStringLiteral( "newer" ) << QStringLiteral( "upgradeable" ) << QStringLiteral( "not installedZ" ) << QStringLiteral( "installedZ" ) << QStringLiteral( "upgradeableZ" ) << QStringLiteral( "orphanZ" ) << QStringLiteral( "newerZZ" ) << QString();
|
||||
tabTitle = QStringLiteral( "all_plugins" );
|
||||
break;
|
||||
case PLUGMAN_TAB_INSTALLED:
|
||||
// installed (statuses ends with Z are for spacers to always sort properly)
|
||||
acceptedStatuses << QStringLiteral( "installed" ) << QStringLiteral( "orphan" ) << QStringLiteral( "newer" ) << QStringLiteral( "upgradeable" ) << QStringLiteral( "installedZ" ) << QStringLiteral( "upgradeableZ" ) << QStringLiteral( "orphanZ" ) << QStringLiteral( "newerZZ" ) << QLatin1String( "" );
|
||||
acceptedStatuses << QStringLiteral( "installed" ) << QStringLiteral( "orphan" ) << QStringLiteral( "newer" ) << QStringLiteral( "upgradeable" ) << QStringLiteral( "installedZ" ) << QStringLiteral( "upgradeableZ" ) << QStringLiteral( "orphanZ" ) << QStringLiteral( "newerZZ" ) << QString();
|
||||
tabTitle = QStringLiteral( "installed_plugins" );
|
||||
break;
|
||||
case PLUGMAN_TAB_NOT_INSTALLED:
|
||||
|
@ -6757,7 +6757,7 @@ void QgisApp::refreshFeatureActions()
|
||||
if ( !vlayer->isEditable() && action.isEnabledOnlyWhenEditable() )
|
||||
continue;
|
||||
|
||||
QString actionTitle = !action.shortTitle().isEmpty() ? action.shortTitle() : action.icon().isNull() ? action.name() : QStringLiteral( "" );
|
||||
QString actionTitle = !action.shortTitle().isEmpty() ? action.shortTitle() : action.icon().isNull() ? action.name() : QString();
|
||||
QAction *qAction = new QAction( action.icon(), actionTitle, mFeatureActionMenu );
|
||||
qAction->setData( QVariant::fromValue<QgsAction>( action ) );
|
||||
mFeatureActionMenu->addAction( qAction );
|
||||
@ -6853,7 +6853,7 @@ void QgisApp::labelingFontNotFound( QgsVectorLayer *vlayer, const QString &fontf
|
||||
act->setText( tr( "Open labeling dialog" ) );
|
||||
btnOpenPrefs->addAction( act );
|
||||
btnOpenPrefs->setDefaultAction( act );
|
||||
btnOpenPrefs->setToolTip( QLatin1String( "" ) );
|
||||
btnOpenPrefs->setToolTip( QString() );
|
||||
connect( btnOpenPrefs, &QToolButton::triggered, this, &QgisApp::labelingDialogFontNotFound );
|
||||
|
||||
// no timeout set, since notice needs attention and is only shown first time layer is labeled
|
||||
@ -9668,7 +9668,7 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *> &lyrList )
|
||||
tr( "Duplicate layer: " ),
|
||||
tr( "%1 (%2 type unsupported)" )
|
||||
.arg( selectedLyr->name(),
|
||||
!unSppType.isEmpty() ? QStringLiteral( "'" ) + unSppType + "' " : QLatin1String( "" ) ),
|
||||
!unSppType.isEmpty() ? QStringLiteral( "'" ) + unSppType + "' " : QString() ),
|
||||
Qgis::Warning,
|
||||
0,
|
||||
mInfoBar ) );
|
||||
@ -11105,7 +11105,7 @@ void QgisApp::closeProject()
|
||||
|
||||
mTrustedMacros = false;
|
||||
|
||||
mLegendExpressionFilterButton->setExpressionText( QLatin1String( "" ) );
|
||||
mLegendExpressionFilterButton->setExpressionText( QString() );
|
||||
mLegendExpressionFilterButton->setChecked( false );
|
||||
mActionFilterLegend->setChecked( false );
|
||||
|
||||
@ -13501,7 +13501,7 @@ void QgisApp::namProxyAuthenticationRequired( const QNetworkProxy &proxy, QAuthe
|
||||
if ( !settings.value( QStringLiteral( "proxy/proxyEnabled" ), false ).toBool() ||
|
||||
settings.value( QStringLiteral( "proxy/proxyType" ), "" ).toString() == QLatin1String( "DefaultProxy" ) )
|
||||
{
|
||||
auth->setUser( QLatin1String( "" ) );
|
||||
auth->setUser( QString() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ void QgsAttributeActionDialog::insertRow( int row, const QgsAction &action )
|
||||
|
||||
// Icon
|
||||
QIcon icon = action.icon();
|
||||
QTableWidgetItem *headerItem = new QTableWidgetItem( icon, QLatin1String( "" ) );
|
||||
QTableWidgetItem *headerItem = new QTableWidgetItem( icon, QString() );
|
||||
headerItem->setData( Qt::UserRole, action.iconPath() );
|
||||
mAttributeActionTable->setVerticalHeaderItem( row, headerItem );
|
||||
|
||||
@ -312,15 +312,15 @@ void QgsAttributeActionDialog::updateButtons()
|
||||
void QgsAttributeActionDialog::addDefaultActions()
|
||||
{
|
||||
int pos = 0;
|
||||
insertRow( pos++, QgsAction::Generic, tr( "Echo attribute's value" ), QStringLiteral( "echo \"[% \"MY_FIELD\" %]\"" ), QLatin1String( "" ), true, tr( "Attribute Value" ), QSet<QString>() << QStringLiteral( "Field" ), QString() );
|
||||
insertRow( pos++, QgsAction::Generic, tr( "Run an application" ), QStringLiteral( "ogr2ogr -f \"GPKG\" \"[% \"OUTPUT_PATH\" %]\" \"[% \"INPUT_FILE\" %]\"" ), QLatin1String( "" ), true, tr( "Run application" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Get feature id" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Feature id\", \"feature id is [% $id %]\")" ), QLatin1String( "" ), false, tr( "Feature ID" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Selected field's value (Identify features tool)" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Current field's value\", \"[% @current_field %]\")" ), QLatin1String( "" ), false, tr( "Field Value" ), QSet<QString>() << QStringLiteral( "Field" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Clicked coordinates (Run feature actions tool)" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Clicked coords\", \"layer: [% @layer_id %]\\ncoords: ([% @click_x %],[% @click_y %])\")" ), QLatin1String( "" ), false, tr( "Clicked Coordinate" ), QSet<QString>() << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::OpenUrl, tr( "Open file" ), QStringLiteral( "[% \"PATH\" %]" ), QLatin1String( "" ), false, tr( "Open file" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::OpenUrl, tr( "Search on web based on attribute's value" ), QStringLiteral( "http://www.google.com/search?q=[% \"ATTRIBUTE\" %]" ), QLatin1String( "" ), false, tr( "Search Web" ), QSet<QString>() << QStringLiteral( "Field" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "List feature ids" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nlayer = QgsProject.instance().mapLayer('[% @layer_id %]')\nif layer.selectedFeatureCount():\n ids = layer.selectedFeatureIds()\nelse:\n ids = [f.id() for f in layer.getFeatures()]\n\nQtWidgets.QMessageBox.information(None, \"Feature ids\", ', '.join([str(id) for id in ids]))" ), QLatin1String( "" ), false, tr( "List feature ids" ), QSet<QString>() << QStringLiteral( "Layer" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Duplicate selected features" ), QStringLiteral( "project = QgsProject.instance()\nlayer = QgsProject.instance().mapLayer('[% @layer_id %]')\nif not layer.isEditable():\n qgis.utils.iface.messageBar().pushMessage( 'Cannot duplicate feature in not editable mode on layer {layer}'.format( layer=layer.name() ) )\nelse:\n features=[]\n if len('[% $id %]')>0:\n features.append( layer.getFeature( [% $id %] ) )\n else:\n for x in layer.selectedFeatures():\n features.append( x )\n feature_count=0\n children_info=''\n featureids=[]\n for f in features:\n result=QgsVectorLayerUtils.duplicateFeature(layer, f, project, 0 )\n featureids.append( result[0].id() )\n feature_count+=1\n for ch_layer in result[1].layers():\n children_info+='{number_of_children} children on layer {children_layer}\\n'.format( number_of_children=str( len( result[1].duplicatedFeatures(ch_layer) ) ), children_layer=ch_layer.name() )\n ch_layer.selectByIds( result[1].duplicatedFeatures(ch_layer) )\n layer.selectByIds( featureids )\n qgis.utils.iface.messageBar().pushMessage( '{number_of_features} features on layer {layer} duplicated with\\n{children_info}'.format( number_of_features=str( feature_count ), layer=layer.name(), children_info=children_info ) )" ), QLatin1String( "" ), false, tr( "Duplicate selected" ), QSet<QString>() << QStringLiteral( "Layer" ), QString(), true );
|
||||
insertRow( pos++, QgsAction::Generic, tr( "Echo attribute's value" ), QStringLiteral( "echo \"[% \"MY_FIELD\" %]\"" ), QString(), true, tr( "Attribute Value" ), QSet<QString>() << QStringLiteral( "Field" ), QString() );
|
||||
insertRow( pos++, QgsAction::Generic, tr( "Run an application" ), QStringLiteral( "ogr2ogr -f \"GPKG\" \"[% \"OUTPUT_PATH\" %]\" \"[% \"INPUT_FILE\" %]\"" ), QString(), true, tr( "Run application" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Get feature id" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Feature id\", \"feature id is [% $id %]\")" ), QString(), false, tr( "Feature ID" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Selected field's value (Identify features tool)" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Current field's value\", \"[% @current_field %]\")" ), QString(), false, tr( "Field Value" ), QSet<QString>() << QStringLiteral( "Field" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Clicked coordinates (Run feature actions tool)" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Clicked coords\", \"layer: [% @layer_id %]\\ncoords: ([% @click_x %],[% @click_y %])\")" ), QString(), false, tr( "Clicked Coordinate" ), QSet<QString>() << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::OpenUrl, tr( "Open file" ), QStringLiteral( "[% \"PATH\" %]" ), QString(), false, tr( "Open file" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ), QString() );
|
||||
insertRow( pos++, QgsAction::OpenUrl, tr( "Search on web based on attribute's value" ), QStringLiteral( "http://www.google.com/search?q=[% \"ATTRIBUTE\" %]" ), QString(), false, tr( "Search Web" ), QSet<QString>() << QStringLiteral( "Field" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "List feature ids" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nlayer = QgsProject.instance().mapLayer('[% @layer_id %]')\nif layer.selectedFeatureCount():\n ids = layer.selectedFeatureIds()\nelse:\n ids = [f.id() for f in layer.getFeatures()]\n\nQtWidgets.QMessageBox.information(None, \"Feature ids\", ', '.join([str(id) for id in ids]))" ), QString(), false, tr( "List feature ids" ), QSet<QString>() << QStringLiteral( "Layer" ), QString() );
|
||||
insertRow( pos++, QgsAction::GenericPython, tr( "Duplicate selected features" ), QStringLiteral( "project = QgsProject.instance()\nlayer = QgsProject.instance().mapLayer('[% @layer_id %]')\nif not layer.isEditable():\n qgis.utils.iface.messageBar().pushMessage( 'Cannot duplicate feature in not editable mode on layer {layer}'.format( layer=layer.name() ) )\nelse:\n features=[]\n if len('[% $id %]')>0:\n features.append( layer.getFeature( [% $id %] ) )\n else:\n for x in layer.selectedFeatures():\n features.append( x )\n feature_count=0\n children_info=''\n featureids=[]\n for f in features:\n result=QgsVectorLayerUtils.duplicateFeature(layer, f, project, 0 )\n featureids.append( result[0].id() )\n feature_count+=1\n for ch_layer in result[1].layers():\n children_info+='{number_of_children} children on layer {children_layer}\\n'.format( number_of_children=str( len( result[1].duplicatedFeatures(ch_layer) ) ), children_layer=ch_layer.name() )\n ch_layer.selectByIds( result[1].duplicatedFeatures(ch_layer) )\n layer.selectByIds( featureids )\n qgis.utils.iface.messageBar().pushMessage( '{number_of_features} features on layer {layer} duplicated with\\n{children_info}'.format( number_of_features=str( feature_count ), layer=layer.name(), children_info=children_info ) )" ), QString(), false, tr( "Duplicate selected" ), QSet<QString>() << QStringLiteral( "Layer" ), QString(), true );
|
||||
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ void QgsBookmarks::addClicked()
|
||||
QgsMapCanvas *canvas = QgisApp::instance()->mapCanvas();
|
||||
Q_ASSERT( canvas );
|
||||
|
||||
QString projStr( QLatin1String( "" ) );
|
||||
QString projStr;
|
||||
if ( QgsProject::instance() )
|
||||
{
|
||||
if ( !QgsProject::instance()->title().isEmpty() )
|
||||
@ -165,7 +165,7 @@ void QgsBookmarks::addClicked()
|
||||
else if ( !QgsProject::instance()->fileName().isEmpty() )
|
||||
{
|
||||
QFileInfo fi( QgsProject::instance()->fileName() );
|
||||
projStr = fi.exists() ? fi.fileName() : QLatin1String( "" );
|
||||
projStr = fi.exists() ? fi.fileName() : QString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -344,7 +344,7 @@ QTreeWidgetItem *QgsCustomizationDialog::readWidgetsXmlNode( const QDomNode &nod
|
||||
{
|
||||
QDomElement myElement = node.toElement();
|
||||
|
||||
QString name = myElement.attribute( QStringLiteral( "objectName" ), QLatin1String( "" ) );
|
||||
QString name = myElement.attribute( QStringLiteral( "objectName" ), QString() );
|
||||
QStringList data( name );
|
||||
|
||||
data << myElement.attribute( QStringLiteral( "label" ), name );
|
||||
@ -353,7 +353,7 @@ QTreeWidgetItem *QgsCustomizationDialog::readWidgetsXmlNode( const QDomNode &nod
|
||||
|
||||
// It is nice to have icons for each Qt widget class, is it too heavy?
|
||||
// There are 47 png files, total 196K in qt/tools/designer/src/components/formeditor/images/
|
||||
QString iconName = myElement.attribute( QStringLiteral( "class" ), QLatin1String( "" ) ).toLower().mid( 1 ) + ".png";
|
||||
QString iconName = myElement.attribute( QStringLiteral( "class" ), QString() ).toLower().mid( 1 ) + ".png";
|
||||
QString iconPath = QgsApplication::iconPath( "/customization/" + iconName );
|
||||
QgsDebugMsg( "iconPath = " + iconPath );
|
||||
if ( QFile::exists( iconPath ) )
|
||||
|
@ -475,9 +475,9 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
|
||||
mMTextCheckBox->setChecked( QgsProject::instance()->readEntry( QStringLiteral( "dxf" ), QStringLiteral( "/lastDxfUseMText" ), settings.value( QStringLiteral( "qgis/lastDxfUseMText" ), "true" ).toString() ) != QLatin1String( "false" ) );
|
||||
|
||||
QStringList ids = QgsProject::instance()->mapThemeCollection()->mapThemes();
|
||||
ids.prepend( QLatin1String( "" ) );
|
||||
ids.prepend( QString() );
|
||||
mVisibilityPresets->addItems( ids );
|
||||
mVisibilityPresets->setCurrentIndex( mVisibilityPresets->findText( QgsProject::instance()->readEntry( QStringLiteral( "dxf" ), QStringLiteral( "/lastVisibliltyPreset" ), QLatin1String( "" ) ) ) );
|
||||
mVisibilityPresets->setCurrentIndex( mVisibilityPresets->findText( QgsProject::instance()->readEntry( QStringLiteral( "dxf" ), QStringLiteral( "/lastVisibliltyPreset" ), QString() ) ) );
|
||||
|
||||
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
|
||||
|
||||
|
@ -484,7 +484,7 @@ void QgsFieldCalculator::setOkButtonState()
|
||||
return;
|
||||
}
|
||||
|
||||
okButton->setToolTip( QLatin1String( "" ) );
|
||||
okButton->setToolTip( QString() );
|
||||
okButton->setEnabled( true );
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ QgsHandleBadLayers::QgsHandleBadLayers( const QList<QDomNode> &layers )
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new QTableWidgetItem( QLatin1String( "" ) );
|
||||
item = new QTableWidgetItem( QString() );
|
||||
mLayerList->setItem( j, 3, item );
|
||||
}
|
||||
|
||||
|
@ -526,7 +526,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsVectorLayer *vlayer, const QgsFeat
|
||||
|
||||
if ( vlayer->fields().size() > 0 )
|
||||
{
|
||||
QTreeWidgetItem *editItem = new QTreeWidgetItem( QStringList() << QLatin1String( "" ) << ( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ) ) );
|
||||
QTreeWidgetItem *editItem = new QTreeWidgetItem( QStringList() << QString() << ( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ) ) );
|
||||
editItem->setIcon( 0, QgsApplication::getThemeIcon( QStringLiteral( "/mActionFormView.svg" ) ) );
|
||||
editItem->setData( 0, Qt::UserRole, "edit" );
|
||||
actionItem->addChild( editItem );
|
||||
@ -540,7 +540,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsVectorLayer *vlayer, const QgsFeat
|
||||
if ( action.isEnabledOnlyWhenEditable() )
|
||||
continue;
|
||||
|
||||
QTreeWidgetItem *twi = new QTreeWidgetItem( QStringList() << QLatin1String( "" ) << action.name() );
|
||||
QTreeWidgetItem *twi = new QTreeWidgetItem( QStringList() << QString() << action.name() );
|
||||
twi->setIcon( 0, QgsApplication::getThemeIcon( QStringLiteral( "/mAction.svg" ) ) );
|
||||
twi->setData( 0, Qt::UserRole, "action" );
|
||||
twi->setData( 0, Qt::UserRole + 1, action.id() );
|
||||
@ -554,7 +554,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsVectorLayer *vlayer, const QgsFeat
|
||||
continue;
|
||||
|
||||
QgsMapLayerAction *action = registeredActions.at( i );
|
||||
QTreeWidgetItem *twi = new QTreeWidgetItem( QStringList() << QLatin1String( "" ) << action->text() );
|
||||
QTreeWidgetItem *twi = new QTreeWidgetItem( QStringList() << QString() << action->text() );
|
||||
twi->setIcon( 0, QgsApplication::getThemeIcon( QStringLiteral( "/mAction.svg" ) ) );
|
||||
twi->setData( 0, Qt::UserRole, "map_layer_action" );
|
||||
twi->setData( 0, Qt::UserRole + 1, qVariantFromValue( qobject_cast<QObject *>( action ) ) );
|
||||
@ -830,7 +830,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
|
||||
// Set/reset getFeatureInfoUrl (currently only available for Feature, so it may change if format changes)
|
||||
layItem->setData( 0, GetFeatureInfoUrlRole, params.value( QStringLiteral( "getFeatureInfoUrl" ) ) );
|
||||
|
||||
QgsIdentifyResultsFeatureItem *featItem = new QgsIdentifyResultsFeatureItem( fields, feature, layer->crs(), QStringList() << label << QLatin1String( "" ) );
|
||||
QgsIdentifyResultsFeatureItem *featItem = new QgsIdentifyResultsFeatureItem( fields, feature, layer->crs(), QStringList() << label << QString() );
|
||||
layItem->addChild( featItem );
|
||||
|
||||
// add feature attributes
|
||||
|
@ -83,18 +83,18 @@ void QgsLoadStyleFromDBDialog::initializeLists( const QStringList &ids, const QS
|
||||
|
||||
for ( int i = 0; i < sectionLimit; i++ )
|
||||
{
|
||||
QTableWidgetItem *item = new QTableWidgetItem( names.value( i, QLatin1String( "" ) ) );
|
||||
QTableWidgetItem *item = new QTableWidgetItem( names.value( i, QString() ) );
|
||||
item->setData( Qt::UserRole, ids[i] );
|
||||
mRelatedTable->setItem( i, 0, item );
|
||||
mRelatedTable->setItem( i, 1, new QTableWidgetItem( descriptions.value( i, QLatin1String( "" ) ) ) );
|
||||
mRelatedTable->setItem( i, 1, new QTableWidgetItem( descriptions.value( i, QString() ) ) );
|
||||
}
|
||||
for ( int i = sectionLimit; i < ids.count(); i++ )
|
||||
{
|
||||
int j = i - sectionLimit;
|
||||
QTableWidgetItem *item = new QTableWidgetItem( names.value( i, QLatin1String( "" ) ) );
|
||||
QTableWidgetItem *item = new QTableWidgetItem( names.value( i, QString() ) );
|
||||
item->setData( Qt::UserRole, ids[i] );
|
||||
mOthersTable->setItem( j, 0, item );
|
||||
mOthersTable->setItem( j, 1, new QTableWidgetItem( descriptions.value( i, QLatin1String( "" ) ) ) );
|
||||
mOthersTable->setItem( j, 1, new QTableWidgetItem( descriptions.value( i, QString() ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ QString QgsMapToolLabel::currentLabelText( int trunc )
|
||||
{
|
||||
if ( !mCurrentLabel.valid )
|
||||
{
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
QgsPalLayerSettings &labelSettings = mCurrentLabel.settings;
|
||||
|
||||
@ -155,7 +155,7 @@ QString QgsMapToolLabel::currentLabelText( int trunc )
|
||||
QgsVectorLayer *vlayer = mCurrentLabel.layer;
|
||||
if ( !vlayer )
|
||||
{
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString labelField = labelSettings.fieldName;
|
||||
@ -175,7 +175,7 @@ QString QgsMapToolLabel::currentLabelText( int trunc )
|
||||
}
|
||||
}
|
||||
}
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
void QgsMapToolLabel::currentAlignment( QString &hali, QString &vali )
|
||||
|
@ -56,7 +56,7 @@ QgsNewSpatialiteLayerDialog::QgsNewSpatialiteLayerDialog( QWidget *parent, Qt::W
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsNewSpatialiteLayerDialog::buttonBox_accepted );
|
||||
connect( buttonBox, &QDialogButtonBox::rejected, this, &QgsNewSpatialiteLayerDialog::buttonBox_rejected );
|
||||
|
||||
mGeometryTypeBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconTableLayer.svg" ) ), tr( "No geometry" ), QStringLiteral( "" ) );
|
||||
mGeometryTypeBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconTableLayer.svg" ) ), tr( "No geometry" ), QString() );
|
||||
mGeometryTypeBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconPointLayer.svg" ) ), tr( "Point" ), QStringLiteral( "POINT" ) );
|
||||
mGeometryTypeBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconLineLayer.svg" ) ), tr( "Line" ), QStringLiteral( "LINESTRING" ) );
|
||||
mGeometryTypeBox->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconPolygonLayer.svg" ) ), tr( "Polygon" ), QStringLiteral( "POLYGON" ) );
|
||||
@ -457,7 +457,7 @@ bool QgsNewSpatialiteLayerDialog::apply()
|
||||
QgsVectorLayer *layer = new QgsVectorLayer( QStringLiteral( "dbname='%1' table='%2'%3 sql=" )
|
||||
.arg( mDatabaseComboBox->currentText(),
|
||||
leLayerName->text(),
|
||||
mGeometryTypeBox->currentIndex() != 0 ? QStringLiteral( "(%1)" ).arg( leGeometryColumn->text() ) : QStringLiteral( "" ) ),
|
||||
mGeometryTypeBox->currentIndex() != 0 ? QStringLiteral( "(%1)" ).arg( leGeometryColumn->text() ) : QString() ),
|
||||
leLayerName->text(), QStringLiteral( "spatialite" ) );
|
||||
if ( layer->isValid() )
|
||||
{
|
||||
|
@ -423,13 +423,13 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
grpOWSServiceCapabilities->setChecked( QgsProject::instance()->readBoolEntry( QStringLiteral( "WMSServiceCapabilities" ), QStringLiteral( "/" ), false ) );
|
||||
mWMSTitle->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSServiceTitle" ), QStringLiteral( "/" ) ) );
|
||||
mWMSName->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSRootName" ), QStringLiteral( "/" ) ) );
|
||||
mWMSContactOrganization->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactOrganization" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMSContactPerson->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactPerson" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMSContactMail->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactMail" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMSContactPhone->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactPhone" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMSAbstract->setPlainText( QgsProject::instance()->readEntry( QStringLiteral( "WMSServiceAbstract" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMSOnlineResourceLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSOnlineResource" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSUrl" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMSContactOrganization->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactOrganization" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMSContactPerson->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactPerson" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMSContactMail->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactMail" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMSContactPhone->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSContactPhone" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMSAbstract->setPlainText( QgsProject::instance()->readEntry( QStringLiteral( "WMSServiceAbstract" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMSOnlineResourceLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSOnlineResource" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMSUrl" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMSKeywordList->setText( QgsProject::instance()->readListEntry( QStringLiteral( "WMSKeywordList" ), QStringLiteral( "/" ) ).join( QStringLiteral( ", " ) ) );
|
||||
|
||||
// WMS Name validator
|
||||
@ -437,8 +437,8 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
mWMSName->setValidator( shortNameValidator );
|
||||
|
||||
// WMS Contact Position
|
||||
QString contactPositionText = QgsProject::instance()->readEntry( QStringLiteral( "WMSContactPosition" ), QStringLiteral( "/" ), QLatin1String( "" ) );
|
||||
mWMSContactPositionCb->addItem( QLatin1String( "" ) );
|
||||
QString contactPositionText = QgsProject::instance()->readEntry( QStringLiteral( "WMSContactPosition" ), QStringLiteral( "/" ), QString() );
|
||||
mWMSContactPositionCb->addItem( QString() );
|
||||
mWMSContactPositionCb->addItem( tr( "Custodian" ), "custodian" );
|
||||
mWMSContactPositionCb->addItem( tr( "Owner" ), "owner" );
|
||||
mWMSContactPositionCb->addItem( tr( "User" ), "user" );
|
||||
@ -460,7 +460,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
}
|
||||
|
||||
// WMS Fees
|
||||
QString feesText = QgsProject::instance()->readEntry( QStringLiteral( "WMSFees" ), QStringLiteral( "/" ), QLatin1String( "" ) );
|
||||
QString feesText = QgsProject::instance()->readEntry( QStringLiteral( "WMSFees" ), QStringLiteral( "/" ), QString() );
|
||||
mWMSFeesCb->addItem( tr( "Conditions unknown" ), "conditions unknown" );
|
||||
mWMSFeesCb->addItem( tr( "No conditions apply" ), "no conditions apply" );
|
||||
int feesIndex = mWMSFeesCb->findData( feesText );
|
||||
@ -474,7 +474,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
}
|
||||
|
||||
// WMS Access Constraints
|
||||
QString accessConstraintsText = QgsProject::instance()->readEntry( QStringLiteral( "WMSAccessConstraints" ), QStringLiteral( "/" ), QLatin1String( "" ) );
|
||||
QString accessConstraintsText = QgsProject::instance()->readEntry( QStringLiteral( "WMSAccessConstraints" ), QStringLiteral( "/" ), QString() );
|
||||
mWMSAccessConstraintsCb->addItem( tr( "None" ), "None" );
|
||||
mWMSAccessConstraintsCb->addItem( tr( "Copyright" ), "copyright" );
|
||||
mWMSAccessConstraintsCb->addItem( tr( "Patent" ), "patent" );
|
||||
@ -533,30 +533,30 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
if ( addWMSInspire )
|
||||
{
|
||||
mWMSInspire->setChecked( addWMSInspire );
|
||||
QString inspireLanguage = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/language" ), QLatin1String( "" ) );
|
||||
QString inspireLanguage = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/language" ), QString() );
|
||||
int inspireLanguageIndex = mWMSInspireLanguage->findData( inspireLanguage );
|
||||
mWMSInspireLanguage->setCurrentIndex( inspireLanguageIndex );
|
||||
|
||||
QString inspireMetadataUrl = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataUrl" ), QLatin1String( "" ) );
|
||||
QString inspireMetadataUrl = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataUrl" ), QString() );
|
||||
if ( !inspireMetadataUrl.isEmpty() )
|
||||
{
|
||||
mWMSInspireScenario1->setChecked( true );
|
||||
mWMSInspireMetadataUrl->setText( inspireMetadataUrl );
|
||||
mWMSInspireMetadataUrlType->setCurrentIndex(
|
||||
mWMSInspireMetadataUrlType->findText(
|
||||
QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataUrlType" ), QLatin1String( "" ) )
|
||||
QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataUrlType" ), QString() )
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
QString inspireTemporalReference = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/temporalReference" ), QLatin1String( "" ) );
|
||||
QString inspireTemporalReference = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/temporalReference" ), QString() );
|
||||
if ( !inspireTemporalReference.isEmpty() )
|
||||
{
|
||||
mWMSInspireScenario2->setChecked( true );
|
||||
mWMSInspireTemporalReference->setDate( QDate::fromString( inspireTemporalReference, QStringLiteral( "yyyy-MM-dd" ) ) );
|
||||
}
|
||||
QString inspireMetadataDate = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataDate" ), QLatin1String( "" ) );
|
||||
QString inspireMetadataDate = QgsProject::instance()->readEntry( QStringLiteral( "WMSInspire" ), QStringLiteral( "/metadataDate" ), QString() );
|
||||
if ( !inspireMetadataDate.isEmpty() )
|
||||
{
|
||||
mWMSInspireScenario2->setChecked( true );
|
||||
@ -663,7 +663,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
mWMSImageQualitySpinBox->setValue( imageQuality );
|
||||
}
|
||||
|
||||
mWMTSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMTSUrl" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWMTSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WMTSUrl" ), QStringLiteral( "/" ), QString() ) );
|
||||
mWMTSMinScaleLineEdit->setValue( QgsProject::instance()->readNumEntry( QStringLiteral( "WMTSMinScale" ), QStringLiteral( "/" ), 5000 ) );
|
||||
|
||||
bool wmtsProject = QgsProject::instance()->readBoolEntry( QStringLiteral( "WMTSLayers" ), QStringLiteral( "Project" ) );
|
||||
@ -706,7 +706,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
}
|
||||
connect( twWmtsLayers, &QTreeWidget::itemChanged, this, &QgsProjectProperties::twWmtsItemChanged );
|
||||
|
||||
mWFSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WFSUrl" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWFSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WFSUrl" ), QStringLiteral( "/" ), QString() ) );
|
||||
QStringList wfsLayerIdList = QgsProject::instance()->readListEntry( QStringLiteral( "WFSLayers" ), QStringLiteral( "/" ) );
|
||||
QStringList wfstUpdateLayerIdList = QgsProject::instance()->readListEntry( QStringLiteral( "WFSTLayers" ), QStringLiteral( "Update" ) );
|
||||
QStringList wfstInsertLayerIdList = QgsProject::instance()->readListEntry( QStringLiteral( "WFSTLayers" ), QStringLiteral( "Insert" ) );
|
||||
@ -773,7 +773,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
twWFSLayers->setRowCount( j );
|
||||
twWFSLayers->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
|
||||
|
||||
mWCSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WCSUrl" ), QStringLiteral( "/" ), QLatin1String( "" ) ) );
|
||||
mWCSUrlLineEdit->setText( QgsProject::instance()->readEntry( QStringLiteral( "WCSUrl" ), QStringLiteral( "/" ), QString() ) );
|
||||
QStringList wcsLayerIdList = QgsProject::instance()->readListEntry( QStringLiteral( "WCSLayers" ), QStringLiteral( "/" ) );
|
||||
|
||||
QSignalMapper *smWcsPublied = new QSignalMapper( this );
|
||||
@ -1131,7 +1131,7 @@ void QgsProjectProperties::apply()
|
||||
QStringList keywordStringList = mWMSKeywordList->text().split( ',' );
|
||||
if ( !keywordStringList.isEmpty() )
|
||||
{
|
||||
keywordStringList.replaceInStrings( QRegExp( "^\\s+" ), QLatin1String( "" ) ).replaceInStrings( QRegExp( "\\s+$" ), QLatin1String( "" ) );
|
||||
keywordStringList.replaceInStrings( QRegExp( "^\\s+" ), QString() ).replaceInStrings( QRegExp( "\\s+$" ), QString() );
|
||||
QgsProject::instance()->writeEntry( QStringLiteral( "WMSKeywordList" ), QStringLiteral( "/" ), keywordStringList );
|
||||
}
|
||||
else
|
||||
@ -1886,17 +1886,17 @@ void QgsProjectProperties::populateStyles()
|
||||
QStringList prefList;
|
||||
QList<QComboBox *> cboList;
|
||||
cboList << cboStyleMarker;
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/Marker" ), QLatin1String( "" ) );
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/Marker" ), QString() );
|
||||
cboList << cboStyleLine;
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/Line" ), QLatin1String( "" ) );
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/Line" ), QString() );
|
||||
cboList << cboStyleFill;
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/Fill" ), QLatin1String( "" ) );
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/Fill" ), QString() );
|
||||
cboList << cboStyleColorRamp;
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/ColorRamp" ), QLatin1String( "" ) );
|
||||
prefList << QgsProject::instance()->readEntry( QStringLiteral( "DefaultStyles" ), QStringLiteral( "/ColorRamp" ), QString() );
|
||||
for ( int i = 0; i < cboList.count(); i++ )
|
||||
{
|
||||
cboList[i]->clear();
|
||||
cboList[i]->addItem( QLatin1String( "" ) );
|
||||
cboList[i]->addItem( QString() );
|
||||
}
|
||||
|
||||
// populate symbols
|
||||
@ -1999,13 +1999,13 @@ void QgsProjectProperties::editSymbol( QComboBox *cbo )
|
||||
QString symbolName = cbo->currentText();
|
||||
if ( symbolName.isEmpty() )
|
||||
{
|
||||
QMessageBox::information( this, QLatin1String( "" ), tr( "Select a valid symbol" ) );
|
||||
QMessageBox::information( this, QString(), tr( "Select a valid symbol" ) );
|
||||
return;
|
||||
}
|
||||
std::unique_ptr< QgsSymbol > symbol( mStyle->symbol( symbolName ) );
|
||||
if ( ! symbol )
|
||||
{
|
||||
QMessageBox::warning( this, QLatin1String( "" ), tr( "Invalid symbol : " ) + symbolName );
|
||||
QMessageBox::warning( this, QString(), tr( "Invalid symbol : " ) + symbolName );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2179,7 +2179,7 @@ void QgsProjectProperties::updateEllipsoidUI( int newIndex )
|
||||
leSemiMinor->clear();
|
||||
|
||||
cmbEllipsoid->setEnabled( mCrs.isValid() );
|
||||
cmbEllipsoid->setToolTip( QLatin1String( "" ) );
|
||||
cmbEllipsoid->setToolTip( QString() );
|
||||
if ( mEllipsoidList.at( mEllipsoidIndex ).acronym.startsWith( QLatin1String( "PARAMETER:" ) ) )
|
||||
{
|
||||
leSemiMajor->setEnabled( true );
|
||||
|
@ -120,7 +120,7 @@ QString QgsRasterCalcDialog::outputFormat() const
|
||||
int index = mOutputFormatComboBox->currentIndex();
|
||||
if ( index == -1 )
|
||||
{
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
return mOutputFormatComboBox->itemData( index ).toString();
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ void QgsRasterLayerProperties::sync()
|
||||
}
|
||||
else
|
||||
{
|
||||
leNoDataValue->insert( QLatin1String( "" ) );
|
||||
leNoDataValue->insert( QString() );
|
||||
}
|
||||
|
||||
mRefreshLayerCheckBox->setChecked( mRasterLayer->hasAutoRefreshEnabled() );
|
||||
|
@ -181,8 +181,8 @@ void QgsSettingsTree::updateChildItems( QTreeWidgetItem *parent )
|
||||
if ( childIndex != -1 )
|
||||
{
|
||||
child = childAt( parent, childIndex );
|
||||
child->setText( 1, QLatin1String( "" ) );
|
||||
child->setText( 2, QLatin1String( "" ) );
|
||||
child->setText( 1, QString() );
|
||||
child->setText( 2, QString() );
|
||||
child->setData( 2, Qt::UserRole, QVariant() );
|
||||
moveItemForward( parent, childIndex, dividerIndex );
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ QgsVariantDelegate::QgsVariantDelegate( QObject *parent )
|
||||
mByteArrayExp.setPattern( QStringLiteral( "[\\x00-\\xff]*" ) );
|
||||
mCharExp.setPattern( QStringLiteral( "." ) );
|
||||
mColorExp.setPattern( QStringLiteral( "\\(([0-9]*),([0-9]*),([0-9]*),([0-9]*)\\)" ) );
|
||||
mDoubleExp.setPattern( QLatin1String( "" ) );
|
||||
mDoubleExp.setPattern( QString() );
|
||||
mPointExp.setPattern( QStringLiteral( "\\((-?[0-9]*),(-?[0-9]*)\\)" ) );
|
||||
mRectExp.setPattern( QStringLiteral( "\\((-?[0-9]*),(-?[0-9]*),(-?[0-9]*),(-?[0-9]*)\\)" ) );
|
||||
mSignedIntegerExp.setPattern( QStringLiteral( "-?[0-9]*" ) );
|
||||
|
@ -970,7 +970,7 @@ void QgsVectorLayerProperties::saveDefaultStyle_clicked()
|
||||
case 0:
|
||||
return;
|
||||
case 2:
|
||||
mLayer->saveStyleToDatabase( QLatin1String( "" ), QLatin1String( "" ), true, QLatin1String( "" ), errorMsg );
|
||||
mLayer->saveStyleToDatabase( QString(), QString(), true, QString(), errorMsg );
|
||||
if ( errorMsg.isNull() )
|
||||
{
|
||||
return;
|
||||
|
@ -132,7 +132,7 @@ void QgsAuthPkiPathsEdit::clearConfig()
|
||||
void QgsAuthPkiPathsEdit::clearPkiMessage( QLineEdit *lineedit )
|
||||
{
|
||||
lineedit->clear();
|
||||
lineedit->setStyleSheet( QLatin1String( "" ) );
|
||||
lineedit->setStyleSheet( QString() );
|
||||
}
|
||||
|
||||
void QgsAuthPkiPathsEdit::writePkiMessage( QLineEdit *lineedit, const QString &msg, Validity valid )
|
||||
@ -160,20 +160,20 @@ void QgsAuthPkiPathsEdit::writePkiMessage( QLineEdit *lineedit, const QString &m
|
||||
void QgsAuthPkiPathsEdit::clearPkiPathsCertPath()
|
||||
{
|
||||
lePkiPathsCert->clear();
|
||||
lePkiPathsCert->setStyleSheet( QLatin1String( "" ) );
|
||||
lePkiPathsCert->setStyleSheet( QString() );
|
||||
}
|
||||
|
||||
void QgsAuthPkiPathsEdit::clearPkiPathsKeyPath()
|
||||
{
|
||||
lePkiPathsKey->clear();
|
||||
lePkiPathsKey->setStyleSheet( QLatin1String( "" ) );
|
||||
lePkiPathsKey->setStyleSheet( QString() );
|
||||
}
|
||||
|
||||
|
||||
void QgsAuthPkiPathsEdit::clearPkiPathsKeyPass()
|
||||
{
|
||||
lePkiPathsKeyPass->clear();
|
||||
lePkiPathsKeyPass->setStyleSheet( QLatin1String( "" ) );
|
||||
lePkiPathsKeyPass->setStyleSheet( QString() );
|
||||
chkPkiPathsPassShow->setChecked( false );
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ void QgsAuthPkcs12Edit::clearConfig()
|
||||
void QgsAuthPkcs12Edit::clearPkiMessage( QLineEdit *lineedit )
|
||||
{
|
||||
lineedit->clear();
|
||||
lineedit->setStyleSheet( QLatin1String( "" ) );
|
||||
lineedit->setStyleSheet( QString() );
|
||||
}
|
||||
|
||||
void QgsAuthPkcs12Edit::writePkiMessage( QLineEdit *lineedit, const QString &msg, Validity valid )
|
||||
@ -193,13 +193,13 @@ void QgsAuthPkcs12Edit::writePkiMessage( QLineEdit *lineedit, const QString &msg
|
||||
void QgsAuthPkcs12Edit::clearPkcs12BundlePath()
|
||||
{
|
||||
lePkcs12Bundle->clear();
|
||||
lePkcs12Bundle->setStyleSheet( QLatin1String( "" ) );
|
||||
lePkcs12Bundle->setStyleSheet( QString() );
|
||||
}
|
||||
|
||||
void QgsAuthPkcs12Edit::clearPkcs12BundlePass()
|
||||
{
|
||||
lePkcs12KeyPass->clear();
|
||||
lePkcs12KeyPass->setStyleSheet( QLatin1String( "" ) );
|
||||
lePkcs12KeyPass->setStyleSheet( QString() );
|
||||
lePkcs12KeyPass->setPlaceholderText( QStringLiteral( "Optional passphrase" ) );
|
||||
chkPkcs12PassShow->setChecked( false );
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ QgsPkiConfigBundle *QgsAuthPkcs12Method::getPkiConfigBundle( const QString &auth
|
||||
// !!! DON'T LEAVE THESE UNCOMMENTED !!!
|
||||
// QgsDebugMsg( QString( "PKI bundle key for authcfg: \n%1" ).arg( bundlelist.at( 1 ) ) );
|
||||
// QgsDebugMsg( QString( "PKI bundle key pass for authcfg: \n%1" )
|
||||
// .arg( !mconfig.config( QStringLiteral( "bundlepass" ) ).isNull() ? mconfig.config( QStringLiteral( "bundlepass" ) ) : QStringLiteral() ) );
|
||||
// .arg( !mconfig.config( QStringLiteral( "bundlepass" ) ).isNull() ? mconfig.config( QStringLiteral( "bundlepass" ) ) : QString() ) );
|
||||
|
||||
// init key
|
||||
QSslKey clientkey( bundlelist.at( 1 ).toLatin1(),
|
||||
|
@ -111,7 +111,7 @@ void QgsHtmlAnnotation::writeXml( QDomElement &elem, QDomDocument &doc, const Qg
|
||||
|
||||
void QgsHtmlAnnotation::readXml( const QDomElement &itemElem, const QgsReadWriteContext &context )
|
||||
{
|
||||
mHtmlFile = itemElem.attribute( QStringLiteral( "htmlfile" ), QLatin1String( "" ) );
|
||||
mHtmlFile = itemElem.attribute( QStringLiteral( "htmlfile" ), QString() );
|
||||
QDomElement annotationElem = itemElem.firstChildElement( QStringLiteral( "AnnotationItem" ) );
|
||||
if ( !annotationElem.isNull() )
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ bool QgsAuthMethodConfig::uriToResource( const QString &accessurl, QString *reso
|
||||
if ( url.isValid() )
|
||||
{
|
||||
res = QStringLiteral( "%1://%2:%3%4" ).arg( url.scheme(), url.host() )
|
||||
.arg( url.port() ).arg( withpath ? url.path() : QLatin1String( "" ) );
|
||||
.arg( url.port() ).arg( withpath ? url.path() : QString() );
|
||||
}
|
||||
}
|
||||
*resource = res;
|
||||
|
@ -2994,7 +2994,7 @@ bool QgsAuthManager::passwordHelperDelete()
|
||||
QString QgsAuthManager::passwordHelperRead()
|
||||
{
|
||||
// Retrieve it!
|
||||
QString password( QLatin1String( "" ) );
|
||||
QString password;
|
||||
passwordHelperLog( tr( "Opening %1 for READ…" ).arg( AUTH_PASSWORD_HELPER_DISPLAY_NAME ) );
|
||||
QKeychain::ReadPasswordJob job( AUTH_PASSWORD_HELPER_FOLDER_NAME );
|
||||
QgsSettings settings;
|
||||
|
@ -849,7 +849,7 @@ void QgsDxfExport::writeTables()
|
||||
writeGroup( 71, 0 );
|
||||
writeGroup( 42, 5.0 );
|
||||
writeGroup( 3, QStringLiteral( "romans.shx" ) );
|
||||
writeGroup( 4, QLatin1String( "" ) );
|
||||
writeGroup( 4, QString() );
|
||||
|
||||
writeGroup( 0, QStringLiteral( "ENDTAB" ) );
|
||||
|
||||
@ -874,7 +874,7 @@ void QgsDxfExport::writeBlocks()
|
||||
writeGroup( 70, 0 );
|
||||
writeGroup( 0, QgsPoint( QgsWkbTypes::PointZ ) );
|
||||
writeGroup( 3, block );
|
||||
writeGroup( 1, QLatin1String( "" ) );
|
||||
writeGroup( 1, QString() );
|
||||
writeGroup( 0, QStringLiteral( "ENDBLK" ) );
|
||||
writeHandle();
|
||||
writeGroup( 100, QStringLiteral( "AcDbEntity" ) );
|
||||
@ -927,7 +927,7 @@ void QgsDxfExport::writeBlocks()
|
||||
// size *= mapUnitScaleFactor( mSymbologyScale, ml->sizeUnit(), mMapUnits );
|
||||
writeGroup( 0, QgsPoint( QgsWkbTypes::PointZ ) );
|
||||
writeGroup( 3, block );
|
||||
writeGroup( 1, QLatin1String( "" ) );
|
||||
writeGroup( 1, QString() );
|
||||
|
||||
// maplayer 0 -> block receives layer from INSERT statement
|
||||
ml->writeDxf( *this, mapUnitScaleFactor( mSymbologyScale, ml->sizeUnit(), mMapUnits, ctx.renderContext().mapToPixel().mapUnitsPerPixel() ), QStringLiteral( "0" ), ctx );
|
||||
@ -4182,7 +4182,7 @@ void QgsDxfExport::writeLinetype( const QString &styleName, const QVector<qreal>
|
||||
writeGroup( 100, QStringLiteral( "AcDbLinetypeTableRecord" ) );
|
||||
writeGroup( 2, styleName );
|
||||
writeGroup( 70, 64 ); // 0?
|
||||
writeGroup( 3, QLatin1String( "" ) );
|
||||
writeGroup( 3, QString() );
|
||||
writeGroup( 72, 65 );
|
||||
writeGroup( 73, pattern.size() );
|
||||
writeGroup( 40, length );
|
||||
|
@ -603,7 +603,7 @@ QString QgsExpression::helpText( QString name )
|
||||
helpContents += delim;
|
||||
helpContents += QStringLiteral( "<span class=\"argument\">%2%3</span>" ).arg(
|
||||
a.mArg,
|
||||
a.mDefaultVal.isEmpty() ? QLatin1String( "" ) : '=' + a.mDefaultVal
|
||||
a.mDefaultVal.isEmpty() ? QString() : '=' + a.mDefaultVal
|
||||
);
|
||||
|
||||
if ( a.mOptional )
|
||||
|
@ -974,7 +974,7 @@ bool QgsCompositionConverter::readMapXml( QgsLayoutItemMap *layoutItem, const QD
|
||||
mapGrid->setAnnotationDirection( QgsLayoutItemMapGrid::AnnotationDirection( annotationElem.attribute( QStringLiteral( "bottomDirection" ), QStringLiteral( "0" ) ).toInt() ), QgsLayoutItemMapGrid::Bottom );
|
||||
mapGrid->setAnnotationFrameDistance( annotationElem.attribute( QStringLiteral( "frameDistance" ), QStringLiteral( "0" ) ).toDouble() );
|
||||
QFont annotationFont;
|
||||
annotationFont.fromString( annotationElem.attribute( QStringLiteral( "font" ), QLatin1String( "" ) ) );
|
||||
annotationFont.fromString( annotationElem.attribute( QStringLiteral( "font" ), QString() ) );
|
||||
mapGrid->setAnnotationFont( annotationFont );
|
||||
mapGrid->setAnnotationFontColor( QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "fontColor" ), QStringLiteral( "0,0,0,255" ) ) ) );
|
||||
|
||||
@ -1029,7 +1029,7 @@ bool QgsCompositionConverter::readScaleBarXml( QgsLayoutItemScaleBar *layoutItem
|
||||
QFont f;
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( f, itemElem, QStringLiteral( "scaleBarFont" ) ) )
|
||||
{
|
||||
f.fromString( itemElem.attribute( QStringLiteral( "font" ), QLatin1String( "" ) ) );
|
||||
f.fromString( itemElem.attribute( QStringLiteral( "font" ), QString() ) );
|
||||
}
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
layoutItem->setFont( f );
|
||||
@ -1141,7 +1141,7 @@ bool QgsCompositionConverter::readScaleBarXml( QgsLayoutItemScaleBar *layoutItem
|
||||
}
|
||||
|
||||
//style
|
||||
QString styleString = itemElem.attribute( QStringLiteral( "style" ), QLatin1String( "" ) );
|
||||
QString styleString = itemElem.attribute( QStringLiteral( "style" ), QString() );
|
||||
layoutItem->setStyle( QObject::tr( styleString.toLocal8Bit().data() ) );
|
||||
|
||||
if ( itemElem.attribute( QStringLiteral( "unitType" ) ).isEmpty() )
|
||||
@ -1299,19 +1299,19 @@ bool QgsCompositionConverter::readAtlasXml( QgsLayoutAtlas *atlasItem, const QDo
|
||||
|
||||
atlasItem->setPageNameExpression( itemElem.attribute( QStringLiteral( "pageNameExpression" ), QString() ) );
|
||||
QString errorString;
|
||||
atlasItem->setFilenameExpression( itemElem.attribute( QStringLiteral( "filenamePattern" ), QLatin1String( "" ) ), errorString );
|
||||
atlasItem->setFilenameExpression( itemElem.attribute( QStringLiteral( "filenamePattern" ), QString() ), errorString );
|
||||
// note: no error reporting for errorString
|
||||
atlasItem->setSortFeatures( itemElem.attribute( QStringLiteral( "sortFeatures" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) );
|
||||
if ( atlasItem->sortFeatures() )
|
||||
{
|
||||
atlasItem->setSortExpression( itemElem.attribute( QStringLiteral( "sortKey" ), QLatin1String( "" ) ) );
|
||||
atlasItem->setSortExpression( itemElem.attribute( QStringLiteral( "sortKey" ), QString() ) );
|
||||
atlasItem->setSortAscending( itemElem.attribute( QStringLiteral( "sortAscending" ), QStringLiteral( "true" ) ) == QLatin1String( "true" ) );
|
||||
}
|
||||
atlasItem->setFilterFeatures( itemElem.attribute( QStringLiteral( "filterFeatures" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) );
|
||||
if ( atlasItem->filterFeatures( ) )
|
||||
{
|
||||
QString expErrorString;
|
||||
atlasItem->setFilterExpression( itemElem.attribute( QStringLiteral( "featureFilter" ), QLatin1String( "" ) ), expErrorString );
|
||||
atlasItem->setFilterExpression( itemElem.attribute( QStringLiteral( "featureFilter" ), QString() ), expErrorString );
|
||||
// note: no error reporting for errorString
|
||||
}
|
||||
|
||||
@ -1399,14 +1399,14 @@ bool QgsCompositionConverter::readTableXml( QgsLayoutItemAttributeTable *layoutI
|
||||
layoutItem->setShowEmptyRows( itemElem.attribute( QStringLiteral( "showEmptyRows" ), QStringLiteral( "0" ) ).toInt() );
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( layoutItem->mHeaderFont, itemElem, QStringLiteral( "headerFontProperties" ) ) )
|
||||
{
|
||||
layoutItem->mHeaderFont.fromString( itemElem.attribute( QStringLiteral( "headerFont" ), QLatin1String( "" ) ) );
|
||||
layoutItem->mHeaderFont.fromString( itemElem.attribute( QStringLiteral( "headerFont" ), QString() ) );
|
||||
}
|
||||
layoutItem->setHeaderFontColor( QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "headerFontColor" ), QStringLiteral( "0,0,0,255" ) ) ) );
|
||||
layoutItem->setHeaderHAlignment( static_cast<QgsLayoutTable::HeaderHAlignment>( itemElem.attribute( QStringLiteral( "headerHAlignment" ), QStringLiteral( "0" ) ).toInt() ) ) ;
|
||||
layoutItem->setHeaderMode( static_cast<QgsLayoutTable::HeaderMode>( itemElem.attribute( QStringLiteral( "headerMode" ), QStringLiteral( "0" ) ).toInt() ) );
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( layoutItem->mContentFont, itemElem, QStringLiteral( "contentFontProperties" ) ) )
|
||||
{
|
||||
layoutItem->mContentFont.fromString( itemElem.attribute( QStringLiteral( "contentFont" ), QLatin1String( "" ) ) );
|
||||
layoutItem->mContentFont.fromString( itemElem.attribute( QStringLiteral( "contentFont" ), QString() ) );
|
||||
}
|
||||
layoutItem->setContentFontColor( QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "contentFontColor" ), QStringLiteral( "0,0,0,255" ) ) ) );
|
||||
layoutItem->setCellMargin( itemElem.attribute( QStringLiteral( "cellMargin" ), QStringLiteral( "1.0" ) ).toDouble() );
|
||||
@ -1431,8 +1431,8 @@ bool QgsCompositionConverter::readTableXml( QgsLayoutItemAttributeTable *layoutI
|
||||
QgsLayoutTableColumn *column = new QgsLayoutTableColumn;
|
||||
column->mHAlignment = static_cast< Qt::AlignmentFlag >( columnElem.attribute( QStringLiteral( "hAlignment" ), QString::number( Qt::AlignLeft ) ).toInt() );
|
||||
column->mVAlignment = static_cast< Qt::AlignmentFlag >( columnElem.attribute( QStringLiteral( "vAlignment" ), QString::number( Qt::AlignVCenter ) ).toInt() );
|
||||
column->mHeading = columnElem.attribute( QStringLiteral( "heading" ), QLatin1String( "" ) );
|
||||
column->mAttribute = columnElem.attribute( QStringLiteral( "attribute" ), QLatin1String( "" ) );
|
||||
column->mHeading = columnElem.attribute( QStringLiteral( "heading" ), QString() );
|
||||
column->mAttribute = columnElem.attribute( QStringLiteral( "attribute" ), QString() );
|
||||
column->mSortByRank = columnElem.attribute( QStringLiteral( "sortByRank" ), QStringLiteral( "0" ) ).toInt();
|
||||
column->mSortOrder = static_cast< Qt::SortOrder >( columnElem.attribute( QStringLiteral( "sortOrder" ), QString::number( Qt::AscendingOrder ) ).toInt() );
|
||||
column->mWidth = columnElem.attribute( QStringLiteral( "width" ), QStringLiteral( "0.0" ) ).toDouble();
|
||||
@ -1538,7 +1538,7 @@ bool QgsCompositionConverter::readXml( QgsLayoutItem *layoutItem, const QDomElem
|
||||
layoutItem->mTemplateUuid = itemElem.attribute( QStringLiteral( "templateUuid" ) );
|
||||
|
||||
//id
|
||||
QString id = itemElem.attribute( QStringLiteral( "id" ), QStringLiteral( "" ) );
|
||||
QString id = itemElem.attribute( QStringLiteral( "id" ), QString() );
|
||||
layoutItem->setId( id );
|
||||
|
||||
//frame
|
||||
|
@ -708,7 +708,7 @@ bool QgsLayoutItemAttributeTable::readPropertiesFromElement( const QDomElement &
|
||||
return false;
|
||||
|
||||
mSource = QgsLayoutItemAttributeTable::ContentSource( itemElem.attribute( QStringLiteral( "source" ), QStringLiteral( "0" ) ).toInt() );
|
||||
mRelationId = itemElem.attribute( QStringLiteral( "relationId" ), QLatin1String( "" ) );
|
||||
mRelationId = itemElem.attribute( QStringLiteral( "relationId" ), QString() );
|
||||
|
||||
if ( mSource == QgsLayoutItemAttributeTable::AtlasFeature )
|
||||
{
|
||||
@ -719,7 +719,7 @@ bool QgsLayoutItemAttributeTable::readPropertiesFromElement( const QDomElement &
|
||||
mShowOnlyVisibleFeatures = itemElem.attribute( QStringLiteral( "showOnlyVisibleFeatures" ), QStringLiteral( "1" ) ).toInt();
|
||||
mFilterToAtlasIntersection = itemElem.attribute( QStringLiteral( "filterToAtlasIntersection" ), QStringLiteral( "0" ) ).toInt();
|
||||
mFilterFeatures = itemElem.attribute( QStringLiteral( "filterFeatures" ), QStringLiteral( "false" ) ) == QLatin1String( "true" );
|
||||
mFeatureFilter = itemElem.attribute( QStringLiteral( "featureFilter" ), QLatin1String( "" ) );
|
||||
mFeatureFilter = itemElem.attribute( QStringLiteral( "featureFilter" ), QString() );
|
||||
mMaximumNumberOfFeatures = itemElem.attribute( QStringLiteral( "maxFeatures" ), QStringLiteral( "5" ) ).toInt();
|
||||
mWrapString = itemElem.attribute( QStringLiteral( "wrapString" ) );
|
||||
|
||||
|
@ -358,7 +358,7 @@ bool QgsLayoutItemMapGrid::readXml( const QDomElement &itemElem, const QDomDocum
|
||||
mAnnotationFrameDistance = itemElem.attribute( QStringLiteral( "frameAnnotationDistance" ), QStringLiteral( "0" ) ).toDouble();
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( mGridAnnotationFont, itemElem, QStringLiteral( "annotationFontProperties" ) ) )
|
||||
{
|
||||
mGridAnnotationFont.fromString( itemElem.attribute( QStringLiteral( "annotationFont" ), QLatin1String( "" ) ) );
|
||||
mGridAnnotationFont.fromString( itemElem.attribute( QStringLiteral( "annotationFont" ), QString() ) );
|
||||
}
|
||||
mGridAnnotationFontColor = QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "annotationFontColor" ), QStringLiteral( "0,0,0,255" ) ) );
|
||||
mGridAnnotationPrecision = itemElem.attribute( QStringLiteral( "annotationPrecision" ), QStringLiteral( "3" ) ).toInt();
|
||||
|
@ -752,7 +752,7 @@ bool QgsLayoutItemPicture::readPropertiesFromElement( const QDomElement &itemEle
|
||||
if ( itemElem.hasAttribute( QStringLiteral( "sourceExpression" ) ) )
|
||||
{
|
||||
//update pre 2.5 picture expression to use data defined expression
|
||||
QString sourceExpression = itemElem.attribute( QStringLiteral( "sourceExpression" ), QLatin1String( "" ) );
|
||||
QString sourceExpression = itemElem.attribute( QStringLiteral( "sourceExpression" ), QString() );
|
||||
QString useExpression = itemElem.attribute( QStringLiteral( "useExpression" ) );
|
||||
bool expressionActive;
|
||||
expressionActive = ( useExpression.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0 );
|
||||
|
@ -401,8 +401,8 @@ bool QgsLayoutItemPolyline::readPropertiesFromElement( const QDomElement &elmt,
|
||||
mArrowHeadStrokeColor = QgsSymbolLayerUtils::decodeColor( elmt.attribute( QStringLiteral( "arrowHeadOutlineColor" ), QStringLiteral( "0,0,0,255" ) ) );
|
||||
mArrowHeadStrokeWidth = elmt.attribute( QStringLiteral( "outlineWidth" ), QStringLiteral( "1.0" ) ).toDouble();
|
||||
// relative paths to absolute
|
||||
QString startMarkerPath = elmt.attribute( QStringLiteral( "startMarkerFile" ), QLatin1String( "" ) );
|
||||
QString endMarkerPath = elmt.attribute( QStringLiteral( "endMarkerFile" ), QLatin1String( "" ) );
|
||||
QString startMarkerPath = elmt.attribute( QStringLiteral( "startMarkerFile" ), QString() );
|
||||
QString endMarkerPath = elmt.attribute( QStringLiteral( "endMarkerFile" ), QString() );
|
||||
setStartSvgMarkerPath( QgsSymbolLayerUtils::svgSymbolNameToPath( startMarkerPath, context.pathResolver() ) );
|
||||
setEndSvgMarkerPath( QgsSymbolLayerUtils::svgSymbolNameToPath( endMarkerPath, context.pathResolver() ) );
|
||||
mEndMarker = static_cast< QgsLayoutItemPolyline::MarkerMode >( elmt.attribute( QStringLiteral( "markerMode" ), QStringLiteral( "0" ) ).toInt() );
|
||||
|
@ -683,7 +683,7 @@ bool QgsLayoutItemScaleBar::readPropertiesFromElement( const QDomElement &itemEl
|
||||
QFont f;
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( f, itemElem, QStringLiteral( "scaleBarFont" ) ) )
|
||||
{
|
||||
f.fromString( itemElem.attribute( QStringLiteral( "font" ), QLatin1String( "" ) ) );
|
||||
f.fromString( itemElem.attribute( QStringLiteral( "font" ), QString() ) );
|
||||
}
|
||||
mSettings.textFormat().setFont( f );
|
||||
if ( f.pointSizeF() > 0 )
|
||||
@ -800,7 +800,7 @@ bool QgsLayoutItemScaleBar::readPropertiesFromElement( const QDomElement &itemEl
|
||||
}
|
||||
|
||||
//style
|
||||
QString styleString = itemElem.attribute( QStringLiteral( "style" ), QLatin1String( "" ) );
|
||||
QString styleString = itemElem.attribute( QStringLiteral( "style" ), QString() );
|
||||
setStyle( styleString.toLocal8Bit().data() );
|
||||
|
||||
if ( itemElem.attribute( QStringLiteral( "unitType" ) ).isEmpty() )
|
||||
|
@ -128,14 +128,14 @@ bool QgsLayoutTable::readPropertiesFromElement( const QDomElement &itemElem, con
|
||||
mShowEmptyRows = itemElem.attribute( QStringLiteral( "showEmptyRows" ), QStringLiteral( "0" ) ).toInt();
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( mHeaderFont, itemElem, QStringLiteral( "headerFontProperties" ) ) )
|
||||
{
|
||||
mHeaderFont.fromString( itemElem.attribute( QStringLiteral( "headerFont" ), QLatin1String( "" ) ) );
|
||||
mHeaderFont.fromString( itemElem.attribute( QStringLiteral( "headerFont" ), QString() ) );
|
||||
}
|
||||
mHeaderFontColor = QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "headerFontColor" ), QStringLiteral( "0,0,0,255" ) ) );
|
||||
mHeaderHAlignment = QgsLayoutTable::HeaderHAlignment( itemElem.attribute( QStringLiteral( "headerHAlignment" ), QStringLiteral( "0" ) ).toInt() );
|
||||
mHeaderMode = QgsLayoutTable::HeaderMode( itemElem.attribute( QStringLiteral( "headerMode" ), QStringLiteral( "0" ) ).toInt() );
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( mContentFont, itemElem, QStringLiteral( "contentFontProperties" ) ) )
|
||||
{
|
||||
mContentFont.fromString( itemElem.attribute( QStringLiteral( "contentFont" ), QLatin1String( "" ) ) );
|
||||
mContentFont.fromString( itemElem.attribute( QStringLiteral( "contentFont" ), QString() ) );
|
||||
}
|
||||
mContentFontColor = QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "contentFontColor" ), QStringLiteral( "0,0,0,255" ) ) );
|
||||
mCellMargin = itemElem.attribute( QStringLiteral( "cellMargin" ), QStringLiteral( "1.0" ) ).toDouble();
|
||||
|
@ -51,8 +51,8 @@ bool QgsLayoutTableColumn::readXml( const QDomElement &columnElem )
|
||||
{
|
||||
mHAlignment = static_cast< Qt::AlignmentFlag >( columnElem.attribute( QStringLiteral( "hAlignment" ), QString::number( Qt::AlignLeft ) ).toInt() );
|
||||
mVAlignment = static_cast< Qt::AlignmentFlag >( columnElem.attribute( QStringLiteral( "vAlignment" ), QString::number( Qt::AlignVCenter ) ).toInt() );
|
||||
mHeading = columnElem.attribute( QStringLiteral( "heading" ), QLatin1String( "" ) );
|
||||
mAttribute = columnElem.attribute( QStringLiteral( "attribute" ), QLatin1String( "" ) );
|
||||
mHeading = columnElem.attribute( QStringLiteral( "heading" ), QString() );
|
||||
mAttribute = columnElem.attribute( QStringLiteral( "attribute" ), QString() );
|
||||
mSortByRank = columnElem.attribute( QStringLiteral( "sortByRank" ), QStringLiteral( "0" ) ).toInt();
|
||||
mSortOrder = static_cast< Qt::SortOrder >( columnElem.attribute( QStringLiteral( "sortOrder" ), QString::number( Qt::AscendingOrder ) ).toInt() );
|
||||
mWidth = columnElem.attribute( QStringLiteral( "width" ), QStringLiteral( "0.0" ) ).toDouble();
|
||||
|
@ -173,7 +173,7 @@ QgsMemoryProvider::QgsMemoryProvider( const QString &uri, const ProviderOptions
|
||||
}
|
||||
}
|
||||
if ( !name.isEmpty() )
|
||||
attributes.append( QgsField( name, type, typeName, length, precision, QLatin1String( "" ), subType ) );
|
||||
attributes.append( QgsField( name, type, typeName, length, precision, QString(), subType ) );
|
||||
}
|
||||
addAttributes( attributes );
|
||||
}
|
||||
@ -220,7 +220,7 @@ QString QgsMemoryProvider::dataSourceUri( bool expandAuthConfig ) const
|
||||
|
||||
if ( mCrs.isValid() )
|
||||
{
|
||||
QString crsDef( QLatin1String( "" ) );
|
||||
QString crsDef;
|
||||
QString authid = mCrs.authid();
|
||||
if ( authid.startsWith( QLatin1String( "EPSG:" ) ) )
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ QString qgsVsiPrefix( const QString &path )
|
||||
path.endsWith( QLatin1String( ".gz" ), Qt::CaseInsensitive ) )
|
||||
return QStringLiteral( "/vsigzip/" );
|
||||
else
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
uint qHash( const QVariant &variant )
|
||||
|
@ -715,7 +715,7 @@ QHash<QString, QString> QgsApplication::uiThemes()
|
||||
{
|
||||
QStringList paths = QStringList() << userThemesFolder() << defaultThemesFolder();
|
||||
QHash<QString, QString> mapping;
|
||||
mapping.insert( QStringLiteral( "default" ), QLatin1String( "" ) );
|
||||
mapping.insert( QStringLiteral( "default" ), QString() );
|
||||
Q_FOREACH ( const QString &path, paths )
|
||||
{
|
||||
QDir folder( path );
|
||||
@ -1348,7 +1348,7 @@ QString QgsApplication::relativePathToAbsolutePath( const QString &rpath, const
|
||||
|
||||
#if !defined(Q_OS_WIN)
|
||||
// make path absolute
|
||||
targetElems.prepend( QLatin1String( "" ) );
|
||||
targetElems.prepend( QString() );
|
||||
#endif
|
||||
|
||||
return targetElems.join( QStringLiteral( "/" ) );
|
||||
|
@ -812,7 +812,7 @@ QgsDataSourceUri QgsAuxiliaryStorage::parseOgrUri( const QgsDataSourceUri &uri )
|
||||
if ( tableParts.count() < 1 )
|
||||
return newUri;
|
||||
|
||||
const QString tableName = tableParts[0].replace( QStringLiteral( "layername=" ), QStringLiteral( "" ) );
|
||||
const QString tableName = tableParts[0].replace( QStringLiteral( "layername=" ), QString() );
|
||||
|
||||
newUri.setDataSource( QString(), tableName, QString() );
|
||||
newUri.setDatabase( databasePath );
|
||||
|
@ -138,7 +138,7 @@ void QgsBrowserModel::addRootItems()
|
||||
continue;
|
||||
}
|
||||
|
||||
QgsDataItem *item = pr->createDataItem( QLatin1String( "" ), nullptr ); // empty path -> top level
|
||||
QgsDataItem *item = pr->createDataItem( QString(), nullptr ); // empty path -> top level
|
||||
if ( item )
|
||||
{
|
||||
// Forward the signal from the root items to the model (and then to the app)
|
||||
|
@ -638,7 +638,7 @@ void QgsCptCityColorRamp::invert()
|
||||
|
||||
QgsCptCityColorRamp *QgsCptCityColorRamp::clone() const
|
||||
{
|
||||
QgsCptCityColorRamp *ramp = new QgsCptCityColorRamp( QLatin1String( "" ), QLatin1String( "" ), mInverted, false );
|
||||
QgsCptCityColorRamp *ramp = new QgsCptCityColorRamp( QString(), QString(), mInverted, false );
|
||||
ramp->copy( this );
|
||||
return ramp;
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ class CORE_EXPORT QgsDataProvider : public QObject
|
||||
*/
|
||||
virtual QString fileVectorFilters() const
|
||||
{
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
@ -365,7 +365,7 @@ class CORE_EXPORT QgsDataProvider : public QObject
|
||||
*/
|
||||
virtual QString fileRasterFilters() const
|
||||
{
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -105,7 +105,7 @@ bool QgsGmlSchema::parseXSD( const QByteArray &xml )
|
||||
if ( gmlBaseType == QLatin1String( "AbstractFeatureType" ) )
|
||||
{
|
||||
// Get feature type definition
|
||||
QgsGmlFeatureClass featureClass( name, QLatin1String( "" ) );
|
||||
QgsGmlFeatureClass featureClass( name, QString() );
|
||||
xsdFeatureClass( docElem, stripNS( type ), featureClass );
|
||||
mFeatureClassMap.insert( name, featureClass );
|
||||
}
|
||||
@ -234,14 +234,14 @@ QString QgsGmlSchema::xsdComplexTypeGmlBaseType( const QDomElement &element, con
|
||||
{
|
||||
//QgsDebugMsg("name = " + name );
|
||||
QDomElement complexTypeElement = domElement( element, QStringLiteral( "complexType" ), QStringLiteral( "name" ), name );
|
||||
if ( complexTypeElement.isNull() ) return QLatin1String( "" );
|
||||
if ( complexTypeElement.isNull() ) return QString();
|
||||
|
||||
QDomElement extrest = domElement( complexTypeElement, QStringLiteral( "complexContent.extension" ) );
|
||||
if ( extrest.isNull() )
|
||||
{
|
||||
extrest = domElement( complexTypeElement, QStringLiteral( "complexContent.restriction" ) );
|
||||
}
|
||||
if ( extrest.isNull() ) return QLatin1String( "" );
|
||||
if ( extrest.isNull() ) return QString();
|
||||
|
||||
QString extrestName = extrest.attribute( QStringLiteral( "base" ) );
|
||||
if ( extrestName.startsWith( QLatin1String( "gml:" ) ) )
|
||||
@ -357,7 +357,7 @@ void QgsGmlSchema::startElement( const XML_Char *el, const XML_Char **attr )
|
||||
|
||||
QStringList splitName = elementName.split( NS_SEPARATOR );
|
||||
QString localName = splitName.last();
|
||||
QString ns = splitName.size() > 1 ? splitName.first() : QLatin1String( "" );
|
||||
QString ns = splitName.size() > 1 ? splitName.first() : QString();
|
||||
//QgsDebugMsg( "ns = " + ns + " localName = " + localName );
|
||||
|
||||
ParseMode parseMode = modeStackTop();
|
||||
@ -459,7 +459,7 @@ void QgsGmlSchema::endElement( const XML_Char *el )
|
||||
|
||||
QStringList splitName = elementName.split( NS_SEPARATOR );
|
||||
QString localName = splitName.last();
|
||||
QString ns = splitName.size() > 1 ? splitName.first() : QLatin1String( "" );
|
||||
QString ns = splitName.size() > 1 ? splitName.first() : QString();
|
||||
|
||||
QgsGmlSchema::ParseMode parseMode = modeStackTop();
|
||||
|
||||
|
@ -84,7 +84,7 @@ QString QgsLegendStyle::styleName( Style s )
|
||||
switch ( s )
|
||||
{
|
||||
case Undefined:
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
case Hidden:
|
||||
return QStringLiteral( "hidden" );
|
||||
case Title:
|
||||
@ -98,7 +98,7 @@ QString QgsLegendStyle::styleName( Style s )
|
||||
case SymbolLabel:
|
||||
return QStringLiteral( "symbolLabel" );
|
||||
}
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
QgsLegendStyle::Style QgsLegendStyle::styleFromName( const QString &styleName )
|
||||
@ -131,5 +131,5 @@ QString QgsLegendStyle::styleLabel( Style s )
|
||||
case SymbolLabel:
|
||||
return QObject::tr( "Symbol label" );
|
||||
}
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCo
|
||||
if ( !dataUrlElem.isNull() )
|
||||
{
|
||||
mDataUrl = dataUrlElem.text();
|
||||
mDataUrlFormat = dataUrlElem.attribute( QStringLiteral( "format" ), QLatin1String( "" ) );
|
||||
mDataUrlFormat = dataUrlElem.attribute( QStringLiteral( "format" ), QString() );
|
||||
}
|
||||
|
||||
//legendUrl
|
||||
@ -364,7 +364,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCo
|
||||
if ( !legendUrlElem.isNull() )
|
||||
{
|
||||
mLegendUrl = legendUrlElem.text();
|
||||
mLegendUrlFormat = legendUrlElem.attribute( QStringLiteral( "format" ), QLatin1String( "" ) );
|
||||
mLegendUrlFormat = legendUrlElem.attribute( QStringLiteral( "format" ), QString() );
|
||||
}
|
||||
|
||||
//attribution
|
||||
@ -372,7 +372,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCo
|
||||
if ( !attribElem.isNull() )
|
||||
{
|
||||
mAttribution = attribElem.text();
|
||||
mAttributionUrl = attribElem.attribute( QStringLiteral( "href" ), QLatin1String( "" ) );
|
||||
mAttributionUrl = attribElem.attribute( QStringLiteral( "href" ), QString() );
|
||||
}
|
||||
|
||||
//metadataUrl
|
||||
@ -380,8 +380,8 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCo
|
||||
if ( !metaUrlElem.isNull() )
|
||||
{
|
||||
mMetadataUrl = metaUrlElem.text();
|
||||
mMetadataUrlType = metaUrlElem.attribute( QStringLiteral( "type" ), QLatin1String( "" ) );
|
||||
mMetadataUrlFormat = metaUrlElem.attribute( QStringLiteral( "format" ), QLatin1String( "" ) );
|
||||
mMetadataUrlType = metaUrlElem.attribute( QStringLiteral( "type" ), QString() );
|
||||
mMetadataUrlFormat = metaUrlElem.attribute( QStringLiteral( "format" ), QString() );
|
||||
}
|
||||
|
||||
// mMetadata.readFromLayer( this );
|
||||
@ -1527,7 +1527,7 @@ QString QgsMapLayer::loadSldStyle( const QString &uri, bool &resultFlag )
|
||||
return myErrorMessage;
|
||||
}
|
||||
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool QgsMapLayer::readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context )
|
||||
|
@ -66,7 +66,7 @@ void QgsMessageOutputConsole::showMessage( bool )
|
||||
{
|
||||
mMessage.replace( QLatin1String( "<br>" ), QLatin1String( "\n" ) );
|
||||
mMessage.replace( QLatin1String( " " ), QLatin1String( " " ) );
|
||||
mMessage.replace( QRegExp( "</?[^>]+>" ), QLatin1String( "" ) );
|
||||
mMessage.replace( QRegExp( "</?[^>]+>" ), QString() );
|
||||
}
|
||||
QgsMessageLog::logMessage( mMessage, mTitle.isNull() ? QObject::tr( "Console" ) : mTitle );
|
||||
emit destroyed();
|
||||
|
@ -42,7 +42,7 @@ bool QgsMultiRenderChecker::runTest( const QString &testName, unsigned int misma
|
||||
|
||||
if ( subDirs.isEmpty() )
|
||||
{
|
||||
subDirs << QLatin1String( "" );
|
||||
subDirs << QString();
|
||||
}
|
||||
|
||||
QVector<QgsDartMeasurement> dartMeasurements;
|
||||
|
@ -1224,7 +1224,7 @@ QList<QgsField> QgsOfflineEditing::sqlQueryAttributesAdded( sqlite3 *db, const Q
|
||||
{
|
||||
QgsField field( QString( reinterpret_cast< const char * >( sqlite3_column_text( stmt, 0 ) ) ),
|
||||
static_cast< QVariant::Type >( sqlite3_column_int( stmt, 1 ) ),
|
||||
QLatin1String( "" ), // typeName
|
||||
QString(), // typeName
|
||||
sqlite3_column_int( stmt, 2 ),
|
||||
sqlite3_column_int( stmt, 3 ),
|
||||
QString( reinterpret_cast< const char * >( sqlite3_column_text( stmt, 4 ) ) ) );
|
||||
|
@ -422,7 +422,7 @@ QString updateDataDefinedString( const QString &value )
|
||||
QStringList values;
|
||||
values << QStringLiteral( "1" ); // all old-style values are active if not empty
|
||||
values << QStringLiteral( "0" );
|
||||
values << QLatin1String( "" );
|
||||
values << QString();
|
||||
values << value; // all old-style values are only field names
|
||||
newValue = values.join( QStringLiteral( "~~" ) );
|
||||
}
|
||||
@ -1316,12 +1316,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature &f, QgsRenderContext &cont
|
||||
QgsDebugMsgLevel( QString( "Expression parser eval error:%1" ).arg( exp->evalErrorString() ), 4 );
|
||||
return;
|
||||
}
|
||||
labelText = result.isNull() ? QLatin1String( "" ) : result.toString();
|
||||
labelText = result.isNull() ? QString() : result.toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
const QVariant &v = f.attribute( fieldIndex );
|
||||
labelText = v.isNull() ? QLatin1String( "" ) : v.toString();
|
||||
labelText = v.isNull() ? QString() : v.toString();
|
||||
}
|
||||
|
||||
// apply text replacements
|
||||
|
@ -135,7 +135,7 @@ QString QgsPathResolver::readPath( const QString &filename ) const
|
||||
|
||||
#if !defined(Q_OS_WIN)
|
||||
// make path absolute
|
||||
projElems.prepend( QLatin1String( "" ) );
|
||||
projElems.prepend( QString() );
|
||||
#endif
|
||||
|
||||
return vsiPrefix + projElems.join( QStringLiteral( "/" ) );
|
||||
|
@ -342,7 +342,7 @@ void QgsProjectFileTransform::transform0110to1000()
|
||||
//create the layer to get the provider for int->fieldName conversion
|
||||
QgsVectorLayer::LayerOptions options;
|
||||
options.loadDefaultStyle = false;
|
||||
QgsVectorLayer *layer = new QgsVectorLayer( dataSource, QLatin1String( "" ), providerKey, options );
|
||||
QgsVectorLayer *layer = new QgsVectorLayer( dataSource, QString(), providerKey, options );
|
||||
if ( !layer->isValid() )
|
||||
{
|
||||
delete layer;
|
||||
|
@ -217,7 +217,7 @@ QString QgsVectorDataProvider::encoding() const
|
||||
return mEncoding->name();
|
||||
}
|
||||
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString QgsVectorDataProvider::capabilitiesString() const
|
||||
|
@ -224,7 +224,7 @@ void QgsVectorFileWriter::init( QString vectorFileName,
|
||||
|
||||
if ( mOgrDriverName == QLatin1String( "ESRI Shapefile" ) )
|
||||
{
|
||||
if ( layerOptions.join( QLatin1String( "" ) ).toUpper().indexOf( QLatin1String( "ENCODING=" ) ) == -1 )
|
||||
if ( layerOptions.join( QString() ).toUpper().indexOf( QLatin1String( "ENCODING=" ) ) == -1 )
|
||||
{
|
||||
layerOptions.append( "ENCODING=" + convertCodecNameForEncodingOption( fileEncoding ) );
|
||||
}
|
||||
@ -892,7 +892,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
#if defined(GDAL_COMPUTE_VERSION) && GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,2,0)
|
||||
<< QStringLiteral( "MULTIPATCH" )
|
||||
#endif
|
||||
<< QStringLiteral( "" ),
|
||||
<< QString(),
|
||||
QString(), // Default value
|
||||
true // Allow None
|
||||
) );
|
||||
@ -1027,44 +1027,44 @@ class QgsVectorFileWriterMetadataContainer
|
||||
QObject::tr( "XML content that will be put between the <channel> element and the "
|
||||
"first <item> element for a RSS document, or between the xml tag and "
|
||||
"the first <entry> element for an Atom document." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "TITLE" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Value put inside the <title> element in the header. "
|
||||
"If not provided, a dummy value will be used as that element is compulsory." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "DESCRIPTION" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Value put inside the <description> element in the header. "
|
||||
"If not provided, a dummy value will be used as that element is compulsory." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "LINK" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Value put inside the <link> element in the header. "
|
||||
"If not provided, a dummy value will be used as that element is compulsory." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "UPDATED" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Value put inside the <updated> element in the header. "
|
||||
"Should be formatted as a XML datetime. "
|
||||
"If not provided, a dummy value will be used as that element is compulsory." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "AUTHOR_NAME" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Value put inside the <author><name> element in the header. "
|
||||
"If not provided, a dummy value will be used as that element is compulsory." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "ID" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Value put inside the <id> element in the header. "
|
||||
"If not provided, a dummy value will be used as that element is compulsory." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
driverMetadata.insert( QStringLiteral( "GeoRSS" ),
|
||||
@ -1127,7 +1127,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
<< QStringLiteral( "GML3" )
|
||||
<< QStringLiteral( "GML3Deegree" )
|
||||
<< QStringLiteral( "GML3.2" ),
|
||||
QLatin1String( "" ), // Default value
|
||||
QString(), // Default value
|
||||
true // Allow None
|
||||
) );
|
||||
|
||||
@ -1175,12 +1175,12 @@ class QgsVectorFileWriterMetadataContainer
|
||||
|
||||
layerOptions.insert( QStringLiteral( "IDENTIFIER" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Human-readable identifier (e.g. short name) for the layer content" ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
layerOptions.insert( QStringLiteral( "DESCRIPTION" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Human-readable description for the layer content" ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
layerOptions.insert( QStringLiteral( "FID" ), new QgsVectorFileWriter::StringOption(
|
||||
@ -1273,7 +1273,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
QStringList()
|
||||
<< QStringLiteral( "CRLF" )
|
||||
<< QStringLiteral( "LF" ),
|
||||
QLatin1String( "" ), // Default value
|
||||
QString(), // Default value
|
||||
true // Allow None
|
||||
) );
|
||||
|
||||
@ -1391,7 +1391,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
QObject::tr( "xmin,ymin,xmax,ymax: Define custom layer bounds to increase the "
|
||||
"accuracy of the coordinates. Note: the geometry of written "
|
||||
"features must be within the defined box." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
};
|
||||
insertMapInfoOptions( datasetOptions, layerOptions );
|
||||
@ -1434,7 +1434,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "SEED" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Override the seed file to use." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "COPY_WHOLE_SEED_FILE" ), new QgsVectorFileWriter::BoolOption(
|
||||
@ -1451,13 +1451,13 @@ class QgsVectorFileWriterMetadataContainer
|
||||
datasetOptions.insert( QStringLiteral( "MASTER_UNIT_NAME" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Override the master unit name from the seed file with "
|
||||
"the provided one or two character unit name." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "SUB_UNIT_NAME" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Override the sub unit name from the seed file with the provided "
|
||||
"one or two character unit name." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "SUB_UNITS_PER_MASTER_UNIT" ), new QgsVectorFileWriter::IntOption(
|
||||
@ -1475,7 +1475,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
datasetOptions.insert( QStringLiteral( "ORIGIN" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "ORIGIN=x,y,z: Override the origin of the design plane. "
|
||||
"By default the origin from the seed file is used." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
driverMetadata.insert( QStringLiteral( "DGN" ),
|
||||
@ -1623,7 +1623,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
) );
|
||||
|
||||
layerOptions.insert( QStringLiteral( "SRID" ), new QgsVectorFileWriter::HiddenOption(
|
||||
QLatin1String( "" )
|
||||
QString()
|
||||
) );
|
||||
|
||||
layerOptions.insert( QStringLiteral( "COMPRESS_COLUMNS" ), new QgsVectorFileWriter::StringOption(
|
||||
@ -1636,7 +1636,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
"done transparently. However, such columns cannot be (easily) queried with "
|
||||
"an attribute filter or WHERE clause. Note: in table definition, such columns "
|
||||
"have the 'VARCHAR_deflate' declaration type." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
driverMetadata.insert( QStringLiteral( "SQLite" ),
|
||||
@ -1705,7 +1705,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
"the spatial_ref_sys table. When the SRID option is specified, this "
|
||||
"search (and the eventual insertion of a new entry) will not be done: "
|
||||
"the specified SRID is used as such." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
layerOptions.insert( QStringLiteral( "COMPRESS_COLUMNS" ), new QgsVectorFileWriter::StringOption(
|
||||
@ -1718,7 +1718,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
"done transparently. However, such columns cannot be (easily) queried with "
|
||||
"an attribute filter or WHERE clause. Note: in table definition, such columns "
|
||||
"have the 'VARCHAR_deflate' declaration type." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
driverMetadata.insert( QStringLiteral( "SpatiaLite" ),
|
||||
@ -1738,12 +1738,12 @@ class QgsVectorFileWriterMetadataContainer
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "HEADER" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Override the header file used - in place of header.dxf." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "TRAILER" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "Override the trailer file used - in place of trailer.dxf." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
driverMetadata.insert( QStringLiteral( "DXF" ),
|
||||
@ -1774,7 +1774,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
QObject::tr( "Path to the GCT: the GCT file describes the GeoConcept types definitions: "
|
||||
"In this file, every line must start with //# followed by a keyword. "
|
||||
"Lines starting with // are comments." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
datasetOptions.insert( QStringLiteral( "FEATURETYPE" ), new QgsVectorFileWriter::StringOption(
|
||||
@ -1782,7 +1782,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
"found in the GCT file for a type section. The SUBTYPE corresponds to one of "
|
||||
"the Name found in the GCT file for a sub-type section within the previous "
|
||||
"type section." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
driverMetadata.insert( QStringLiteral( "Geoconcept" ),
|
||||
@ -1803,7 +1803,7 @@ class QgsVectorFileWriterMetadataContainer
|
||||
layerOptions.insert( QStringLiteral( "FEATURE_DATASET" ), new QgsVectorFileWriter::StringOption(
|
||||
QObject::tr( "When this option is set, the new layer will be created inside the named "
|
||||
"FeatureDataset folder. If the folder does not already exist, it will be created." ),
|
||||
QLatin1String( "" ) // Default value
|
||||
QString() // Default value
|
||||
) );
|
||||
|
||||
layerOptions.insert( QStringLiteral( "GEOMETRY_NAME" ), new QgsVectorFileWriter::StringOption(
|
||||
|
@ -132,7 +132,7 @@ class CORE_EXPORT QgsVectorFileWriter : public QgsFeatureSink
|
||||
{
|
||||
public:
|
||||
explicit HiddenOption( const QString &value )
|
||||
: Option( QLatin1String( "" ), Hidden )
|
||||
: Option( QString(), Hidden )
|
||||
, mValue( value )
|
||||
{}
|
||||
|
||||
|
@ -194,7 +194,7 @@ QUrl QgsVirtualLayerDefinition::toUrl() const
|
||||
url.addQueryItem( QStringLiteral( "uid" ), uid() );
|
||||
|
||||
if ( geometryWkbType() == QgsWkbTypes::NoGeometry )
|
||||
url.addQueryItem( QStringLiteral( "nogeometry" ), QLatin1String( "" ) );
|
||||
url.addQueryItem( QStringLiteral( "nogeometry" ), QString() );
|
||||
else if ( !geometryField().isEmpty() )
|
||||
{
|
||||
if ( hasDefinedGeometry() )
|
||||
@ -215,7 +215,7 @@ QUrl QgsVirtualLayerDefinition::toUrl() const
|
||||
|
||||
if ( isLazy() )
|
||||
{
|
||||
url.addQueryItem( QStringLiteral( "lazy" ), QLatin1String( "" ) );
|
||||
url.addQueryItem( QStringLiteral( "lazy" ), QString() );
|
||||
}
|
||||
|
||||
return url;
|
||||
|
@ -1764,7 +1764,7 @@ QString QgsRasterLayer::decodedSource( const QString &source, const QString &pro
|
||||
{
|
||||
// resolutions are no more needed and size limit is not used for tiles
|
||||
// we have to tell to the provider however that it is tiled
|
||||
uri.setParam( QStringLiteral( "tileMatrixSet" ), QLatin1String( "" ) );
|
||||
uri.setParam( QStringLiteral( "tileMatrixSet" ), QString() );
|
||||
}
|
||||
}
|
||||
else if ( item.startsWith( QLatin1String( "featureCount=" ) ) )
|
||||
|
@ -111,7 +111,7 @@ QString QgsRendererCategory::dump() const
|
||||
|
||||
void QgsRendererCategory::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
|
||||
{
|
||||
if ( !mSymbol.get() || props.value( QStringLiteral( "attribute" ), QLatin1String( "" ) ).isEmpty() )
|
||||
if ( !mSymbol.get() || props.value( QStringLiteral( "attribute" ), QString() ).isEmpty() )
|
||||
return;
|
||||
|
||||
QString attrName = props[ QStringLiteral( "attribute" )];
|
||||
@ -199,7 +199,7 @@ QgsSymbol *QgsCategorizedSymbolRenderer::symbolForValue( const QVariant &value,
|
||||
foundMatchingSymbol = false;
|
||||
|
||||
// TODO: special case for int, double
|
||||
QHash<QString, QgsSymbol *>::const_iterator it = mSymbolHash.constFind( value.isNull() ? QLatin1String( "" ) : value.toString() );
|
||||
QHash<QString, QgsSymbol *>::const_iterator it = mSymbolHash.constFind( value.isNull() ? QString() : value.toString() );
|
||||
if ( it == mSymbolHash.constEnd() )
|
||||
{
|
||||
if ( mSymbolHash.isEmpty() )
|
||||
@ -932,7 +932,7 @@ QgsCategorizedSymbolRenderer *QgsCategorizedSymbolRenderer::convertFromRenderer(
|
||||
|
||||
if ( !r )
|
||||
{
|
||||
r = new QgsCategorizedSymbolRenderer( QLatin1String( "" ), QgsCategoryList() );
|
||||
r = new QgsCategorizedSymbolRenderer( QString(), QgsCategoryList() );
|
||||
QgsRenderContext context;
|
||||
QgsSymbolList symbols = const_cast<QgsFeatureRenderer *>( renderer )->symbols( context );
|
||||
if ( !symbols.isEmpty() )
|
||||
|
@ -373,7 +373,7 @@ QMap< double, QPair<QColor, QColor> >QgsCptCityArchive::gradientColorMap( const
|
||||
//todo integrate this into symbollayerutils, keep here for now...
|
||||
double offset;
|
||||
QString offsetStr = e.attribute( QStringLiteral( "offset" ) ); // offset="50.00%" | offset="0.5"
|
||||
QString colorStr = e.attribute( QStringLiteral( "stop-color" ), QLatin1String( "" ) ); // stop-color="rgb(222,235,247)"
|
||||
QString colorStr = e.attribute( QStringLiteral( "stop-color" ), QString() ); // stop-color="rgb(222,235,247)"
|
||||
QString opacityStr = e.attribute( QStringLiteral( "stop-opacity" ), QStringLiteral( "1.0" ) ); // stop-opacity="1.0000"
|
||||
if ( offsetStr.endsWith( '%' ) )
|
||||
offset = offsetStr.remove( offsetStr.size() - 1, 1 ).toDouble() / 100.0;
|
||||
|
@ -347,12 +347,12 @@ QgsEllipseSymbolLayer *QgsEllipseSymbolLayer::clone() const
|
||||
void QgsEllipseSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const
|
||||
{
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:PointSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
// <Geometry>
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
writeSldMarker( doc, symbolizerElem, props );
|
||||
}
|
||||
@ -370,7 +370,7 @@ void QgsEllipseSymbolLayer::writeSldMarker( QDomDocument &doc, QDomElement &elem
|
||||
// <Rotation>
|
||||
QgsProperty ddRotation = mDataDefinedProperties.property( QgsSymbolLayer::PropertyAngle );
|
||||
|
||||
QString angleFunc = props.value( QStringLiteral( "angle" ), QLatin1String( "" ) );
|
||||
QString angleFunc = props.value( QStringLiteral( "angle" ), QString() );
|
||||
if ( angleFunc.isEmpty() ) // symbol has no angle set
|
||||
{
|
||||
if ( ddRotation && ddRotation.isActive() )
|
||||
|
@ -322,12 +322,12 @@ void QgsSimpleFillSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, c
|
||||
return;
|
||||
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:PolygonSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
// <Geometry>
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
if ( mBrushStyle != Qt::NoBrush )
|
||||
{
|
||||
@ -2055,11 +2055,11 @@ QgsSVGFillSymbolLayer *QgsSVGFillSymbolLayer::clone() const
|
||||
void QgsSVGFillSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const
|
||||
{
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:PolygonSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
QDomElement fillElem = doc.createElement( QStringLiteral( "se:Fill" ) );
|
||||
symbolizerElem.appendChild( fillElem );
|
||||
@ -2829,12 +2829,12 @@ QgsLinePatternFillSymbolLayer *QgsLinePatternFillSymbolLayer::clone() const
|
||||
void QgsLinePatternFillSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const
|
||||
{
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:PolygonSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
// <Geometry>
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
QDomElement fillElem = doc.createElement( QStringLiteral( "se:Fill" ) );
|
||||
symbolizerElem.appendChild( fillElem );
|
||||
@ -3243,12 +3243,12 @@ void QgsPointPatternFillSymbolLayer::toSld( QDomDocument &doc, QDomElement &elem
|
||||
for ( int i = 0; i < mMarkerSymbol->symbolLayerCount(); i++ )
|
||||
{
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:PolygonSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
// <Geometry>
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
QDomElement fillElem = doc.createElement( QStringLiteral( "se:Fill" ) );
|
||||
symbolizerElem.appendChild( fillElem );
|
||||
|
@ -139,7 +139,7 @@ QString QgsRendererRange::dump() const
|
||||
|
||||
void QgsRendererRange::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props, bool firstRange ) const
|
||||
{
|
||||
if ( !mSymbol || props.value( QStringLiteral( "attribute" ), QLatin1String( "" ) ).isEmpty() )
|
||||
if ( !mSymbol || props.value( QStringLiteral( "attribute" ), QString() ).isEmpty() )
|
||||
return;
|
||||
|
||||
QString attrName = props[ QStringLiteral( "attribute" )];
|
||||
@ -1597,7 +1597,7 @@ QgsGraduatedSymbolRenderer *QgsGraduatedSymbolRenderer::convertFromRenderer( con
|
||||
|
||||
if ( !r )
|
||||
{
|
||||
r = new QgsGraduatedSymbolRenderer( QLatin1String( "" ), QgsRangeList() );
|
||||
r = new QgsGraduatedSymbolRenderer( QString(), QgsRangeList() );
|
||||
QgsRenderContext context;
|
||||
QgsSymbolList symbols = const_cast<QgsFeatureRenderer *>( renderer )->symbols( context );
|
||||
if ( !symbols.isEmpty() )
|
||||
|
@ -384,12 +384,12 @@ void QgsSimpleLineSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, c
|
||||
return;
|
||||
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:LineSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
// <Geometry>
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
// <Stroke>
|
||||
QDomElement strokeElem = doc.createElement( QStringLiteral( "se:Stroke" ) );
|
||||
@ -1390,12 +1390,12 @@ void QgsMarkerLineSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, c
|
||||
for ( int i = 0; i < mMarker->symbolLayerCount(); i++ )
|
||||
{
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:LineSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
// <Geometry>
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
QString gap;
|
||||
switch ( mPlacement )
|
||||
|
@ -141,13 +141,13 @@ QgsFeatureRenderer *QgsPointDisplacementRenderer::create( QDomElement &symbology
|
||||
QFont labelFont;
|
||||
if ( !QgsFontUtils::setFromXmlChildNode( labelFont, symbologyElem, QStringLiteral( "labelFontProperties" ) ) )
|
||||
{
|
||||
labelFont.fromString( symbologyElem.attribute( QStringLiteral( "labelFont" ), QLatin1String( "" ) ) );
|
||||
labelFont.fromString( symbologyElem.attribute( QStringLiteral( "labelFont" ), QString() ) );
|
||||
}
|
||||
r->setLabelFont( labelFont );
|
||||
r->setPlacement( static_cast< Placement >( symbologyElem.attribute( QStringLiteral( "placement" ), QStringLiteral( "0" ) ).toInt() ) );
|
||||
r->setCircleWidth( symbologyElem.attribute( QStringLiteral( "circleWidth" ), QStringLiteral( "0.4" ) ).toDouble() );
|
||||
r->setCircleColor( QgsSymbolLayerUtils::decodeColor( symbologyElem.attribute( QStringLiteral( "circleColor" ), QLatin1String( "" ) ) ) );
|
||||
r->setLabelColor( QgsSymbolLayerUtils::decodeColor( symbologyElem.attribute( QStringLiteral( "labelColor" ), QLatin1String( "" ) ) ) );
|
||||
r->setCircleColor( QgsSymbolLayerUtils::decodeColor( symbologyElem.attribute( QStringLiteral( "circleColor" ), QString() ) ) );
|
||||
r->setLabelColor( QgsSymbolLayerUtils::decodeColor( symbologyElem.attribute( QStringLiteral( "labelColor" ), QString() ) ) );
|
||||
r->setCircleRadiusAddition( symbologyElem.attribute( QStringLiteral( "circleRadiusAddition" ), QStringLiteral( "0.0" ) ).toDouble() );
|
||||
r->setMinimumLabelScale( symbologyElem.attribute( QStringLiteral( "maxLabelScaleDenominator" ), QStringLiteral( "-1" ) ).toDouble() );
|
||||
r->setTolerance( symbologyElem.attribute( QStringLiteral( "tolerance" ), QStringLiteral( "0.00001" ) ).toDouble() );
|
||||
|
@ -318,7 +318,7 @@ void QgsRuleBasedRenderer::Rule::toSld( QDomDocument &doc, QDomElement &element,
|
||||
|
||||
if ( !mFilterExp.isEmpty() )
|
||||
{
|
||||
if ( !props.value( QStringLiteral( "filter" ), QLatin1String( "" ) ).isEmpty() )
|
||||
if ( !props.value( QStringLiteral( "filter" ), QString() ).isEmpty() )
|
||||
props[ QStringLiteral( "filter" )] += QLatin1String( " AND " );
|
||||
props[ QStringLiteral( "filter" )] += mFilterExp;
|
||||
}
|
||||
@ -354,9 +354,9 @@ void QgsRuleBasedRenderer::Rule::toSld( QDomDocument &doc, QDomElement &element,
|
||||
ruleElem.appendChild( descrElem );
|
||||
}
|
||||
|
||||
if ( !props.value( QStringLiteral( "filter" ), QLatin1String( "" ) ).isEmpty() )
|
||||
if ( !props.value( QStringLiteral( "filter" ), QString() ).isEmpty() )
|
||||
{
|
||||
QgsSymbolLayerUtils::createFunctionElement( doc, ruleElem, props.value( QStringLiteral( "filter" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createFunctionElement( doc, ruleElem, props.value( QStringLiteral( "filter" ), QString() ) );
|
||||
}
|
||||
|
||||
QgsSymbolLayerUtils::applyScaleDependency( doc, ruleElem, props );
|
||||
|
@ -93,7 +93,7 @@ void QgsSingleSymbolRenderer::setSymbol( QgsSymbol *s )
|
||||
|
||||
QString QgsSingleSymbolRenderer::dump() const
|
||||
{
|
||||
return mSymbol ? QStringLiteral( "SINGLE: %1" ).arg( mSymbol->dump() ) : QLatin1String( "" );
|
||||
return mSymbol ? QStringLiteral( "SINGLE: %1" ).arg( mSymbol->dump() ) : QString();
|
||||
}
|
||||
|
||||
QgsSingleSymbolRenderer *QgsSingleSymbolRenderer::clone() const
|
||||
|
@ -597,7 +597,7 @@ void QgsSymbol::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap pro
|
||||
props[ QStringLiteral( "alpha" )] = QString::number( opacity() );
|
||||
double scaleFactor = 1.0;
|
||||
props[ QStringLiteral( "uom" )] = QgsSymbolLayerUtils::encodeSldUom( outputUnit(), &scaleFactor );
|
||||
props[ QStringLiteral( "uomScale" )] = ( !qgsDoubleNear( scaleFactor, 1.0 ) ? qgsDoubleToString( scaleFactor ) : QLatin1String( "" ) );
|
||||
props[ QStringLiteral( "uomScale" )] = ( !qgsDoubleNear( scaleFactor, 1.0 ) ? qgsDoubleToString( scaleFactor ) : QString() );
|
||||
|
||||
for ( QgsSymbolLayerList::const_iterator it = mLayers.begin(); it != mLayers.end(); ++it )
|
||||
{
|
||||
|
@ -690,12 +690,12 @@ void QgsFillSymbolLayer::_renderPolygon( QPainter *p, const QPolygonF &points, c
|
||||
void QgsMarkerSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const
|
||||
{
|
||||
QDomElement symbolizerElem = doc.createElement( QStringLiteral( "se:PointSymbolizer" ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QLatin1String( "" ) ) );
|
||||
if ( !props.value( QStringLiteral( "uom" ), QString() ).isEmpty() )
|
||||
symbolizerElem.setAttribute( QStringLiteral( "uom" ), props.value( QStringLiteral( "uom" ), QString() ) );
|
||||
element.appendChild( symbolizerElem );
|
||||
|
||||
// <Geometry>
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QLatin1String( "" ) ) );
|
||||
QgsSymbolLayerUtils::createGeometryElement( doc, symbolizerElem, props.value( QStringLiteral( "geom" ), QString() ) );
|
||||
|
||||
writeSldMarker( doc, symbolizerElem, props );
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ QString QgsSymbolLayerUtils::encodeSldFontStyle( QFont::Style style )
|
||||
case QFont::StyleOblique:
|
||||
return QStringLiteral( "oblique" );
|
||||
default:
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ QString QgsSymbolLayerUtils::encodeSldLineJoinStyle( Qt::PenJoinStyle style )
|
||||
case Qt::RoundJoin:
|
||||
return QStringLiteral( "round" );
|
||||
default:
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ QString QgsSymbolLayerUtils::encodeSldLineCapStyle( Qt::PenCapStyle style )
|
||||
case Qt::RoundCap:
|
||||
return QStringLiteral( "round" );
|
||||
default:
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1022,7 +1022,7 @@ static QString _nameForSymbolType( QgsSymbol::SymbolType type )
|
||||
case QgsSymbol::Fill:
|
||||
return QStringLiteral( "fill" );
|
||||
default:
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3156,7 +3156,7 @@ QgsNamedColorList QgsSymbolLayerUtils::colorListFromMimeData( const QMimeData *d
|
||||
|
||||
QPair< QColor, QString> namedColor;
|
||||
namedColor.first = QgsSymbolLayerUtils::decodeColor( currentElem.attribute( QStringLiteral( "color" ), QStringLiteral( "255,255,255,255" ) ) );
|
||||
namedColor.second = currentElem.attribute( QStringLiteral( "label" ), QLatin1String( "" ) );
|
||||
namedColor.second = currentElem.attribute( QStringLiteral( "label" ), QString() );
|
||||
|
||||
mimeColors << namedColor;
|
||||
}
|
||||
@ -4168,17 +4168,17 @@ QVector<qreal> QgsSymbolLayerUtils::rescaleUom( const QVector<qreal> &array, Qgs
|
||||
|
||||
void QgsSymbolLayerUtils::applyScaleDependency( QDomDocument &doc, QDomElement &ruleElem, QgsStringMap &props )
|
||||
{
|
||||
if ( !props.value( QStringLiteral( "scaleMinDenom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
if ( !props.value( QStringLiteral( "scaleMinDenom" ), QString() ).isEmpty() )
|
||||
{
|
||||
QDomElement scaleMinDenomElem = doc.createElement( QStringLiteral( "se:MinScaleDenominator" ) );
|
||||
scaleMinDenomElem.appendChild( doc.createTextNode( props.value( QStringLiteral( "scaleMinDenom" ), QLatin1String( "" ) ) ) );
|
||||
scaleMinDenomElem.appendChild( doc.createTextNode( props.value( QStringLiteral( "scaleMinDenom" ), QString() ) ) );
|
||||
ruleElem.appendChild( scaleMinDenomElem );
|
||||
}
|
||||
|
||||
if ( !props.value( QStringLiteral( "scaleMaxDenom" ), QLatin1String( "" ) ).isEmpty() )
|
||||
if ( !props.value( QStringLiteral( "scaleMaxDenom" ), QString() ).isEmpty() )
|
||||
{
|
||||
QDomElement scaleMaxDenomElem = doc.createElement( QStringLiteral( "se:MaxScaleDenominator" ) );
|
||||
scaleMaxDenomElem.appendChild( doc.createTextNode( props.value( QStringLiteral( "scaleMaxDenom" ), QLatin1String( "" ) ) ) );
|
||||
scaleMaxDenomElem.appendChild( doc.createTextNode( props.value( QStringLiteral( "scaleMaxDenom" ), QString() ) ) );
|
||||
ruleElem.appendChild( scaleMaxDenomElem );
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ QWidget *QgsAttributeTableView::createActionWidget( QgsFeatureId fid )
|
||||
if ( !mFilterModel->layer()->isEditable() && action.isEnabledOnlyWhenEditable() )
|
||||
continue;
|
||||
|
||||
QString actionTitle = !action.shortTitle().isEmpty() ? action.shortTitle() : action.icon().isNull() ? action.name() : QLatin1String( "" );
|
||||
QString actionTitle = !action.shortTitle().isEmpty() ? action.shortTitle() : action.icon().isNull() ? action.name() : QString();
|
||||
QAction *act = new QAction( action.icon(), actionTitle, container );
|
||||
act->setToolTip( action.name() );
|
||||
act->setData( "user_action" );
|
||||
|
@ -224,7 +224,7 @@ void QgsAuthCertInfo::setCertHierarchy()
|
||||
{
|
||||
QSslCertificate cert( it.previous() );
|
||||
bool missingCA = cert.isNull();
|
||||
QString cert_source( QLatin1String( "" ) );
|
||||
QString cert_source;
|
||||
if ( missingCA && it.hasPrevious() )
|
||||
{
|
||||
cert_source = QgsAuthCertUtils::resolvedCertName( it.peekPrevious(), true );
|
||||
@ -395,7 +395,7 @@ void QgsAuthCertInfo::addFieldItem( QTreeWidgetItem *parent, const QString &fiel
|
||||
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem(
|
||||
parent,
|
||||
QStringList() << field << ( wdgt == NoWidget ? value : QLatin1String( "" ) ),
|
||||
QStringList() << field << ( wdgt == NoWidget ? value : QString() ),
|
||||
( int )DetailsField );
|
||||
|
||||
item->setTextAlignment( 0, Qt::AlignRight );
|
||||
@ -818,7 +818,7 @@ void QgsAuthCertInfo::populateInfoPemTextSection()
|
||||
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem(
|
||||
mSecPemText,
|
||||
QStringList( QLatin1String( "" ) ),
|
||||
QStringList( QString() ),
|
||||
( int )DetailsField );
|
||||
|
||||
item->setFirstColumnSpanned( true );
|
||||
|
@ -84,7 +84,7 @@ void QgsAuthCertTrustPolicyComboBox::setDefaultTrustPolicy( QgsAuthCertUtils::Ce
|
||||
void QgsAuthCertTrustPolicyComboBox::highlightCurrentIndex( int indx )
|
||||
{
|
||||
QgsAuthCertUtils::CertTrustPolicy policy = ( QgsAuthCertUtils::CertTrustPolicy )itemData( indx ).toInt();
|
||||
QString ss( QLatin1String( "" ) );
|
||||
QString ss;
|
||||
|
||||
// TODO: why are these widget state selectors backwards?
|
||||
switch ( policy )
|
||||
|
@ -45,7 +45,7 @@ QgsAuthConfigEdit::QgsAuthConfigEdit( QWidget *parent, const QString &authcfg, c
|
||||
mAuthNotifyLayout = new QVBoxLayout;
|
||||
this->setLayout( mAuthNotifyLayout );
|
||||
|
||||
QString msg( disabled ? QgsApplication::authManager()->disabledMessage() : QLatin1String( "" ) );
|
||||
QString msg( disabled ? QgsApplication::authManager()->disabledMessage() : QString() );
|
||||
if ( !authcfg.isEmpty() )
|
||||
{
|
||||
msg += "\n\n" + tr( "Authentication config id not loaded: %1" ).arg( authcfg );
|
||||
|
@ -93,8 +93,8 @@ void QgsAuthConfigIdEdit::clear()
|
||||
void QgsAuthConfigIdEdit::updateValidityStyle( bool valid )
|
||||
{
|
||||
QString ss( QStringLiteral( "QLineEdit{" ) );
|
||||
ss += valid ? QLatin1String( "" ) : QStringLiteral( "color: %1;" ).arg( QgsAuthGuiUtils::redColor().name() );
|
||||
ss += !btnLock->isChecked() ? QLatin1String( "" ) : QStringLiteral( "background-color: %1;" ).arg( QgsAuthGuiUtils::yellowColor().name() );
|
||||
ss += valid ? QString() : QStringLiteral( "color: %1;" ).arg( QgsAuthGuiUtils::redColor().name() );
|
||||
ss += !btnLock->isChecked() ? QString() : QStringLiteral( "background-color: %1;" ).arg( QgsAuthGuiUtils::yellowColor().name() );
|
||||
ss += '}';
|
||||
|
||||
leAuthCfg->setStyleSheet( ss );
|
||||
|
@ -56,10 +56,10 @@ QgsAuthConfigSelect::QgsAuthConfigSelect( QWidget *parent, const QString &datapr
|
||||
btnConfigEdit->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionToggleEditing.svg" ) ) );
|
||||
btnConfigMsgClear->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconClose.svg" ) ) );
|
||||
|
||||
btnConfigAdd->setText( QStringLiteral( "" ) );
|
||||
btnConfigRemove->setText( QStringLiteral( "" ) );
|
||||
btnConfigEdit->setText( QStringLiteral( "" ) );
|
||||
btnConfigMsgClear->setText( QStringLiteral( "" ) );
|
||||
btnConfigAdd->setText( QString() );
|
||||
btnConfigRemove->setText( QString() );
|
||||
btnConfigEdit->setText( QString() );
|
||||
btnConfigMsgClear->setText( QString() );
|
||||
|
||||
leConfigMsg->setStyleSheet( QStringLiteral( "QLineEdit{background-color: %1}" )
|
||||
.arg( QgsAuthGuiUtils::yellowColor().name() ) );
|
||||
@ -121,7 +121,7 @@ void QgsAuthConfigSelect::loadConfig()
|
||||
|
||||
void QgsAuthConfigSelect::clearConfig()
|
||||
{
|
||||
cmbConfigSelect->setToolTip( QStringLiteral( "" ) );
|
||||
cmbConfigSelect->setToolTip( QString() );
|
||||
btnConfigEdit->setEnabled( false );
|
||||
btnConfigRemove->setEnabled( false );
|
||||
}
|
||||
|
@ -245,8 +245,8 @@ void QgsAuthGuiUtils::fileFound( bool found, QWidget *widget )
|
||||
}
|
||||
else
|
||||
{
|
||||
widget->setStyleSheet( QLatin1String( "" ) );
|
||||
widget->setToolTip( QLatin1String( "" ) );
|
||||
widget->setStyleSheet( QString() );
|
||||
widget->setToolTip( QString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ void QgsAuthImportCertDialog::validateCertificates()
|
||||
{
|
||||
mCerts.clear();
|
||||
teValidation->clear();
|
||||
teValidation->setStyleSheet( QLatin1String( "" ) );
|
||||
teValidation->setStyleSheet( QString() );
|
||||
|
||||
bool valid = false;
|
||||
QList<QSslCertificate> certs;
|
||||
|
@ -145,7 +145,7 @@ bool QgsAuthImportIdentityDialog::validateBundle()
|
||||
void QgsAuthImportIdentityDialog::clearValidation()
|
||||
{
|
||||
teValidation->clear();
|
||||
teValidation->setStyleSheet( QLatin1String( "" ) );
|
||||
teValidation->setStyleSheet( QString() );
|
||||
}
|
||||
|
||||
void QgsAuthImportIdentityDialog::writeValidation( const QString &msg,
|
||||
@ -431,8 +431,8 @@ void QgsAuthImportIdentityDialog::fileFound( bool found, QWidget *widget )
|
||||
}
|
||||
else
|
||||
{
|
||||
widget->setStyleSheet( QLatin1String( "" ) );
|
||||
widget->setToolTip( QLatin1String( "" ) );
|
||||
widget->setStyleSheet( QString() );
|
||||
widget->setToolTip( QString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ void QgsAuthSslConfigWidget::setUpSslConfigTree()
|
||||
mProtocolCmbBx->setCurrentIndex( 0 );
|
||||
QTreeWidgetItem *protocolitem = new QTreeWidgetItem(
|
||||
mProtocolItem,
|
||||
QStringList() << QLatin1String( "" ),
|
||||
QStringList() << QString(),
|
||||
( int )ConfigItem );
|
||||
protocolitem->setFlags( protocolitem->flags() & ~Qt::ItemIsSelectable );
|
||||
treeSslConfig->setItemWidget( protocolitem, 0, mProtocolCmbBx );
|
||||
@ -148,7 +148,7 @@ void QgsAuthSslConfigWidget::setUpSslConfigTree()
|
||||
mVerifyPeerCmbBx->setCurrentIndex( 0 );
|
||||
QTreeWidgetItem *peerverifycmbxitem = new QTreeWidgetItem(
|
||||
mVerifyModeItem,
|
||||
QStringList() << QLatin1String( "" ),
|
||||
QStringList() << QString(),
|
||||
( int )ConfigItem );
|
||||
peerverifycmbxitem->setFlags( peerverifycmbxitem->flags() & ~Qt::ItemIsSelectable );
|
||||
treeSslConfig->setItemWidget( peerverifycmbxitem, 0, mVerifyPeerCmbBx );
|
||||
@ -162,7 +162,7 @@ void QgsAuthSslConfigWidget::setUpSslConfigTree()
|
||||
mVerifyDepthSpnBx->setAlignment( Qt::AlignHCenter );
|
||||
QTreeWidgetItem *peerverifyspnbxitem = new QTreeWidgetItem(
|
||||
mVerifyDepthItem,
|
||||
QStringList() << QLatin1String( "" ),
|
||||
QStringList() << QString(),
|
||||
( int )ConfigItem );
|
||||
peerverifyspnbxitem->setFlags( peerverifyspnbxitem->flags() & ~Qt::ItemIsSelectable );
|
||||
treeSslConfig->setItemWidget( peerverifyspnbxitem, 0, mVerifyDepthSpnBx );
|
||||
@ -322,7 +322,7 @@ void QgsAuthSslConfigWidget::resetSslCertConfig()
|
||||
mCert.clear();
|
||||
mConnectionCAs.clear();
|
||||
leCommonName->clear();
|
||||
leCommonName->setStyleSheet( QLatin1String( "" ) );
|
||||
leCommonName->setStyleSheet( QString() );
|
||||
leHost->clear();
|
||||
|
||||
lblLoadedConfig->setVisible( false );
|
||||
|
@ -145,7 +145,7 @@ void QgsAuthSslImportDialog::accept()
|
||||
|
||||
void QgsAuthSslImportDialog::updateEnabledState()
|
||||
{
|
||||
leServer->setStyleSheet( QLatin1String( "" ) );
|
||||
leServer->setStyleSheet( QString() );
|
||||
|
||||
bool unconnected = !mSocket || mSocket->state() == QAbstractSocket::UnconnectedState;
|
||||
|
||||
@ -170,7 +170,7 @@ void QgsAuthSslImportDialog::secureConnect()
|
||||
return;
|
||||
}
|
||||
|
||||
leServer->setStyleSheet( QLatin1String( "" ) );
|
||||
leServer->setStyleSheet( QString() );
|
||||
clearStatusCertificateConfig();
|
||||
|
||||
if ( !mSocket )
|
||||
@ -416,7 +416,7 @@ void QgsAuthSslImportDialog::loadCertFromFile()
|
||||
}
|
||||
|
||||
wdgtSslConfig->setEnabled( true );
|
||||
wdgtSslConfig->setSslHost( QLatin1String( "" ) );
|
||||
wdgtSslConfig->setSslHost( QString() );
|
||||
wdgtSslConfig->setSslCertificate( cert );
|
||||
if ( !mSslErrors.isEmpty() )
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ void QgsTextEditWrapper::showIndeterminateState()
|
||||
mLineEdit->setPlaceholderText( QString() );
|
||||
}
|
||||
|
||||
setWidgetValue( QLatin1String( "" ) );
|
||||
setWidgetValue( QString() );
|
||||
|
||||
if ( mTextEdit )
|
||||
mTextEdit->blockSignals( false );
|
||||
|
@ -145,8 +145,8 @@ void QgsNewOgrConnection::accept()
|
||||
settings.setValue( baseKey + "/host", txtHost->text() );
|
||||
settings.setValue( baseKey + "/database", txtDatabase->text() );
|
||||
settings.setValue( baseKey + "/port", txtPort->text() );
|
||||
settings.setValue( baseKey + "/username", mAuthSettingsDatabase->storeUsernameIsChecked() ? mAuthSettingsDatabase->username() : QLatin1String( "" ) );
|
||||
settings.setValue( baseKey + "/password", mAuthSettingsDatabase->storePasswordIsChecked() ? mAuthSettingsDatabase->password() : QLatin1String( "" ) );
|
||||
settings.setValue( baseKey + "/username", mAuthSettingsDatabase->storeUsernameIsChecked() ? mAuthSettingsDatabase->username() : QString() );
|
||||
settings.setValue( baseKey + "/password", mAuthSettingsDatabase->storePasswordIsChecked() ? mAuthSettingsDatabase->password() : QString() );
|
||||
settings.setValue( baseKey + "/store_username", mAuthSettingsDatabase->storeUsernameIsChecked() ? "true" : "false" );
|
||||
settings.setValue( baseKey + "/store_password", mAuthSettingsDatabase->storePasswordIsChecked() ? "true" : "false" );
|
||||
settings.setValue( baseKey + "/configid", mAuthSettingsDatabase->configId() );
|
||||
|
@ -375,7 +375,7 @@ void QgsColorRampButton::createColorRamp()
|
||||
}
|
||||
else if ( rampType == tr( "Catalog: cpt-city" ) )
|
||||
{
|
||||
ramp = new QgsCptCityColorRamp( QLatin1String( "" ), QLatin1String( "" ) );
|
||||
ramp = new QgsCptCityColorRamp( QString(), QString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -231,11 +231,11 @@ void QgsCredentialDialog::requestCredentialsMasterPassword( QString *password, b
|
||||
|
||||
void QgsCredentialDialog::leMasterPass_textChanged( const QString &pass )
|
||||
{
|
||||
leMasterPass->setStyleSheet( QLatin1String( "" ) );
|
||||
leMasterPass->setStyleSheet( QString() );
|
||||
bool passok = !pass.isEmpty(); // regardless of new or comparing existing, empty password disallowed
|
||||
if ( leMasterPassVerify->isVisible() )
|
||||
{
|
||||
leMasterPassVerify->setStyleSheet( QLatin1String( "" ) );
|
||||
leMasterPassVerify->setStyleSheet( QString() );
|
||||
passok = passok && ( leMasterPass->text() == leMasterPassVerify->text() );
|
||||
}
|
||||
mOkButton->setEnabled( passok );
|
||||
@ -251,8 +251,8 @@ void QgsCredentialDialog::leMasterPassVerify_textChanged( const QString &pass )
|
||||
{
|
||||
if ( leMasterPassVerify->isVisible() )
|
||||
{
|
||||
leMasterPass->setStyleSheet( QLatin1String( "" ) );
|
||||
leMasterPassVerify->setStyleSheet( QLatin1String( "" ) );
|
||||
leMasterPass->setStyleSheet( QString() );
|
||||
leMasterPassVerify->setStyleSheet( QString() );
|
||||
|
||||
// empty password disallowed
|
||||
bool passok = !pass.isEmpty() && ( leMasterPass->text() == leMasterPassVerify->text() );
|
||||
|
@ -33,7 +33,7 @@ QgsErrorDialog::QgsErrorDialog( const QgsError &error, const QString &title, QWi
|
||||
setWindowTitle( title );
|
||||
|
||||
// QMessageBox has static standardIcon( Icon icon ), but it is marked as obsolete
|
||||
QMessageBox messageBox( QMessageBox::Critical, QLatin1String( "" ), QLatin1String( "" ) );
|
||||
QMessageBox messageBox( QMessageBox::Critical, QString(), QString() );
|
||||
mIconLabel->setPixmap( messageBox.iconPixmap() );
|
||||
mSummaryTextBrowser->setOpenExternalLinks( true );
|
||||
mDetailTextBrowser->setOpenExternalLinks( true );
|
||||
|
@ -77,7 +77,7 @@ QString QgsFieldComboBox::currentField() const
|
||||
const QModelIndex proxyIndex = mFieldProxyModel->index( i, 0 );
|
||||
if ( !proxyIndex.isValid() )
|
||||
{
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString name = mFieldProxyModel->data( proxyIndex, QgsFieldModel::FieldNameRole ).toString();
|
||||
|
@ -298,7 +298,7 @@ void QgsFieldExpressionWidget::currentFieldChanged()
|
||||
}
|
||||
else
|
||||
{
|
||||
mCombo->setToolTip( QLatin1String( "" ) );
|
||||
mCombo->setToolTip( QString() );
|
||||
}
|
||||
|
||||
emit fieldChanged( fieldName );
|
||||
|
@ -176,6 +176,6 @@ void QgsFieldValidator::fixup( QString &s ) const
|
||||
else if ( mField.type() == QVariant::Date )
|
||||
{
|
||||
// invalid dates will also translate to NULL
|
||||
s = QLatin1String( "" );
|
||||
s = QString();
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ void QgsFormAnnotation::writeXml( QDomElement &elem, QDomDocument &doc, const Qg
|
||||
|
||||
void QgsFormAnnotation::readXml( const QDomElement &itemElem, const QgsReadWriteContext &context )
|
||||
{
|
||||
mDesignerForm = itemElem.attribute( QStringLiteral( "designerForm" ), QLatin1String( "" ) );
|
||||
mDesignerForm = itemElem.attribute( QStringLiteral( "designerForm" ), QString() );
|
||||
QDomElement annotationElem = itemElem.firstChildElement( QStringLiteral( "AnnotationItem" ) );
|
||||
if ( !annotationElem.isNull() )
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ bool QgsKeyValueModel::insertRows( int position, int rows, const QModelIndex &pa
|
||||
beginInsertRows( QModelIndex(), position, position + rows - 1 );
|
||||
for ( int i = 0; i < rows; ++i )
|
||||
{
|
||||
mLines.insert( position, Line( QLatin1String( "" ), QVariant() ) );
|
||||
mLines.insert( position, Line( QString(), QVariant() ) );
|
||||
}
|
||||
endInsertRows();
|
||||
return true;
|
||||
|
@ -82,7 +82,7 @@ void QgsLegendFilterButton::onSetLegendFilterExpression()
|
||||
void QgsLegendFilterButton::onClearFilterExpression()
|
||||
{
|
||||
mClearExpressionAction->setEnabled( false );
|
||||
setExpressionText( QLatin1String( "" ) );
|
||||
setExpressionText( QString() );
|
||||
|
||||
setChecked( false );
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ void QgsMapLayerStyleManagerWidget::saveAsDefault()
|
||||
case 0:
|
||||
return;
|
||||
case 2:
|
||||
layer->saveStyleToDatabase( QLatin1String( "" ), QLatin1String( "" ), true, QLatin1String( "" ), errorMsg );
|
||||
layer->saveStyleToDatabase( QString(), QString(), true, QString(), errorMsg );
|
||||
if ( errorMsg.isNull() )
|
||||
{
|
||||
return;
|
||||
|
@ -754,7 +754,7 @@ bool QgsMapToolIdentify::identifyRasterLayer( QList<IdentifyResult> *results, Qg
|
||||
{
|
||||
QString value = it.value().toString();
|
||||
attributes.clear();
|
||||
attributes.insert( QLatin1String( "" ), value );
|
||||
attributes.insert( QString(), value );
|
||||
|
||||
QString label = layer->subLayers().value( it.key() );
|
||||
results->append( IdentifyResult( qobject_cast<QgsMapLayer *>( layer ), label, attributes, derivedAttributes ) );
|
||||
|
@ -95,7 +95,7 @@ QgsNewVectorLayerDialog::QgsNewVectorLayerDialog( QWidget *parent, Qt::WindowFla
|
||||
}
|
||||
mFileEncoding->setCurrentIndex( encindex );
|
||||
|
||||
mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << QStringLiteral( "id" ) << QStringLiteral( "Integer" ) << QStringLiteral( "10" ) << QLatin1String( "" ) ) );
|
||||
mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << QStringLiteral( "id" ) << QStringLiteral( "Integer" ) << QStringLiteral( "10" ) << QString() ) );
|
||||
connect( mNameEdit, &QLineEdit::textChanged, this, &QgsNewVectorLayerDialog::nameChanged );
|
||||
connect( mAttributeView, &QTreeWidget::itemSelectionChanged, this, &QgsNewVectorLayerDialog::selectionChanged );
|
||||
|
||||
@ -191,7 +191,7 @@ void QgsNewVectorLayerDialog::mAddAttributeButton_clicked()
|
||||
{
|
||||
QString myName = mNameEdit->text();
|
||||
QString myWidth = mWidth->text();
|
||||
QString myPrecision = mPrecision->isEnabled() ? mPrecision->text() : QLatin1String( "" );
|
||||
QString myPrecision = mPrecision->isEnabled() ? mPrecision->text() : QString();
|
||||
//use userrole to avoid translated type string
|
||||
QString myType = mTypeBox->currentData( Qt::UserRole ).toString();
|
||||
mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType << myWidth << myPrecision ) );
|
||||
@ -258,7 +258,7 @@ QString QgsNewVectorLayerDialog::runAndCreateLayer( QWidget *parent, QString *pE
|
||||
geomDialog.setCrs( crs );
|
||||
if ( geomDialog.exec() == QDialog::Rejected )
|
||||
{
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
QgsWkbTypes::Type geometrytype = geomDialog.selectedType();
|
||||
|
@ -51,7 +51,7 @@ void QgsOrderByDialog::setOrderBy( const QgsFeatureRequest::OrderBy &orderBy )
|
||||
}
|
||||
|
||||
// Add an empty widget at the end
|
||||
setRow( i, QgsFeatureRequest::OrderByClause( QLatin1String( "" ) ) );
|
||||
setRow( i, QgsFeatureRequest::OrderByClause( QString() ) );
|
||||
}
|
||||
|
||||
QgsFeatureRequest::OrderBy QgsOrderByDialog::orderBy()
|
||||
@ -106,7 +106,7 @@ void QgsOrderByDialog::onExpressionChanged( const QString &expression )
|
||||
else if ( !expression.isEmpty() && row == mOrderByTableWidget->rowCount() - 1 )
|
||||
{
|
||||
mOrderByTableWidget->insertRow( mOrderByTableWidget->rowCount() );
|
||||
setRow( row + 1, QgsFeatureRequest::OrderByClause( QLatin1String( "" ) ) );
|
||||
setRow( row + 1, QgsFeatureRequest::OrderByClause( QString() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,7 @@ QString QgsProjectionSelectionTreeWidget::selectedProj4String()
|
||||
// Get the selected node
|
||||
QTreeWidgetItem *item = lstCoordinateSystems->currentItem();
|
||||
if ( !item || item->text( QgisCrsIdColumn ).isEmpty() )
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
|
||||
QString srsId = item->text( QgisCrsIdColumn );
|
||||
|
||||
@ -372,7 +372,7 @@ QString QgsProjectionSelectionTreeWidget::selectedProj4String()
|
||||
if ( rc )
|
||||
{
|
||||
showDBMissingWarning( databaseFileName );
|
||||
return QLatin1String( "" );
|
||||
return QString();
|
||||
}
|
||||
|
||||
// prepare the sql statement
|
||||
@ -676,7 +676,7 @@ void QgsProjectionSelectionTreeWidget::loadCrsList( QSet<QString> *crsFilter )
|
||||
QTreeWidgetItem *newItem = nullptr;
|
||||
// Cache some stuff to speed up creating of the list of projected
|
||||
// spatial reference systems
|
||||
QString previousSrsType( QLatin1String( "" ) );
|
||||
QString previousSrsType;
|
||||
QTreeWidgetItem *previousSrsTypeNode = nullptr;
|
||||
|
||||
while ( sqlite3_step( stmt ) == SQLITE_ROW )
|
||||
|
@ -177,7 +177,7 @@ void QgsQueryBuilder::btnSampleValues_clicked()
|
||||
QString prevSubsetString = mLayer->subsetString();
|
||||
if ( mUseUnfilteredLayer->isChecked() && !prevSubsetString.isEmpty() )
|
||||
{
|
||||
mLayer->setSubsetString( QLatin1String( "" ) );
|
||||
mLayer->setSubsetString( QString() );
|
||||
}
|
||||
|
||||
//Clear and fill the mModelValues
|
||||
@ -198,7 +198,7 @@ void QgsQueryBuilder::btnGetAllValues_clicked()
|
||||
QString prevSubsetString = mLayer->subsetString();
|
||||
if ( mUseUnfilteredLayer->isChecked() && !prevSubsetString.isEmpty() )
|
||||
{
|
||||
mLayer->setSubsetString( QLatin1String( "" ) );
|
||||
mLayer->setSubsetString( QString() );
|
||||
}
|
||||
|
||||
//Clear and fill the mModelValues
|
||||
@ -409,7 +409,7 @@ void QgsQueryBuilder::onTextChanged( const QString &text )
|
||||
void QgsQueryBuilder::clear()
|
||||
{
|
||||
txtSQL->clear();
|
||||
mLayer->setSubsetString( QLatin1String( "" ) );
|
||||
mLayer->setSubsetString( QString() );
|
||||
mUseUnfilteredLayer->setDisabled( true );
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ QgsRasterFormatSaveOptionsWidget::QgsRasterFormatSaveOptionsWidget( QWidget *par
|
||||
if ( sBuiltinProfiles.isEmpty() )
|
||||
{
|
||||
// key=profileKey values=format,profileName,options
|
||||
sBuiltinProfiles[ QStringLiteral( "z_adefault" )] = ( QStringList() << QLatin1String( "" ) << tr( "Default" ) << QLatin1String( "" ) );
|
||||
sBuiltinProfiles[ QStringLiteral( "z_adefault" )] = ( QStringList() << QString() << tr( "Default" ) << QString() );
|
||||
|
||||
// these GTiff profiles are based on Tim's benchmarks at
|
||||
// http://linfiniti.com/2011/05/gdal-efficiency-of-various-compression-algorithms/
|
||||
@ -378,7 +378,7 @@ QString QgsRasterFormatSaveOptionsWidget::validateOptions( bool gui, bool report
|
||||
}
|
||||
else if ( ! createOptions.isEmpty() )
|
||||
{
|
||||
QMessageBox::information( this, QLatin1String( "" ), tr( "Cannot validate creation options." ), QMessageBox::Close );
|
||||
QMessageBox::information( this, QString(), tr( "Cannot validate creation options." ), QMessageBox::Close );
|
||||
if ( tmpLayer )
|
||||
delete rasterLayer;
|
||||
return QString();
|
||||
@ -389,11 +389,11 @@ QString QgsRasterFormatSaveOptionsWidget::validateOptions( bool gui, bool report
|
||||
if ( message.isNull() )
|
||||
{
|
||||
if ( reportOK )
|
||||
QMessageBox::information( this, QLatin1String( "" ), tr( "Valid" ), QMessageBox::Close );
|
||||
QMessageBox::information( this, QString(), tr( "Valid" ), QMessageBox::Close );
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning( this, QLatin1String( "" ), tr( "Invalid %1:\n\n%2\n\nClick on help button to get valid creation options for this format." ).arg( mPyramids ? tr( "pyramid creation option" ) : tr( "creation option" ), message ), QMessageBox::Close );
|
||||
QMessageBox::warning( this, QString(), tr( "Invalid %1:\n\n%2\n\nClick on help button to get valid creation options for this format." ).arg( mPyramids ? tr( "pyramid creation option" ) : tr( "creation option" ), message ), QMessageBox::Close );
|
||||
}
|
||||
}
|
||||
|
||||
@ -430,7 +430,7 @@ void QgsRasterFormatSaveOptionsWidget::mOptionsLineEdit_editingFinished()
|
||||
|
||||
void QgsRasterFormatSaveOptionsWidget::mProfileNewButton_clicked()
|
||||
{
|
||||
QString profileName = QInputDialog::getText( this, QLatin1String( "" ), tr( "Profile name:" ) );
|
||||
QString profileName = QInputDialog::getText( this, QString(), tr( "Profile name:" ) );
|
||||
if ( ! profileName.isEmpty() )
|
||||
{
|
||||
profileName = profileName.trimmed();
|
||||
|
@ -310,7 +310,7 @@ void QgsShortcutsManager::updateActionToolTip( QAction *action, const QString &s
|
||||
QString current = action->toolTip();
|
||||
// Remove the old shortcut.
|
||||
QRegExp rx( "\\(.*\\)" );
|
||||
current.replace( rx, QLatin1String( "" ) );
|
||||
current.replace( rx, QString() );
|
||||
|
||||
if ( !sequence.isEmpty() )
|
||||
{
|
||||
|
@ -113,8 +113,8 @@ QgsSQLComposerDialog::QgsSQLComposerDialog( QWidget *parent, Qt::WindowFlags fl
|
||||
mRemoveJoinButton->setEnabled( false );
|
||||
|
||||
mTableJoins->setRowCount( 0 );
|
||||
mTableJoins->setItem( 0, 0, new QTableWidgetItem( QLatin1String( "" ) ) );
|
||||
mTableJoins->setItem( 0, 1, new QTableWidgetItem( QLatin1String( "" ) ) );
|
||||
mTableJoins->setItem( 0, 0, new QTableWidgetItem( QString() ) );
|
||||
mTableJoins->setItem( 0, 1, new QTableWidgetItem( QString() ) );
|
||||
}
|
||||
|
||||
QgsSQLComposerDialog::~QgsSQLComposerDialog()
|
||||
@ -327,11 +327,11 @@ void QgsSQLComposerDialog::splitSQLIntoFields()
|
||||
if ( join->onExpr() )
|
||||
mTableJoins->setItem( iRow, 1, new QTableWidgetItem( join->onExpr()->dump() ) );
|
||||
else
|
||||
mTableJoins->setItem( iRow, 1, new QTableWidgetItem( QLatin1String( "" ) ) );
|
||||
mTableJoins->setItem( iRow, 1, new QTableWidgetItem( QString() ) );
|
||||
iRow ++;
|
||||
}
|
||||
mTableJoins->setItem( iRow, 0, new QTableWidgetItem( QLatin1String( "" ) ) );
|
||||
mTableJoins->setItem( iRow, 1, new QTableWidgetItem( QLatin1String( "" ) ) );
|
||||
mTableJoins->setItem( iRow, 0, new QTableWidgetItem( QString() ) );
|
||||
mTableJoins->setItem( iRow, 1, new QTableWidgetItem( QString() ) );
|
||||
|
||||
mAlreadyModifyingFields = false;
|
||||
}
|
||||
@ -718,8 +718,8 @@ void QgsSQLComposerDialog::mAddJoinButton_clicked()
|
||||
mTableJoins->setItem( row, 0, mTableJoins->takeItem( row - 1, 0 ) );
|
||||
mTableJoins->setItem( row, 1, mTableJoins->takeItem( row - 1, 1 ) );
|
||||
}
|
||||
mTableJoins->setItem( ( insertRow == rowCount ) ? insertRow : insertRow + 1, 0, new QTableWidgetItem( QLatin1String( "" ) ) );
|
||||
mTableJoins->setItem( ( insertRow == rowCount ) ? insertRow : insertRow + 1, 1, new QTableWidgetItem( QLatin1String( "" ) ) );
|
||||
mTableJoins->setItem( ( insertRow == rowCount ) ? insertRow : insertRow + 1, 0, new QTableWidgetItem( QString() ) );
|
||||
mTableJoins->setItem( ( insertRow == rowCount ) ? insertRow : insertRow + 1, 1, new QTableWidgetItem( QString() ) );
|
||||
}
|
||||
|
||||
void QgsSQLComposerDialog::mRemoveJoinButton_clicked()
|
||||
|
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