summaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/windows
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp8
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp10
2 files changed, 9 insertions, 9 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp
index 77a4adc..3a315db 100644
--- a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp
@@ -621,20 +621,20 @@ bool TableWindow::restoreSession(const QVariant& sessionValue)
QHash<QString, QVariant> value = sessionValue.toHash();
if (value.size() == 0)
{
- notifyWarn("Could not restore window, because no database or table was stored in session for this window.");
+ notifyWarn(tr("Could not restore window %1, because no database or table was stored in session for this window.").arg(value["title"].toString()));
return false;
}
if (!value.contains("db") || !value.contains("table"))
{
- notifyWarn("Could not restore window, because no database or table was stored in session for this window.");
+ notifyWarn(tr("Could not restore window '%1', because no database or table was stored in session for this window.").arg(value["title"].toString()));
return false;
}
db = DBLIST->getByName(value["db"].toString());
if (!db || !db->isValid() || (!db->isOpen() && !db->open()))
{
- notifyWarn(tr("Could not restore window, because database %1 could not be resolved.").arg(value["db"].toString()));
+ notifyWarn(tr("Could not restore window '%1', because database %2 could not be resolved.").arg(value["title"].toString(), value["db"].toString()));
return false;
}
@@ -643,7 +643,7 @@ bool TableWindow::restoreSession(const QVariant& sessionValue)
SchemaResolver resolver(db);
if (!resolver.getTables(database).contains(table, Qt::CaseInsensitive))
{
- notifyWarn(tr("Could not restore window, because the table %1 doesn't exist in the database %2.").arg(table).arg(db->getName()));
+ notifyWarn(tr("Could not restore window '%1'', because the table %2 doesn't exist in the database %3.").arg(value["title"].toString(), table, db->getName()));
return false;
}
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
index a699801..9a30e1c 100644
--- a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
@@ -99,26 +99,26 @@ bool ViewWindow::restoreSession(const QVariant& sessionValue)
QHash<QString, QVariant> value = sessionValue.toHash();
if (value.size() == 0)
{
- notifyWarn("Could not restore window, because no database or view was stored in session for this window.");
+ notifyWarn(tr("Could not restore window '%1', because no database or view was stored in session for this window.").arg(value["title"].toString()));
return false;
}
if (!value.contains("db") || !value.contains("view"))
{
- notifyWarn("Could not restore window, because no database or view was stored in session for this window.");
+ notifyWarn(tr("Could not restore window '%1', because no database or view was stored in session for this window.").arg(value["title"].toString()));
return false;
}
db = DBLIST->getByName(value["db"].toString());
if (!db)
{
- notifyWarn(tr("Could not restore window, because database %1 could not be resolved.").arg(value["db"].toString()));
+ notifyWarn(tr("Could not restore window '%1', because database %2 could not be resolved.").arg(value["title"].toString(), value["db"].toString()));
return false;
}
if (!db->isOpen() && !db->open())
{
- notifyWarn(tr("Could not restore window, because database %1 could not be open.").arg(value["db"].toString()));
+ notifyWarn(tr("Could not restore window '%1', because database %2 could not be open.").arg(value["title"].toString(), value["db"].toString()));
return false;
}
@@ -127,7 +127,7 @@ bool ViewWindow::restoreSession(const QVariant& sessionValue)
SchemaResolver resolver(db);
if (!resolver.getViews(database).contains(view, Qt::CaseInsensitive))
{
- notifyWarn(tr("Could not restore window, because the view %1 doesn't exist in the database %2.").arg(view).arg(db->getName()));
+ notifyWarn(tr("Could not restore window '%1', because the view %2 doesn't exist in the database %3.").arg(value["title"].toString(), view, db->getName()));
return false;
}