Skip to content

Commit 280922a

Browse files
author
Emilio Loi
committed
[FEATURE] Load and Save SLD & QML styles to DB
Work done for ARPA Piemonte - Dipartimento Tematico Geologia e Dissesto
1 parent 49f1b53 commit 280922a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

doc/INSTALL.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
66
<TITLE>Quantum GIS (QGIS)</TITLE>
77

8-
<!-- Included /home/el1073/Faunalia/Quantum-GIS-master/doc/style.css -->
8+
<!-- Included /home/el1073/Faunalia/Quantum-GIS/doc/style.css -->
99
<STYLE TYPE="text/css">
1010
body{ background: white;
1111
color: black;
@@ -3188,5 +3188,5 @@ <H1>9. Authors and Acknowledgments</H1>
31883188

31893189
</DIV>
31903190
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
3191-
<!-- cmdline: txt2tags -o/home/el1073/Faunalia/Quantum-GIS-master/doc/INSTALL.html -t html /home/el1073/Faunalia/Quantum-GIS-master/doc/INSTALL.t2t -->
3191+
<!-- cmdline: txt2tags -o/home/el1073/Faunalia/Quantum-GIS/doc/INSTALL.html -t html /home/el1073/Faunalia/Quantum-GIS/doc/INSTALL.t2t -->
31923192
</BODY></HTML>

doc/news.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
66
<TITLE>Quantum GIS (QGIS) News</TITLE>
77

8-
<!-- Included /home/el1073/Faunalia/Quantum-GIS-master/doc/style.css -->
8+
<!-- Included /home/el1073/Faunalia/Quantum-GIS/doc/style.css -->
99
<STYLE TYPE="text/css">
1010
body{ background: white;
1111
color: black;
@@ -2613,5 +2613,5 @@ <H1>18. 0.5</H1>
26132613
</DIV>
26142614

26152615
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
2616-
<!-- cmdline: txt2tags -o/home/el1073/Faunalia/Quantum-GIS-master/doc/news.html -t html /home/el1073/Faunalia/Quantum-GIS-master/doc/news.t2t -->
2616+
<!-- cmdline: txt2tags -o/home/el1073/Faunalia/Quantum-GIS/doc/news.html -t html /home/el1073/Faunalia/Quantum-GIS/doc/news.t2t -->
26172617
</BODY></HTML>

src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3307,15 +3307,14 @@ QGISEXTERN bool saveStyle( const QString& uri, const QString& qmlStyle, const QS
33073307
result = conn->PQexec( checkQuery );
33083308
if( PQntuples( result ) > 0 )
33093309
{
3310-
sql = QObject::tr( "UPDATE %1 SET useAsDefault=%2, styleQML=XMLPARSE(DOCUMENT %3), styleSLD=XMLPARSE(DOCUMENT %4), description=%5, owner=%6, ui=XMLPARSE(DOCUMENT %7) WHERE f_table_catalog=%8 AND f_table_schema=%9 AND f_table_name=%10 AND f_geometry_column=%11 AND styleName=%12")
3310+
sql = QObject::tr( "UPDATE %1 SET useAsDefault=%2, styleQML=XMLPARSE(DOCUMENT %3), styleSLD=XMLPARSE(DOCUMENT %4), description=%5, owner=%6 WHERE f_table_catalog=%7 AND f_table_schema=%8 AND f_table_name=%9 AND f_geometry_column=%10 AND styleName=%11;")
33113311
.arg( styleTableName )
33123312
.arg( isdef )
33133313
.arg( QgsPostgresConn::quotedValue( qmlStyle
33143314
) )
33153315
.arg( QgsPostgresConn::quotedValue( sldStyle ) )
33163316
.arg( QgsPostgresConn::quotedValue( desc ) )
33173317
.arg( QgsPostgresConn::quotedValue( owner ) )
3318-
.arg( QgsPostgresConn::quotedValue( uiFileContent ) )
33193318
.arg( QgsPostgresConn::quotedValue( f_table_catalog ) )
33203319
.arg( QgsPostgresConn::quotedValue( f_table_schema ) )
33213320
.arg( QgsPostgresConn::quotedValue( f_table_name ) )
@@ -3401,7 +3400,7 @@ QGISEXTERN int listStyles( const QString& uri, QVector<QString> &ids, QVector<Q
34013400
f_geometry_column = dsUri.geometryColumn();
34023401

34033402
// ORDER BY (CASE WHEN useAsDefault THEN 1 ELSE 2 END), update_time DESC;")
3404-
QString selectRelatedQuery = QObject::tr( "SELECT id, styleName, description FROM %1 WHERE f_table_catalog=%2 AND f_table_schema=%3 AND f_table_name=%4 AND f_geometry_column=%5 AND useAsDefault=true;" )
3403+
QString selectRelatedQuery = QObject::tr( "SELECT id, styleName, description FROM %1 WHERE f_table_catalog=%2 AND f_table_schema=%3 AND f_table_name=%4 AND f_geometry_column=%5;" )
34053404
.arg( styleTableName )
34063405
.arg( QgsPostgresConn::quotedValue( f_table_catalog ) )
34073406
.arg( QgsPostgresConn::quotedValue( f_table_schema ) )

0 commit comments

Comments
 (0)