100 Commits

Author SHA1 Message Date
mhugent
39f11cf0b1 Fix for ticket #678: Attribute table add field, fieldtype select box is empty
git-svn-id: http://svn.osgeo.org/qgis/trunk@6831 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-03-24 15:32:25 +00:00
g_j_m
617ee8c06a Provide for a layer comment to be made available for vector layers
For postgres provider, get the layer comment from the table comment (if
it exists). Resolves ticket #244


git-svn-id: http://svn.osgeo.org/qgis/trunk@6726 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-28 09:06:19 +00:00
mhugent
2ed9f06828 Bugfix to allow classified postgres layers in 0.9
git-svn-id: http://svn.osgeo.org/qgis/trunk@6717 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-26 23:55:29 +00:00
g_j_m
a4a7d7c04f Decrease time taken to find key column in layers that come from postgres
views


git-svn-id: http://svn.osgeo.org/qgis/trunk@6685 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-24 02:05:41 +00:00
g_j_m
eae25d870f Do one less query per table column when loading a postgres layer.
Tidy up of sql lines too.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6684 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-23 21:26:59 +00:00
g_j_m
f57b006b92 Make postgres column comments available for the layer properties metadata
tab (address ticket #244)


git-svn-id: http://svn.osgeo.org/qgis/trunk@6677 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-23 05:45:49 +00:00
homann
e32f8e72d7 Applied patch #603. Thanks! (also fixed a compilation error introduced in r6610)
git-svn-id: http://svn.osgeo.org/qgis/trunk@6618 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-17 17:30:54 +00:00
g_j_m
c3decb76cf Changes to support a comment for each attribute in vector data. Now
requires support in providers. Addresses ticket #244.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6612 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-17 07:40:43 +00:00
g_j_m
2a35478a10 Potential fix for ticket #477 (slowness opening postgres databases that
contain lots of views). Needs some testing, which I'll do in a day or
so.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6610 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-17 06:56:41 +00:00
g_j_m
248644e0b8 Adjust indenting. no code changes
git-svn-id: http://svn.osgeo.org/qgis/trunk@6608 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-16 22:59:18 +00:00
g_j_m
a1f4991cd9 Fix compiler warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk@6490 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-02-02 08:08:04 +00:00
telwertowski
ce640e7322 Convert all uses of QMessageBox to Qt 4.2 StandardButton API.
Also add tr() where missing.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6441 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-01-18 19:39:53 +00:00
wonder
46a2d125a2 Merged refactoring branch back to trunk.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6415 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-01-09 02:39:15 +00:00
mhugent
5c60879f3f Fix for bug which prevented opening query builder from within vector layer properties dialog. The reason was that the last letter of the password has been cut
git-svn-id: http://svn.osgeo.org/qgis/trunk@6321 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-27 18:11:47 +00:00
g_j_m
0f83407633 Fix for ticket #277 (viewing views of views).
git-svn-id: http://svn.osgeo.org/qgis/trunk@6267 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-16 04:20:42 +00:00
g_j_m
e0249e3c19 Partial fix for ticket #277
git-svn-id: http://svn.osgeo.org/qgis/trunk@6266 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-16 00:39:18 +00:00
wonder
c53c866663 Postgres: escape quotes in field values
git-svn-id: http://svn.osgeo.org/qgis/trunk@6215 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-08 19:37:33 +00:00
g_j_m
17090c652a Fix for ticket #424 (recently saved projects that access postgres
won't load).


git-svn-id: http://svn.osgeo.org/qgis/trunk@6199 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-07 09:05:38 +00:00
timlinux
6db1c3ef11 Added some win ifdeffing. The postgris provider does not inherit from 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
2006-12-04 20:13:21 +00:00
g_j_m
3486d4bb0b Fix for ticket #406 (problems with copying selected attributes from a postgres
layer). Has the side-effect of eliminating the postgresql server 'no
transaction in progress warnings'.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6171 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-02 08:17:08 +00:00
g_j_m
b27481bd71 Yet another tweak to recent commits.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6159 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-01 00:52:43 +00:00
g_j_m
a9ab052318 Correct a small problem with loading postgres layers due to recent commits.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6158 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-12-01 00:46:53 +00:00
g_j_m
b2a13cf376 Cope with postgres schema and table names that contain . characters.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6152 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-11-30 21:26:30 +00:00
g_j_m
dfe849213f Fix for ticket #400 (postgresql passwords with spaces didn't work). Now
also works with other punctuation characters too.
Also a tidy up of some odd \ characters


git-svn-id: http://svn.osgeo.org/qgis/trunk@6113 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-11-18 20:44:53 +00:00
mhugent
f877dfb868 Use QgsDebugMessage for the debugging output in QgsPostgresProvider
git-svn-id: http://svn.osgeo.org/qgis/trunk@6008 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-10-25 09:52:50 +00:00
g_j_m
75b6817736 Reversion of change to the sql that worked out what view column depend on
which table columns - the recent commit didn't work when the database had more
than one view, and in fact made things worse. Needs further work.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5959 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-10-14 09:40:31 +00:00
g_j_m
c12cae236b Fix for ticket #277 (can't display data in postgres that is a view of a view)
The longstanding problem where views that renamed their column names weren't
loaded is also fixed.

Another problem where qgis wouldn't load a table where the table name or key
column name contained capital letters is also fixed (everything is now
laboriously quoted correctly).



git-svn-id: http://svn.osgeo.org/qgis/trunk@5957 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-10-14 08:48:28 +00:00
g_j_m
e642476c1c Fix for ticket #277 (problem loading a view of a view)
git-svn-id: http://svn.osgeo.org/qgis/trunk@5877 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-09-27 09:10:32 +00:00
morb_au
38dddd45f5 Fix for bug in trac ticket #134 and #131.
* (#134) If a feature is edited using the Identify tool and QgsAttributeDialog, now only user-edited values are saved to the mChangedAttributes of the layer, previously it was all values.  This now means that only those user-edited values are attempted to be committed when the user stops editing and saves (similar to if those values were edited using the Attribute Table).

* (#131) Modify QgsVectorLayer::stopEditing so that if a commit fails, the editing state is left alone (previously editing was still turned off anyway).  This should be a better fix than r5591.  I triggered the bug in #131 while testing for #134, therefore getting a 2-for-1 fix.

Some bonus features to assist people in the triggered situations described in #131 and #134:

* The Postgres Provider now reports an error to the user if a commit of changed attributes fails.  This brings it up to the same behaviour of if a commit of changed geometries fails.  Previously there was no response given on an changed attribute error, leaving the user to think the commit was successful.

* The Postgres Provider now reports the contents of the SQL used in a failed UPDATE statement.  This may help the user to pinpoint which of his edits caused the error.



git-svn-id: http://svn.osgeo.org/qgis/trunk@5694 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-08-13 09:30:12 +00:00
g_j_m
8195804c8d Alternative fix to that in r5637 - fields that the user didn't touch
are left to the database to fill in.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5639 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-07-26 09:24:18 +00:00
g_j_m
986ea537b6 If an SQL insert fails during committing new features to the database,
include the offending sql in the error dialog box.

Also fix the remaining part of ticket #131 - the code wasn't coping
correctly with blank data fields.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5637 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-07-25 10:35:53 +00:00
g_j_m
d454fdbebb Remove an unnecessary \0 pad to the end of the wkb char*. Also fix a
bug whereby the first byte after the wkb array was being set to \0


git-svn-id: http://svn.osgeo.org/qgis/trunk@5609 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-07-17 09:18:14 +00:00
g_j_m
e06bdcec65 Fix for the rest of ticket #130 (show the actual column default values
when getting the user to fill in the column values for a just digitised
feature).

Also add tr() to some user visible text.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5602 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-07-14 22:26:11 +00:00
g_j_m
034609617c Fix for ticket #161. Always quote the value in an 'UPDATE ... SET = value'
SQL statement - the database will ccorrectly interpret the quoted
text based on the data type of the column (e.g., text or numeric).


git-svn-id: http://svn.osgeo.org/qgis/trunk@5601 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-07-14 09:39:13 +00:00
morb_au
a68f1e0058 Copying selected features, and starting editing, no longer force all geometries of the copied-from layer to be cached, which was an (in my opinion) unfortunate side-effect of r5489.
Instead, for copying, the geometry and attributes are now retrieved from the provider in a random-access fashion.

For starting editing, the behaviour is regressed to the pre-r5489 idiom of geometry being cached as part of the screen redraw in editing mode.

This returns to the much better response when copying from large layers, with the additional benefit of copying selected features that had been panned off the canvas (previously a bug).

However, only Postgres and OGR providers have been updated to suit.  Hopefully this is enough for a 0.8 release.

Bonus feature: The layer properties now shows what access method is used to access individual geometries (random or sequential)

Since this is a large change it would be appreciated if others can double checking my testing.  (I have tested against PostGIS and MapInfo tables, and many different geometry adding/vertex editing combinations.)



git-svn-id: http://svn.osgeo.org/qgis/trunk@5595 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-07-14 03:11:25 +00:00
g_j_m
1d4d6377aa Change an assert to an error message to avoid any future crashes like
that in ticket #136


git-svn-id: http://svn.osgeo.org/qgis/trunk@5572 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-07-09 05:16:19 +00:00
g_j_m
814974bfe3 The real fix for ticket #153. Not sure what I was thinking when I did
r5552.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5553 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-06-28 08:55:14 +00:00
g_j_m
c8e57255b1 Fix for ticket #153.
The attribute table was failing to display the contents of the last column
in a table for tables where the geometry column was not the last
in the table.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5552 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-06-27 10:31:11 +00:00
morb_au
c59ea1d602 In the PostGIS provider, restored the ability to save added and
changed geometries to pre-1.0 PostGIS servers (pre-r3907).  This also now includes
the ability to sniff the PostGIS version.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5549 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-06-27 00:56:31 +00:00
g_j_m
0b12acaa9d Correct some user visible text
git-svn-id: http://svn.osgeo.org/qgis/trunk@5518 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-06-14 21:40:45 +00:00
g_j_m
7eb8a7c86e Capture a few unusual occurences with respect to views with unique
constraints but non-unique data. In response to ticket #143.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5514 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-06-11 09:43:00 +00:00
mhugent
44339a85d8 take DEFAULT as the postgres providers default value (instead of NULL)
git-svn-id: http://svn.osgeo.org/qgis/trunk@5509 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-06-07 05:55:42 +00:00
g_j_m
8e7de6fe7e Some more tweaks to debug statements
git-svn-id: http://svn.osgeo.org/qgis/trunk@5458 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-05-15 10:21:43 +00:00
g_j_m
41b46ebd0b Tidy up a few debugging output statements
git-svn-id: http://svn.osgeo.org/qgis/trunk@5457 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-05-15 09:34:05 +00:00
g_j_m
0eed881b33 Fix for ticket #108.
- Postgres provider: Remove some declared but not defined functions that
  were shadowing some inherited functions of the same name.

- Provide a function to give a version of the layer source without passwords
  in it for use in user visible places. Altered relevant code to use
  this.

- Moved the vector layer source text from the General tab into the
  Metadata tab in the vector properties box (fits better in there,
  particularly when the text is long).

- Added the sql text to the vector layer source text in appropriate places
  and fixed a few cases of where it wasn't propagating to all of the places
  that it should of been.

- Added a function to QgsDataSourceUri to give the uri in a single
  qstring for display purposes.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5423 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-05-07 05:29:25 +00:00
mhugent
efddf4b650 changed geometry type return of postgres provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@5421 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-05-05 12:35:04 +00:00
mhugent
329874901d fix for a bug which prevented commiting changed multiline geometries
git-svn-id: http://svn.osgeo.org/qgis/trunk@5419 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-05-04 15:03:32 +00:00
g_j_m
0d38805895 - Fix a couple of crashes when trying to load a postgres layer that contains
geometry types that Qgis doesn't support.

- Properly close the postgres connection if the layer fails to load

- Fix up a missing \n



git-svn-id: http://svn.osgeo.org/qgis/trunk@5278 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-04-14 10:55:52 +00:00
g_j_m
32fcc4a4db - Change to API for QgsMessageViewer (allow plain text or html input,
required changes in all code that uses QgsMessageViewer)

- Improvements to messages when qgis can't find a key column in a
postgres table
- Fix a couple of bugs when loading postgres tables (invalid layers
would appear to load, giving a legend entry, but not show anything on
the map)
- Tidy up of #includes in postgres files


git-svn-id: http://svn.osgeo.org/qgis/trunk@4911 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-02-28 06:50:37 +00:00
gsherman
9d02a24a3e Moved providers directory to src subdirectory
git-svn-id: http://svn.osgeo.org/qgis/trunk@4618 c8812cc2-4d05-0410-92ff-de0c093fc19c
2006-01-08 19:53:28 +00:00