Skip to content
Permalink
Browse files
[MSSQL] Fix refresh in browser node
  • Loading branch information
NathanW2 committed May 21, 2014
1 parent 9e67d7a commit 15e1129bb10c821b741ec77f84c3da9ed519b742
Showing with 11 additions and 4 deletions.
  1. +9 −4 src/providers/mssql/qgsmssqldataitems.cpp
  2. +2 −0 src/providers/mssql/qgsmssqldataitems.h
@@ -37,6 +37,14 @@ QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, QString nam
: QgsDataCollectionItem( parent, name, path )
{
mIcon = QgsApplication::getThemeIcon( "mIconConnect.png" );
}

QgsMssqlConnectionItem::~QgsMssqlConnectionItem()
{
}

void QgsMssqlConnectionItem::readConnectionSettings()
{
QSettings settings;
QString key = "/MSSQL/connections/" + mName;
mService = settings.value( key + "/service" ).toString();
@@ -63,10 +71,6 @@ QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, QString nam
mConnInfo += " estimatedmetadata=true";
}

QgsMssqlConnectionItem::~QgsMssqlConnectionItem()
{
}

void QgsMssqlConnectionItem::refresh()
{
QgsDebugMsg( "mPath = " + mPath );
@@ -95,6 +99,7 @@ QVector<QgsDataItem*> QgsMssqlConnectionItem::createChildren()

QVector<QgsDataItem*> children;

readConnectionSettings();
QSqlDatabase db = QgsMssqlProvider::GetDatabase( mService,
mHost, mDatabase, mUsername, mPassword );

@@ -83,6 +83,8 @@ class QgsMssqlConnectionItem : public QgsDataCollectionItem
bool mUseGeometryColumns;
bool mUseEstimatedMetadata;
bool mAllowGeometrylessTables;

void readConnectionSettings();
};

class QgsMssqlSchemaItem : public QgsDataCollectionItem

0 comments on commit 15e1129

Please sign in to comment.