Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[db_manager] Allow opening .sql files
and not only .SQL files
also allow any file extension

Fix #33173
  • Loading branch information
m-kuhn authored and nyalldawson committed Dec 1, 2019
1 parent 0eee45a commit 574e0eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -276,7 +276,7 @@ def saveAsFilePreset(self):
self,
self.tr('Save SQL Query'),
lastDir,
self.tr("SQL File (*.sql, *.SQL)"))
self.tr("SQL File (*.sql *.SQL)"))

if filename:
if not filename.lower().endswith('.sql'):
Expand All @@ -295,7 +295,7 @@ def loadFilePreset(self):
self,
self.tr("Load SQL Query"),
lastDir,
self.tr("SQL File (*.sql, *.SQL)"))
self.tr("SQL File (*.sql *.SQL);;All Files (*)"))

if filename:
with open(filename, 'r') as f:
Expand Down

0 comments on commit 574e0eb

Please sign in to comment.