Skip to content

Commit efb059a

Browse files
committed
fix reporting of postgres version
1 parent 055e0c9 commit efb059a

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

cmake/FindPostgres.cmake

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ if(${PostgreSQL_FOUND})
2323
set(POSTGRES_INCLUDE_DIR ${PostgreSQL_INCLUDE_DIRS})
2424
set(POSTGRES_LIBRARY ${PostgreSQL_LIBRARIES})
2525
set(POSTGRES_FOUND TRUE)
26-
if(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
27-
set(HAVE_PGCONFIG TRUE)
28-
endif()
2926
return()
3027
endif()
3128

@@ -118,11 +115,6 @@ ENDIF(WIN32 AND NOT ANDROID)
118115

119116
IF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
120117
SET(POSTGRES_FOUND TRUE)
121-
IF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
122-
SET(HAVE_PGCONFIG TRUE)
123-
ELSE(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
124-
SET(HAVE_PGCONFIG FALSE)
125-
ENDIF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
126118
ENDIF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
127119

128120

src/app/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ target_compile_features(qgis_app PRIVATE cxx_std_17)
541541

542542
target_compile_definitions(qgis_app PRIVATE "QT_PLUGINS_DIR=\"${QT_PLUGINS_DIR}\"")
543543
if (POSTGRES_FOUND)
544-
target_compile_definitions(qgis_app PRIVATE -DPOSTGRESQL_VERSION=${PostgreSQL_VERSION_STRING})
544+
target_compile_definitions(qgis_app PRIVATE -DPOSTGRESQL_VERSION=\"${PostgreSQL_VERSION_STRING}\")
545545
endif()
546546

547547
target_include_directories(qgis_app PUBLIC

src/app/qgisapp.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -538,20 +538,10 @@
538538

539539
// Editor widgets
540540
#include "qgseditorwidgetregistry.h"
541+
541542
//
542543
// Conditional Includes
543544
//
544-
#ifdef HAVE_PGCONFIG
545-
#undef PACKAGE_BUGREPORT
546-
#undef PACKAGE_NAME
547-
#undef PACKAGE_STRING
548-
#undef PACKAGE_TARNAME
549-
#undef PACKAGE_VERSION
550-
#include <pg_config.h>
551-
#else
552-
#define PG_VERSION "unknown"
553-
#endif
554-
555545
#include <sqlite3.h>
556546

557547
#ifdef HAVE_SPATIALITE
@@ -5579,7 +5569,7 @@ QString QgisApp::getVersionString()
55795569
// postgres
55805570
versionString += QStringLiteral( "<td>%1</td><td>" ).arg( tr( "PostgreSQL client version" ) );
55815571
#ifdef HAVE_POSTGRESQL
5582-
versionString += QStringLiteral( PG_VERSION );
5572+
versionString += QStringLiteral( POSTGRESQL_VERSION );
55835573
#else
55845574
versionString += tr( "No support" );
55855575
#endif

0 commit comments

Comments
 (0)