Skip to content

Commit 32ea744

Browse files
author
jef
committed
db source select: move 'add' back to the first position in the button box
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15285 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 96ca5f0 commit 32ea744

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

src/app/postgres/qgspgsourceselect.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ QgsPgSourceSelect::QgsPgSourceSelect( QWidget *parent, Qt::WFlags fl )
5151
{
5252
setupUi( this );
5353

54+
mAddButton = new QPushButton( tr( "&Add" ) );
55+
buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );
56+
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addTables() ) );
57+
5458
mBuildQueryButton = new QPushButton( tr( "&Build query" ) );
5559
mBuildQueryButton->setToolTip( tr( "Build query" ) );
5660
buttonBox->addButton( mBuildQueryButton, QDialogButtonBox::ActionRole );
5761
connect( mBuildQueryButton, SIGNAL( clicked() ), this, SLOT( buildQuery() ) );
5862
mBuildQueryButton->setDisabled( true );
5963

60-
mAddButton = new QPushButton( tr( "&Add" ) );
61-
buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );
62-
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addTables() ) );
63-
6464
QPushButton *pb;
6565
pb = new QPushButton( tr( "&Save" ) );
6666
pb->setToolTip( tr( "Save connections" ) );

src/app/spatialite/qgsspatialitesourceselect.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QgisApp * app, Qt::WFlags
4747
connectionsGroupBox->setTitle( tr( "Databases" ) );
4848
btnEdit->hide(); // hide the edit button
4949

50-
mBuildQueryButton = new QPushButton( tr( "&Build Query" ) );
51-
buttonBox->addButton( mBuildQueryButton, QDialogButtonBox::ActionRole );
52-
connect( mBuildQueryButton, SIGNAL( clicked() ), this, SLOT( buildQuery() ) );
53-
mBuildQueryButton->setEnabled( false );
54-
5550
mAddButton = new QPushButton( tr( "&Add" ) );
5651
buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );
5752
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addClicked() ) );
5853
mAddButton->setEnabled( false );
5954

55+
mBuildQueryButton = new QPushButton( tr( "&Build Query" ) );
56+
buttonBox->addButton( mBuildQueryButton, QDialogButtonBox::ActionRole );
57+
connect( mBuildQueryButton, SIGNAL( clicked() ), this, SLOT( buildQuery() ) );
58+
mBuildQueryButton->setEnabled( false );
59+
6060
populateConnectionList();
6161

6262
mSearchModeComboBox->addItem( tr( "Wildcard" ) );

src/plugins/sqlanywhere/sasourceselect.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ SaSourceSelect::SaSourceSelect( QWidget *parent, Qt::WFlags fl )
5959
{
6060
setupUi( this );
6161

62+
mAddButton = new QPushButton( tr( "&Add" ) );
63+
buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );
64+
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addTables() ) );
65+
mAddButton->setEnabled( false );
66+
6267
mBuildQueryButton = new QPushButton( tr( "&Build Query" ) );
6368
buttonBox->addButton( mBuildQueryButton, QDialogButtonBox::ActionRole );
6469
connect( mBuildQueryButton, SIGNAL( clicked() ), this, SLOT( buildQuery() ) );
6570
mBuildQueryButton->setEnabled( false );
6671

67-
mAddButton = new QPushButton( tr( "&Add" ) );
68-
buttonBox->addButton( mAddButton, QDialogButtonBox::ActionRole );
69-
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addTables() ) );
70-
71-
mAddButton->setEnabled( false );
7272
populateConnectionList();
7373

7474
mSearchModeComboBox->addItem( tr( "Wildcard" ) );
@@ -180,7 +180,7 @@ void SaSourceSelect::buildQuery()
180180

181181
void SaSourceSelect::on_mTablesTreeView_clicked( const QModelIndex &index )
182182
{
183-
btnBuildQuery->setEnabled( index.parent().isValid() );
183+
mBuildQueryButton->setEnabled( index.parent().isValid() );
184184
}
185185

186186
void SaSourceSelect::on_mTablesTreeView_doubleClicked( const QModelIndex &index )

src/plugins/sqlanywhere/sasourceselectbase.ui

-10
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@
7777
</property>
7878
</widget>
7979
</item>
80-
<item>
81-
<widget class="QPushButton" name="btnBuildQuery" >
82-
<property name="enabled" >
83-
<bool>false</bool>
84-
</property>
85-
<property name="text" >
86-
<string>Build query</string>
87-
</property>
88-
</widget>
89-
</item>
9080
<item>
9181
<widget class="QGroupBox" name="mSearchGroupBox" >
9282
<property name="title" >

0 commit comments

Comments
 (0)