Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 fa111e6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/gui/guiapp.pro
Expand Up @@ -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}")


Expand Down
19 changes: 14 additions & 5 deletions src/gui/qgisapp.cpp
Expand Up @@ -140,9 +140,11 @@
#include <ApplicationServices/ApplicationServices.h>
#endif

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

#ifndef WIN32
#include <dlfcn.h>
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -2017,9 +2024,11 @@ void QgisApp::addDatabaseLayer()
// QApplication::restoreOverrideCursor();

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


void QgisApp::addWmsLayer()
{
// Fudge for now
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsvectorlayer.h
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions src/gui/qgsvectorlayerproperties.cpp
Expand Up @@ -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>

Expand Down Expand Up @@ -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
Expand All @@ -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());
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -351,6 +356,7 @@ void QgsVectorLayerProperties::on_pbnQueryBuilder_clicked()
// delete the query builder object
delete pqb;
#endif
#endif
}

void QgsVectorLayerProperties::on_pbnIndex_clicked()
Expand Down

0 comments on commit fa111e6

Please sign in to comment.