Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Nov 9, 2021
1 parent 0f68ec7 commit 0d674c7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 26 deletions.
25 changes: 6 additions & 19 deletions src/providers/hana/qgshanasourceselect.cpp
Expand Up @@ -29,6 +29,8 @@
#include "qgsquerybuilder.h"
#include "qgsvectorlayer.h"
#include "qgssettings.h"
#include "qgsdbfilterproxymodel.h"


#include <QComboBox>
#include <QFileDialog>
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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() );

Expand All @@ -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 );
}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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() )
{
Expand All @@ -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(
Expand Down
1 change: 0 additions & 1 deletion src/providers/mssql/qgsmssqlsourceselect.h
Expand Up @@ -20,7 +20,6 @@
#include "qgsguiutils.h"
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsabstractdatasourcewidget.h"
#include "qgsdbsourceselectbase.h"
#include "qgsmssqltablemodel.h"

Expand Down
3 changes: 2 additions & 1 deletion src/providers/oracle/qgsoraclesourceselect.cpp
Expand Up @@ -33,6 +33,7 @@ email : jef at norbit dot de
#include "qgsgui.h"
#include "qgsiconutils.h"
#include "qgsoracletablemodel.h"
#include "qgsdbfilterproxymodel.h"


#include <QFileDialog>
Expand Down Expand Up @@ -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 );
Expand Down
5 changes: 2 additions & 3 deletions src/providers/oracle/qgsoraclesourceselect.h
Expand Up @@ -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>
Expand Down Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/providers/spatialite/qgsspatialitesourceselect.h
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/providers/spatialite/qgsspatialitetablemodel.cpp
Expand Up @@ -20,6 +20,7 @@
#include "qgsiconutils.h"

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

0 comments on commit 0d674c7

Please sign in to comment.