mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fixes #38979 : Fix oracle new connection greyed ok button
This commit is contained in:
parent
7f8c0365b1
commit
a3c4fe44ab
@ -195,6 +195,11 @@ void QgsOracleNewConnection::showHelp()
|
|||||||
|
|
||||||
void QgsOracleNewConnection::updateOkButtonState()
|
void QgsOracleNewConnection::updateOkButtonState()
|
||||||
{
|
{
|
||||||
bool enabled = !txtName->text().isEmpty() && !txtHost->text().isEmpty() && !txtPort->text().isEmpty() && !txtDatabase->text().isEmpty();
|
// User can set database without host and port, meaning he is using a service (tnsnames.ora)
|
||||||
|
// if he sets host, port has to be set also (and vice versa)
|
||||||
|
// https://github.com/qgis/QGIS/issues/38979
|
||||||
|
|
||||||
|
bool enabled = !txtName->text().isEmpty() && !txtDatabase->text().isEmpty()
|
||||||
|
&& ( txtHost->text().isEmpty() == txtPort->text().isEmpty() );
|
||||||
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
|
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,11 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_1">
|
<layout class="QGridLayout" name="gridLayout_1">
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="1" column="1" colspan="2">
|
||||||
<widget class="QLineEdit" name="txtDatabase"/>
|
<widget class="QLineEdit" name="txtDatabase">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Database name, or service name (described in tnsnames.ora) if no host and port has been set</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="2">
|
<item row="3" column="1" colspan="2">
|
||||||
<widget class="QLineEdit" name="txtPort">
|
<widget class="QLineEdit" name="txtPort">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user