From 4038e16d247796fb6fd67f534c638789076522e6 Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@nokia.com>
Date: Wed, 3 Feb 2010 14:31:04 +0100
Subject: [PATCH] Removed unneeded action "Synchronize" from
 FolderNavigationWidget's context menu.

---
 .../projectexplorer/foldernavigationwidget.cpp    | 15 +--------------
 .../projectexplorer/foldernavigationwidget.h      |  1 -
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index 610033c378d..45c35ea881e 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -101,8 +101,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
       m_fileSystemModel(new QFileSystemModel(this)),
       m_filterModel(new DotRemovalFilter(this)),
       m_title(new QLabel(this)),
-      m_autoSync(false),
-      m_autoSyncAction(0)
+      m_autoSync(false)
 {
     m_fileSystemModel->setResolveSymlinks(false);
     m_fileSystemModel->setIconProvider(Core::FileIconProvider::instance());
@@ -161,9 +160,6 @@ void FolderNavigationWidget::setAutoSynchronization(bool sync)
         disconnect(fileManager, SIGNAL(currentFileChanged(QString)),
                 this, SLOT(setCurrentFile(QString)));
     }
-
-    if (m_autoSyncAction && m_autoSyncAction->isChecked() != m_autoSync)
-        m_autoSyncAction->setChecked(m_autoSync);
 }
 
 void FolderNavigationWidget::setCurrentFile(const QString &filePath)
@@ -294,15 +290,6 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
 
     // Open file dialog to choose a path starting from current
     QAction *actionChooseFolder = menu.addAction(tr("Choose folder..."));
-    // Sync checkable action
-    if (!m_autoSyncAction) {
-        m_autoSyncAction = new QAction(tr("Synchronize"), this);
-        m_autoSyncAction->setCheckable(true);
-        m_autoSyncAction->setChecked(autoSynchronization());
-        connect(m_autoSyncAction, SIGNAL(toggled(bool)), this, SLOT(setAutoSynchronization(bool)));
-    }
-    menu.addSeparator();
-    menu.addAction(m_autoSyncAction);
 
     QAction *action = menu.exec(ev->globalPos());
     if (!action)
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.h b/src/plugins/projectexplorer/foldernavigationwidget.h
index f63524105df..aee39b5cc11 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.h
+++ b/src/plugins/projectexplorer/foldernavigationwidget.h
@@ -93,7 +93,6 @@ private:
     QSortFilterProxyModel *m_filterModel;
     QLabel *m_title;
     bool m_autoSync;
-    QAction *m_autoSyncAction;
 };
 
 class FolderNavigationWidgetFactory : public Core::INavigationWidgetFactory
-- 
GitLab