unixODBC/enable-items.patch

53 lines
2.7 KiB
Diff

Allow drivers to be selected in ODBCConfig, per bug 544852.
diff -Naur unixODBC-2.2.14.orig/odbcinstQ4/CDataSourceNameList.cpp unixODBC-2.2.14/odbcinstQ4/CDataSourceNameList.cpp
--- unixODBC-2.2.14.orig/odbcinstQ4/CDataSourceNameList.cpp 2008-09-04 10:55:54.000000000 -0400
+++ unixODBC-2.2.14/odbcinstQ4/CDataSourceNameList.cpp 2009-12-19 18:31:39.000000000 -0500
@@ -346,15 +346,15 @@
setRowCount( nElement + 1 );
ptablewidgetitem = new QTableWidgetItem( szSectionName );
- ptablewidgetitem->setFlags( Qt::ItemIsSelectable );
+ ptablewidgetitem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
setItem( nElement, 0, ptablewidgetitem );
ptablewidgetitem = new QTableWidgetItem( szDescription );
- ptablewidgetitem->setFlags( Qt::ItemIsSelectable );
+ ptablewidgetitem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
setItem( nElement, 1, ptablewidgetitem );
ptablewidgetitem = new QTableWidgetItem( szDriver );
- ptablewidgetitem->setFlags( Qt::ItemIsSelectable );
+ ptablewidgetitem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
setItem( nElement, 2, ptablewidgetitem );
}
SQLSetConfigMode( ODBC_BOTH_DSN );
diff -Naur unixODBC-2.2.14.orig/odbcinstQ4/CDriverList.cpp unixODBC-2.2.14/odbcinstQ4/CDriverList.cpp
--- unixODBC-2.2.14.orig/odbcinstQ4/CDriverList.cpp 2008-09-04 11:57:53.000000000 -0400
+++ unixODBC-2.2.14/odbcinstQ4/CDriverList.cpp 2009-12-19 18:31:29.000000000 -0500
@@ -852,19 +852,19 @@
setRowCount( nRow + 1 );
ptablewidgetitem = new QTableWidgetItem( szDriverName );
- ptablewidgetitem->setFlags( Qt::ItemIsSelectable );
+ ptablewidgetitem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
setItem( nRow, 0, ptablewidgetitem );
ptablewidgetitem = new QTableWidgetItem( szDescription );
- ptablewidgetitem->setFlags( Qt::ItemIsSelectable );
+ ptablewidgetitem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
setItem( nRow, 1, ptablewidgetitem );
ptablewidgetitem = new QTableWidgetItem( szDriver );
- ptablewidgetitem->setFlags( Qt::ItemIsSelectable );
+ ptablewidgetitem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
setItem( nRow, 2, ptablewidgetitem );
ptablewidgetitem = new QTableWidgetItem( szSetup );
- ptablewidgetitem->setFlags( Qt::ItemIsSelectable );
+ ptablewidgetitem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
setItem( nRow, 3, ptablewidgetitem );
nRow++;