1
0
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:
Duncan Mac-Vicar P 2011-02-17 11:27:05 +01:00
parent b7a3fc7ab8
commit cf88820069
3 changed files with 7 additions and 7 deletions

View File

@ -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);

View File

@ -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()

View File

@ -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();