Remove obsolete read only state from database. (#7324)

This commit is contained in:
Patrick Klein 2022-01-29 03:26:53 +01:00 committed by GitHub
parent c914c116e4
commit bce8c84c26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 28 additions and 120 deletions

View file

@ -513,20 +513,6 @@ void DatabaseTabWidget::showDatabaseSettings()
currentDatabaseWidget()->switchToDatabaseSettings();
}
bool DatabaseTabWidget::isReadOnly(int index) const
{
if (count() == 0) {
return false;
}
if (index == -1) {
index = currentIndex();
}
auto db = databaseWidgetFromIndex(index)->database();
return db && db->isReadOnly();
}
bool DatabaseTabWidget::isModified(int index) const
{
if (count() == 0) {
@ -543,7 +529,7 @@ bool DatabaseTabWidget::isModified(int index) const
bool DatabaseTabWidget::canSave(int index) const
{
return !isReadOnly(index) && isModified(index);
return isModified(index);
}
bool DatabaseTabWidget::hasLockableDatabases() const
@ -601,10 +587,6 @@ QString DatabaseTabWidget::tabName(int index)
tabName = tr("%1 [Locked]", "Database tab name modifier").arg(tabName);
}
if (db->isReadOnly()) {
tabName = tr("%1 [Read-only]", "Database tab name modifier").arg(tabName);
}
if (db->isModified()) {
tabName.append("*");
}