Permalink
Browse files

Better error messages

Show better error message in some cirsumstances. This is most notable
when dropping a (database) file onto the structure tree view when no
database file is opened.
  • Loading branch information...
MKleusberg committed Oct 20, 2017
1 parent 92a8681 commit 9cff69f534d614b9643c7e871ca07d1bca8de5fb
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/sqlitedb.cpp
@@ -685,7 +685,10 @@ bool DBBrowserDB::dump(const QString& filename,
bool DBBrowserDB::executeSQL(QString statement, bool dirtyDB, bool logsql)
{
if (!isOpen())
{
lastErrorMessage = tr("No database file opened");
return false;
}

statement = statement.trimmed();

@@ -715,7 +718,10 @@ bool DBBrowserDB::executeMultiSQL(const QString& statement, bool dirty, bool log
{
// First check if a DB is opened
if(!isOpen())
{
lastErrorMessage = tr("No database file opened");
return false;
}

QString query = statement.trimmed();

0 comments on commit 9cff69f

Please sign in to comment.