diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2011-01-07 13:03:52 (GMT) |
---|---|---|
committer | Christian Kandeler <christian.kandeler@nokia.com> | 2011-01-07 13:04:54 (GMT) |
commit | 9fd43b8bc40e3b7657dc7eba2dccff95f0d0077a (patch) | |
tree | 490a232d37d8db9230f5a7b5413dece09bcb50a5 /tools | |
parent | dc11a951d30ce1c668550ab5e7b487f00cca7f1a (diff) | |
download | Qt-9fd43b8bc40e3b7657dc7eba2dccff95f0d0077a.zip Qt-9fd43b8bc40e3b7657dc7eba2dccff95f0d0077a.tar.gz Qt-9fd43b8bc40e3b7657dc7eba2dccff95f0d0077a.tar.bz2 |
Assistant: Fix warnings.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/assistant/tools/assistant/bookmarkfiltermodel.cpp | 37 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/mainwindow.cpp | 5 |
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 |