Skip to content

Commit a1c9d57

Browse files
author
timlinux
committed
Temporarily disable postgres build stuff in windows - hopefully Im not 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@5987 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7317695 commit a1c9d57

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

src/gui/guiapp.pro

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ LIBS += $${GDALLIBADD}
2626
#LIBS += $${SQLITELIBADD}
2727
#LIBS += $${GEOSLIBADD}
2828
#LIBS += $${PROJLIBADD}
29-
#LIBS += $${QGISCORELIBADD}
29+
LIBS += $${QGISCORELIBADD}
3030
LIBS += $${QGISGUILIBADD}
3131
#LIBS += $${QGISPROJECTIONSELECTORLIBADD}
3232
DESTDIR=$${QGISBINDIR}
33-
#QT += qt3support svg core gui xml network
34-
QT += gui core
33+
QT += qt3support svg core gui xml network
3534
message("Building libs into $${DESTDIR}")
3635

3736

src/gui/qgisapp.cpp

+14-5
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@
140140
#include <ApplicationServices/ApplicationServices.h>
141141
#endif
142142

143+
#ifndef WIN32
143144
#ifdef HAVE_POSTGRESQL
144145
#include "qgsdbsourceselect.h"
145146
#endif
147+
#endif
146148

147149
#ifndef WIN32
148150
#include <dlfcn.h>
@@ -771,8 +773,10 @@ void QgisApp::createMenus()
771773
mLayerMenu = menuBar()->addMenu(tr("&Layer"));
772774
mLayerMenu->addAction(mActionAddNonDbLayer);
773775
mLayerMenu->addAction(mActionAddRasterLayer);
776+
#ifndef WIN32
774777
#ifdef HAVE_POSTGRESQL
775778
mLayerMenu->addAction(mActionAddLayer);
779+
#endif
776780
#endif
777781
mLayerMenu->addAction(mActionAddWmsLayer);
778782
mLayerMenu->addAction(mActionRemoveLayer);
@@ -835,8 +839,10 @@ void QgisApp::createToolBars()
835839
mLayerToolBar->setObjectName("LayerToolBar");
836840
mLayerToolBar->addAction(mActionAddNonDbLayer);
837841
mLayerToolBar->addAction(mActionAddRasterLayer);
842+
#ifndef WIN32
838843
#ifdef HAVE_POSTGRESQL
839844
mLayerToolBar->addAction(mActionAddLayer);
845+
#endif
840846
#endif
841847
mLayerToolBar->addAction(mActionAddWmsLayer);
842848
mLayerToolBar->addAction(mActionNewVectorLayer);
@@ -1939,9 +1945,10 @@ bool QgisApp::isValidVectorFileName(QString * theFileNameQString)
19391945
return isValidVectorFileName(*theFileNameQString);
19401946
}
19411947

1942-
#ifndef HAVE_POSTGRESQL
1948+
#ifndef WIN32
1949+
#ifndef HAVE_POSTGRESQL
19431950
void QgisApp::addDatabaseLayer(){}
1944-
#else
1951+
#else
19451952
void QgisApp::addDatabaseLayer()
19461953
{
19471954
// only supports postgis layers at present
@@ -1988,9 +1995,9 @@ void QgisApp::addDatabaseLayer()
19881995
layer->refreshLegend();
19891996

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

20192026
} // QgisApp::addDatabaseLayer()
2027+
#endif
2028+
#else
2029+
void QgisApp::addDatabaseLayer(){}
20202030
#endif
20212031

2022-
20232032
void QgisApp::addWmsLayer()
20242033
{
20252034
// Fudge for now

src/gui/qgsvectorlayer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class QgsVectorLayer : public QgsMapLayer
104104
void setDisplayField(QString fldName=0);
105105

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

109109
//! Initialize the context menu
110110
void initContextMenu(QgisApp * app);

src/gui/qgsvectorlayerproperties.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
#include "qgsuniquevaluedialog.h"
2929
#include "qgsvectordataprovider.h"
3030
#include "qgsvectorlayer.h"
31+
#ifndef WIN32
3132
#ifdef HAVE_POSTGRESQL
3233
#include "qgspgquerybuilder.h"
3334
#include "../providers/postgres/qgspostgresprovider.h"
3435
#endif
36+
#endif
3537

3638
#include <QMessageBox>
3739

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

321325
void QgsVectorLayerProperties::on_pbnQueryBuilder_clicked()
322326
{
327+
#ifndef WIN32
323328
#ifdef HAVE_POSTGRESQL
324329
// launch the query builder using the PostgreSQL connection
325330
// from the provider
@@ -351,6 +356,7 @@ void QgsVectorLayerProperties::on_pbnQueryBuilder_clicked()
351356
// delete the query builder object
352357
delete pqb;
353358
#endif
359+
#endif
354360
}
355361

356362
void QgsVectorLayerProperties::on_pbnIndex_clicked()

0 commit comments

Comments
 (0)