Skip to content

Commit

Permalink
Added some win ifdeffing. The postgris provider does not inherit from…
Browse files Browse the repository at this point in the history
… QObjects so declaring signals and slots cause the qlibrary loader to throw a wobbly when trying to load the plugin. I tried making it inherit QObject but that wont compile due to ambiguous base class. So for no the signals are commented out. This should have little impact except removing a small feedback event when calculating recordset sizes....

git-svn-id: http://svn.osgeo.org/qgis/trunk@6184 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Dec 4, 2006
1 parent ce2ece0 commit 6db1c3e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/providers/postgres/postgres.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ TEMPLATE = lib
CONFIG(debug, debug|release){
TARGET = $$member(TARGET, 0)-debug
}
LIBS += $${GDALLIBADD}
#LIBS += $${GDALLIBADD}
LIBS += $${GEOSLIBADD}
LIBS += $${PROJLIBADD}
LIBS += $${POSTGRESLIBADD}
LIBS += $${QGISCORELIBADD}
LIBS += $${QGISGUILIBADD}
LIBS += $${QGISPROJECTIONSELECTORLIBADD}
DESTDIR=$${QGISPROVIDERDIR}
QT += qt3support svg core gui xml network
#QT += qt3support svg core gui xml network
QT += core gui qt3support xml
message("Building libs into $${DESTDIR}")

HEADERS += qgspostgresprovider.h \
Expand Down
4 changes: 3 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const QString POSTGRES_DESCRIPTION = "PostgreSQL/PostGIS data provider";


QgsPostgresProvider::QgsPostgresProvider(QString const & uri)
: QgsVectorDataProvider(uri),
: QgsVectorDataProvider(uri),
geomType(QGis::WKBUnknown),
gotPostgisVersion(FALSE)
{
Expand Down Expand Up @@ -2510,7 +2510,9 @@ void QgsPostgresProvider::customEvent( QCustomEvent * e )

QgsDebugMsg("QgsPostgresProvider: emitting fullExtentCalculated()");

#ifndef WIN32 //temporary hack for native win build
emit fullExtentCalculated();
#endif

// TODO: Only uncomment this when the overview map canvas has been subclassed
// from the QgsMapCanvas
Expand Down
7 changes: 6 additions & 1 deletion src/providers/postgres/qgspostgresprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ class QgsGeometry;
interface defined in the QgsDataProvider class to provide access to spatial
data residing in a PostgreSQL/PostGIS enabled database.
*/
class QgsPostgresProvider:public QgsVectorDataProvider
class QgsPostgresProvider: public QgsVectorDataProvider
{


#ifndef WIN32 //temporary hack for native win build
Q_OBJECT
#endif

public:
/**
Expand Down Expand Up @@ -331,6 +334,7 @@ class QgsPostgresProvider:public QgsVectorDataProvider



#ifndef WIN32 //temporary hack for native win build
signals:
/**
* This is emitted whenever the worker thread has fully calculated the
Expand All @@ -350,6 +354,7 @@ class QgsPostgresProvider:public QgsVectorDataProvider
* when the user adjusts the extent of the main map canvas.
*/
void repaintRequested();
#endif

private:

Expand Down

0 comments on commit 6db1c3e

Please sign in to comment.