mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-04-26 04:15:49 +02:00
rename action to openAction to add also forgetAction and others later
This commit is contained in:
parent
b7a3fc7ab8
commit
cf88820069
src/mirall
@ -44,7 +44,7 @@ void Application::setupContextMenu()
|
||||
{
|
||||
QMenu *contextMenu = new QMenu();
|
||||
contextMenu->addAction(_actionAddFolder);
|
||||
contextMenu->addAction(_folder->action());
|
||||
contextMenu->addAction(_folder->openAction());
|
||||
contextMenu->addSeparator();
|
||||
contextMenu->addAction(_actionQuit);
|
||||
_tray->setContextMenu(contextMenu);
|
||||
|
@ -15,17 +15,17 @@ Folder::Folder(const QString &path, QObject *parent)
|
||||
: QObject(parent),
|
||||
_path(path)
|
||||
{
|
||||
_action = new QAction(QIcon(FOLDER_ICON), path, this);
|
||||
QObject::connect(_action, SIGNAL(triggered(bool)), SLOT(slotOpenFolder()));
|
||||
_openAction = new QAction(QIcon(FOLDER_ICON), path, this);
|
||||
QObject::connect(_openAction, SIGNAL(triggered(bool)), SLOT(slotOpenFolder()));
|
||||
|
||||
_watcher = new Mirall::FolderWatcher(path, this);
|
||||
QObject::connect(_watcher, SIGNAL(folderChanged(const QString &)),
|
||||
SLOT(slotChanged(const QString &)));
|
||||
}
|
||||
|
||||
QAction * Folder::action() const
|
||||
QAction * Folder::openAction() const
|
||||
{
|
||||
return _action;
|
||||
return _openAction;
|
||||
}
|
||||
|
||||
Folder::~Folder()
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
Folder(const QString &path, QObject *parent = 0L);
|
||||
virtual ~Folder();
|
||||
|
||||
QAction *action() const;
|
||||
QAction *openAction() const;
|
||||
|
||||
/**
|
||||
* starts a sync operation
|
||||
@ -35,7 +35,7 @@ protected:
|
||||
private:
|
||||
QString _path;
|
||||
FolderWatcher *_watcher;
|
||||
QAction *_action;
|
||||
QAction *_openAction;
|
||||
private slots:
|
||||
void slotChanged(const QString &path);
|
||||
void slotOpenFolder();
|
||||
|
Loading…
Reference in New Issue
Block a user