Updating of detail tabs besides list of tables works correctly again.

Had stopped working because the catalog now behaves a little different,
returning nullptr instead of an invalid element.
This commit is contained in:
eelke 2018-11-18 20:24:27 +01:00
parent fcb191f2cc
commit 52011a9842
12 changed files with 114 additions and 92 deletions

View file

@ -3,6 +3,7 @@
#include <QWidget>
#include <memory>
#include <optional>
#include <QItemSelection>
namespace Ui {
@ -25,7 +26,7 @@ class TablesPage : public QWidget
Q_OBJECT
public:
explicit TablesPage(MainWindow *parent = 0);
explicit TablesPage(MainWindow *parent = nullptr);
~TablesPage();
void setCatalog(std::shared_ptr<PgDatabaseCatalog> cat);
@ -46,7 +47,7 @@ private:
void retranslateUi(bool all = true);
QWidget* addDetailTab(QWidget *contents);
void selectedTableChanged(const PgClass & table);
void selectedTableChanged(const std::optional<PgClass> &table);
private slots:
void tableListTable_currentRowChanged(const QModelIndex &current, const QModelIndex &previous);