Skip to content
Snippets Groups Projects
Commit 4038e16d authored by Robert Loehning's avatar Robert Loehning
Browse files

Removed unneeded action "Synchronize" from FolderNavigationWidget's context menu.

parent 55bd2977
No related branches found
No related tags found
No related merge requests found
...@@ -101,8 +101,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) ...@@ -101,8 +101,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
m_fileSystemModel(new QFileSystemModel(this)), m_fileSystemModel(new QFileSystemModel(this)),
m_filterModel(new DotRemovalFilter(this)), m_filterModel(new DotRemovalFilter(this)),
m_title(new QLabel(this)), m_title(new QLabel(this)),
m_autoSync(false), m_autoSync(false)
m_autoSyncAction(0)
{ {
m_fileSystemModel->setResolveSymlinks(false); m_fileSystemModel->setResolveSymlinks(false);
m_fileSystemModel->setIconProvider(Core::FileIconProvider::instance()); m_fileSystemModel->setIconProvider(Core::FileIconProvider::instance());
...@@ -161,9 +160,6 @@ void FolderNavigationWidget::setAutoSynchronization(bool sync) ...@@ -161,9 +160,6 @@ void FolderNavigationWidget::setAutoSynchronization(bool sync)
disconnect(fileManager, SIGNAL(currentFileChanged(QString)), disconnect(fileManager, SIGNAL(currentFileChanged(QString)),
this, SLOT(setCurrentFile(QString))); this, SLOT(setCurrentFile(QString)));
} }
if (m_autoSyncAction && m_autoSyncAction->isChecked() != m_autoSync)
m_autoSyncAction->setChecked(m_autoSync);
} }
void FolderNavigationWidget::setCurrentFile(const QString &filePath) void FolderNavigationWidget::setCurrentFile(const QString &filePath)
...@@ -294,15 +290,6 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev) ...@@ -294,15 +290,6 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
// Open file dialog to choose a path starting from current // Open file dialog to choose a path starting from current
QAction *actionChooseFolder = menu.addAction(tr("Choose folder...")); 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()); QAction *action = menu.exec(ev->globalPos());
if (!action) if (!action)
......
...@@ -93,7 +93,6 @@ private: ...@@ -93,7 +93,6 @@ private:
QSortFilterProxyModel *m_filterModel; QSortFilterProxyModel *m_filterModel;
QLabel *m_title; QLabel *m_title;
bool m_autoSync; bool m_autoSync;
QAction *m_autoSyncAction;
}; };
class FolderNavigationWidgetFactory : public Core::INavigationWidgetFactory class FolderNavigationWidgetFactory : public Core::INavigationWidgetFactory
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment