Skip to content
Permalink
Browse files
fix build
  • Loading branch information
3nids committed Nov 9, 2021
1 parent 0f68ec7 commit 0d674c7e0a007dd3eed897758f752042795f7860
@@ -29,6 +29,8 @@
#include "qgsquerybuilder.h"
#include "qgsvectorlayer.h"
#include "qgssettings.h"
#include "qgsdbfilterproxymodel.h"


#include <QComboBox>
#include <QFileDialog>
@@ -198,9 +200,8 @@ QgsHanaSourceSelect::QgsHanaSourceSelect(
QWidget *parent,
Qt::WindowFlags fl,
QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsAbstractDataSourceWidget( parent, fl, theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
{
setupUi( this );
QgsGui::instance()->enableAutoGeometryRestore( this );

connect( btnConnect, &QPushButton::clicked, this, &QgsHanaSourceSelect::btnConnect_clicked );
@@ -249,10 +250,6 @@ QgsHanaSourceSelect::QgsHanaSourceSelect(
mTablesTreeView->setSelectionMode( settings.value( QStringLiteral( "qgis/addHanaDC" ), false ).toBool() ?
QAbstractItemView::ExtendedSelection : QAbstractItemView::MultiSelection );

//for Qt < 4.3.2, passing -1 to include all model columns
//in search does not seem to work
mSearchColumnComboBox->setCurrentIndex( 2 );

restoreGeometry( settings.value( QStringLiteral( "Windows/HanaSourceSelect/geometry" ) ).toByteArray() );
mHoldDialogOpen->setChecked( settings.value( QStringLiteral( "Windows/HanaSourceSelect/HoldDialogOpen" ), false ).toBool() );

@@ -262,16 +259,6 @@ QgsHanaSourceSelect::QgsHanaSourceSelect(
.arg( i ), mTablesTreeView->columnWidth( i ) ).toInt() );
}

//hide the search options by default
//they will be shown when the user ticks
//the search options group box
mSearchLabel->setVisible( false );
mSearchColumnComboBox->setVisible( false );
mSearchColumnsLabel->setVisible( false );
mSearchModeComboBox->setVisible( false );
mSearchModeLabel->setVisible( false );
mSearchTableEdit->setVisible( false );

cbxAllowGeometrylessTables->setDisabled( true );
}

@@ -437,7 +424,7 @@ void QgsHanaSourceSelect::addButtonClicked()
if ( idx.column() != QgsHanaTableModel::DbtmTable )
continue;

const QString uri = mTableModel->layerURI( mProxyModel->mapToSource( idx ), mConnectionName, mConnectionInfo );
const QString uri = mTableModel->layerURI( proxyModel()->mapToSource( idx ), mConnectionName, mConnectionInfo );
if ( uri.isNull() )
continue;

@@ -546,7 +533,7 @@ void QgsHanaSourceSelect::setSql( const QModelIndex &index )
return;
}

const QModelIndex idx = mProxyModel->mapToSource( index );
const QModelIndex idx = proxyModel()->mapToSource( index );
const QString uri = mTableModel->layerURI( idx, mConnectionName, mConnectionInfo );
if ( uri.isNull() )
{
@@ -562,7 +549,7 @@ void QgsHanaSourceSelect::setSql( const QModelIndex &index )

QgsQueryBuilder gb( &vlayer, this );
if ( gb.exec() )
mTableModel->setSql( mProxyModel->mapToSource( index ), gb.sql() );
mTableModel->setSql( proxyModel()->mapToSource( index ), gb.sql() );
}

QString QgsHanaSourceSelect::fullDescription(
@@ -20,7 +20,6 @@
#include "qgsguiutils.h"
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsabstractdatasourcewidget.h"
#include "qgsdbsourceselectbase.h"
#include "qgsmssqltablemodel.h"

@@ -33,6 +33,7 @@ email : jef at norbit dot de
#include "qgsgui.h"
#include "qgsiconutils.h"
#include "qgsoracletablemodel.h"
#include "qgsdbfilterproxymodel.h"


#include <QFileDialog>
@@ -172,7 +173,7 @@ void QgsOracleSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItem
}

QgsOracleSourceSelect::QgsOracleSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsAbstractDataSourceWidget( parent, fl, theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
{
QgsGui::instance()->enableAutoGeometryRestore( this );
setupButtons( buttonBox );
@@ -18,11 +18,10 @@
#define QGSORACLESOURCESELECT_H

#include "qgsguiutils.h"
#include "qgsdbfilterproxymodel.h"
#include "qgshelp.h"
#include "qgsoracleconnpool.h"
#include "qgsproviderregistry.h"
#include "qgsabstractdatasourcewidget.h"
#include "qgsdbsourceselectbase.h"

#include <QMap>
#include <QPair>
@@ -80,7 +79,7 @@ class QgsOracleSourceSelectDelegate : public QItemDelegate
* for Oracle databases. The user can then connect and add
* tables from the database to the map canvas.
*/
class QgsOracleSourceSelect : public QgsAbstractDataSourceWidget, private Ui::QgsDbSourceSelectBase
class QgsOracleSourceSelect : public QgsDbSourceSelectBase
{
Q_OBJECT

@@ -20,10 +20,8 @@
#include "qgsguiutils.h"
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsabstractdatasourcewidget.h"
#include "qgsdbsourceselectbase.h"


#include <QThread>
#include <QMap>
#include <QList>
@@ -20,6 +20,7 @@
#include "qgsiconutils.h"

QgsSpatiaLiteTableModel::QgsSpatiaLiteTableModel( QObject *parent )
: QgsAbstractDbTableModel( parent )
{
mColumns << tr( "Table" )
<< tr( "Type" )

0 comments on commit 0d674c7

Please sign in to comment.