Skip to content
Permalink
Browse files
Temporarily disable postgres build stuff in windows - hopefully Im no…
…t breaking pg support on other OS's now? Fix pro files so QGIS.exe now builds.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5987 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 21, 2006
1 parent 9b66056 commit fa111e6c71499c985c31f5d3b5608fdddcdab64d
Showing with 23 additions and 9 deletions.
  1. +2 −3 src/gui/guiapp.pro
  2. +14 −5 src/gui/qgisapp.cpp
  3. +1 −1 src/gui/qgsvectorlayer.h
  4. +6 −0 src/gui/qgsvectorlayerproperties.cpp
@@ -26,12 +26,11 @@ LIBS += $${GDALLIBADD}
#LIBS += $${SQLITELIBADD}
#LIBS += $${GEOSLIBADD}
#LIBS += $${PROJLIBADD}
#LIBS += $${QGISCORELIBADD}
LIBS += $${QGISCORELIBADD}
LIBS += $${QGISGUILIBADD}
#LIBS += $${QGISPROJECTIONSELECTORLIBADD}
DESTDIR=$${QGISBINDIR}
#QT += qt3support svg core gui xml network
QT += gui core
QT += qt3support svg core gui xml network
message("Building libs into $${DESTDIR}")


@@ -140,9 +140,11 @@
#include <ApplicationServices/ApplicationServices.h>
#endif

#ifndef WIN32
#ifdef HAVE_POSTGRESQL
#include "qgsdbsourceselect.h"
#endif
#endif

#ifndef WIN32
#include <dlfcn.h>
@@ -771,8 +773,10 @@ void QgisApp::createMenus()
mLayerMenu = menuBar()->addMenu(tr("&Layer"));
mLayerMenu->addAction(mActionAddNonDbLayer);
mLayerMenu->addAction(mActionAddRasterLayer);
#ifndef WIN32
#ifdef HAVE_POSTGRESQL
mLayerMenu->addAction(mActionAddLayer);
#endif
#endif
mLayerMenu->addAction(mActionAddWmsLayer);
mLayerMenu->addAction(mActionRemoveLayer);
@@ -835,8 +839,10 @@ void QgisApp::createToolBars()
mLayerToolBar->setObjectName("LayerToolBar");
mLayerToolBar->addAction(mActionAddNonDbLayer);
mLayerToolBar->addAction(mActionAddRasterLayer);
#ifndef WIN32
#ifdef HAVE_POSTGRESQL
mLayerToolBar->addAction(mActionAddLayer);
#endif
#endif
mLayerToolBar->addAction(mActionAddWmsLayer);
mLayerToolBar->addAction(mActionNewVectorLayer);
@@ -1939,9 +1945,10 @@ bool QgisApp::isValidVectorFileName(QString * theFileNameQString)
return isValidVectorFileName(*theFileNameQString);
}

#ifndef HAVE_POSTGRESQL
#ifndef WIN32
#ifndef HAVE_POSTGRESQL
void QgisApp::addDatabaseLayer(){}
#else
#else
void QgisApp::addDatabaseLayer()
{
// only supports postgis layers at present
@@ -1988,9 +1995,9 @@ void QgisApp::addDatabaseLayer()
layer->refreshLegend();

// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
#ifdef QGISDEBUG
std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl;
#endif
#endif
QObject::connect(this,
SIGNAL(keyPressed(QKeyEvent *)),
layer,
@@ -2017,9 +2024,11 @@ void QgisApp::addDatabaseLayer()
// QApplication::restoreOverrideCursor();

} // QgisApp::addDatabaseLayer()
#endif
#else
void QgisApp::addDatabaseLayer(){}
#endif


void QgisApp::addWmsLayer()
{
// Fudge for now
@@ -104,7 +104,7 @@ class QgsVectorLayer : public QgsMapLayer
void setDisplayField(QString fldName=0);

//! Returns the primary display field name used in the identify results dialog
const QString displayField() const { return fieldIndex; }
const QString displayField() const { return fieldIndex; }

//! Initialize the context menu
void initContextMenu(QgisApp * app);
@@ -28,10 +28,12 @@
#include "qgsuniquevaluedialog.h"
#include "qgsvectordataprovider.h"
#include "qgsvectorlayer.h"
#ifndef WIN32
#ifdef HAVE_POSTGRESQL
#include "qgspgquerybuilder.h"
#include "../providers/postgres/qgspostgresprovider.h"
#endif
#endif

#include <QMessageBox>

@@ -262,6 +264,7 @@ void QgsVectorLayerProperties::on_pbnApply_clicked()
//
// Set up sql subset query if applicable
//
#ifndef WIN32
#ifdef HAVE_POSTGRESQL
QgsVectorDataProvider *dp = dynamic_cast<QgsVectorDataProvider *>(layer->getDataProvider());
//see if we are dealing with a pg layer here
@@ -275,6 +278,7 @@ void QgsVectorLayerProperties::on_pbnApply_clicked()
// update the extents of the layer (fetched from the provider)
layer->updateExtents();
}
#endif
#endif
// set up the scale based layer visibility stuff....
layer->setScaleBasedVisibility(chkUseScaleDependentRendering->isChecked());
@@ -320,6 +324,7 @@ void QgsVectorLayerProperties::on_pbnApply_clicked()

void QgsVectorLayerProperties::on_pbnQueryBuilder_clicked()
{
#ifndef WIN32
#ifdef HAVE_POSTGRESQL
// launch the query builder using the PostgreSQL connection
// from the provider
@@ -351,6 +356,7 @@ void QgsVectorLayerProperties::on_pbnQueryBuilder_clicked()
// delete the query builder object
delete pqb;
#endif
#endif
}

void QgsVectorLayerProperties::on_pbnIndex_clicked()

0 comments on commit fa111e6

Please sign in to comment.