Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement more intuitive editing of column names that are reserved
words.
Turn off debugging that caused all column names to be flagged as
reserved words


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4746 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jan 25, 2006
1 parent b46b1b8 commit d12455f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/spit/qgseditreservedwordsbase.ui
Expand Up @@ -147,7 +147,7 @@
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This shapefile contains reserved words. These may affect the import into PostgreSQL. Edit the column names so none of the reserved words listed at the right are used (double click the Column Name column to edit). You may also change any column name if desired.&lt;/p>&lt;/body>&lt;/html></string>
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This shapefile contains reserved words. These may affect the import into PostgreSQL. Edit the column names so none of the reserved words listed at the right are used (click on a Column Name entry to edit). You may also change any other column name if desired.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/spit/qgseditreservedwordsdialog.h
@@ -1,7 +1,7 @@
#ifndef QGSEDITRESERVEDWORDSDIALOG_H
#define QGSEDITRESERVEDWORDSDIALOG_H

// $Id:$
// $Id$

#include "ui_qgseditreservedwordsbase.h"
#include "qgisgui.h"
Expand All @@ -23,6 +23,8 @@ public slots:
void on_buttonCancel_clicked() { done(1); }
void on_buttonHelp_clicked() {};
void on_lvColumns_itemChanged(QTableWidgetItem* item) { checkWord(item); }
void on_lvColumns_itemClicked(QTableWidgetItem* item)
{ lvColumns->editItem(item); }

};
#endif //QGSEDITRESERVEDWORDSDIALOG_H
2 changes: 1 addition & 1 deletion src/plugins/spit/qgsspit.cpp
Expand Up @@ -232,7 +232,7 @@ void QgsSpit::addFile()
bool hasReservedWords = false;
// if a reserved word is found, set the flag so the "adjustment"
// dialog can be presented to the user
hasReservedWords = true;
hasReservedWords = false;
for ( int i = 0; i < file->column_names.size(); i++ )
{
if ( pgu->isReserved( file->column_names[ i ] ) )
Expand Down

0 comments on commit d12455f

Please sign in to comment.