diff options
| author | 2015-04-04 14:41:10 -0400 | |
|---|---|---|
| committer | 2015-04-04 14:41:10 -0400 | |
| commit | b5f93b05578293d1d233b4920a28a5c2fd826f94 (patch) | |
| tree | 82332679f647e9c76e331206786d07a58dcfa9b8 /SQLiteStudio3/guiSQLiteStudio/dbtree | |
| parent | af8a7a3e3dccf9c9ad257e3952173d180c8a7421 (diff) | |
| parent | a5b034d4a9c44f9bc1e83b01de82530f8fc63013 (diff) | |
Merge tag 'upstream/3.0.4'
Upstream version 3.0.4
# gpg: Signature made Sat 04 Apr 2015 02:41:09 PM EDT using RSA key ID EBE9BD91
# gpg: Good signature from "Unit 193 <unit193@gmail.com>"
# gpg: aka "Unit 193 <unit193@ninthfloor.org>"
# gpg: aka "Unit 193 <unit193@ubuntu.com>"
# gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/dbtree')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.ui | 2 | ||||
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreemodel.cpp | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.ui b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.ui index 52b0c7b..755c9b0 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.ui @@ -14,7 +14,7 @@ <bool>false</bool> </property> <property name="features"> - <set>QDockWidget::AllDockWidgetFeatures</set> + <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set> </property> <property name="allowedAreas"> <set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set> diff --git a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreemodel.cpp b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreemodel.cpp index 281510f..a4e736f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreemodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtreemodel.cpp @@ -222,15 +222,16 @@ void DbTreeModel::restoreGroup(const Config::DbGroupPtr& group, QList<Db*>* dbLi } else { - // If db is managed by manager, it means it was successfully loaded. - // Otherwise there was a problem with the file, or with plugin for that database - // and we still want to have dbtree item for that database, we will just hide it. - // Later, when plugin is loaded, item might become visible. + db = DBLIST->getByName(group->referencedDbName); + + // Databases referenced in groups must exist on database list. If not, we ignore them. + // Even invalid (no plugin, no file) databases have entry in dblist. + if (!db) + return; + item = DbTreeItemFactory::createDb(group->referencedDbName, this); item->setDb(group->referencedDbName); - - db = DBLIST->getByName(group->referencedDbName); - if (db && dbList) + if (dbList) dbList->removeOne(db); } @@ -297,6 +298,7 @@ void DbTreeModel::dbUpdated(const QString& oldName, Db* db) item->setText(db->getName()); item->setDb(db->getName()); + item->updateDbIcon(); } void DbTreeModel::dbRemoved(Db* db) |
