summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/tools/assistant/bookmarkfiltermodel.cpp37
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp5
2 files changed, 19 insertions, 23 deletions
diff --git a/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
index fe510a5..d60e537 100644
--- a/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
+++ b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
@@ -54,25 +54,24 @@ void BookmarkFilterModel::setSourceModel(QAbstractItemModel *_sourceModel)
{
beginResetModel();
- disconnect(sourceModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this,
- SLOT(changed(QModelIndex, QModelIndex)));
-
- disconnect(sourceModel, SIGNAL(rowsInserted(QModelIndex, int, int)),
- this, SLOT(rowsInserted(QModelIndex, int, int)));
-
- disconnect(sourceModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)),
- this, SLOT(rowsAboutToBeRemoved(QModelIndex, int, int)));
- disconnect(sourceModel, SIGNAL(rowsRemoved(QModelIndex, int, int)), this,
- SLOT(rowsRemoved(QModelIndex, int, int)));
-
- disconnect(sourceModel, SIGNAL(layoutAboutToBeChanged()), this,
- SLOT(layoutAboutToBeChanged()));
- disconnect(sourceModel, SIGNAL(layoutChanged()), this,
- SLOT(layoutChanged()));
-
- disconnect(sourceModel, SIGNAL(modelAboutToBeReset()), this,
- SLOT(modelAboutToBeReset()));
- disconnect(sourceModel, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ if (sourceModel) {
+ disconnect(sourceModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
+ this, SLOT(changed(QModelIndex, QModelIndex)));
+ disconnect(sourceModel, SIGNAL(rowsInserted(QModelIndex, int, int)),
+ this, SLOT(rowsInserted(QModelIndex, int, int)));
+ disconnect(sourceModel,
+ SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)), this,
+ SLOT(rowsAboutToBeRemoved(QModelIndex, int, int)));
+ disconnect(sourceModel, SIGNAL(rowsRemoved(QModelIndex, int, int)),
+ this, SLOT(rowsRemoved(QModelIndex, int, int)));
+ disconnect(sourceModel, SIGNAL(layoutAboutToBeChanged()), this,
+ SLOT(layoutAboutToBeChanged()));
+ disconnect(sourceModel, SIGNAL(layoutChanged()), this,
+ SLOT(layoutChanged()));
+ disconnect(sourceModel, SIGNAL(modelAboutToBeReset()), this,
+ SLOT(modelAboutToBeReset()));
+ disconnect(sourceModel, SIGNAL(modelReset()), this, SLOT(modelReset()));
+ }
QAbstractProxyModel::setSourceModel(sourceModel);
sourceModel = qobject_cast<BookmarkModel*> (_sourceModel);
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index d6b9e24..7852104 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -199,6 +199,7 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
}
QToolBar *toolBar = addToolBar(tr("Bookmark Toolbar"));
+ toolBar->setObjectName(QLatin1String("Bookmark Toolbar"));
bookMarkManager->setBookmarksToolbar(toolBar);
// Show the widget here, otherwise the restore geometry and state won't work
@@ -459,10 +460,6 @@ void MainWindow::setupActions()
menu->addAction(globalActions->printAction());
menu->addSeparator();
- m_closeTabAction = menu->addAction(tr("&Close Tab"), m_centralWidget,
- SLOT(closeTab()));
- m_closeTabAction->setShortcuts(QKeySequence::Close);
-
QIcon appExitIcon = QIcon::fromTheme("application-exit");
QAction *tmp;
#ifdef Q_OS_WIN