mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[db_manager] Allow opening .sql files
and not only .SQL files also allow any file extension Fix #33173
This commit is contained in:
parent
0eee45aa16
commit
574e0ebaa1
@ -276,7 +276,7 @@ class DlgSqlWindow(QWidget, Ui_Dialog):
|
|||||||
self,
|
self,
|
||||||
self.tr('Save SQL Query'),
|
self.tr('Save SQL Query'),
|
||||||
lastDir,
|
lastDir,
|
||||||
self.tr("SQL File (*.sql, *.SQL)"))
|
self.tr("SQL File (*.sql *.SQL)"))
|
||||||
|
|
||||||
if filename:
|
if filename:
|
||||||
if not filename.lower().endswith('.sql'):
|
if not filename.lower().endswith('.sql'):
|
||||||
@ -295,7 +295,7 @@ class DlgSqlWindow(QWidget, Ui_Dialog):
|
|||||||
self,
|
self,
|
||||||
self.tr("Load SQL Query"),
|
self.tr("Load SQL Query"),
|
||||||
lastDir,
|
lastDir,
|
||||||
self.tr("SQL File (*.sql, *.SQL)"))
|
self.tr("SQL File (*.sql *.SQL);;All Files (*)"))
|
||||||
|
|
||||||
if filename:
|
if filename:
|
||||||
with open(filename, 'r') as f:
|
with open(filename, 'r') as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user