mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
owncloudgui: Fix a small leak
The systray icon were not destroyed while qutting
This commit is contained in:
parent
10175c8d57
commit
2bba4134fb
@ -50,7 +50,6 @@ ownCloudGui::ownCloudGui(Application *parent) :
|
||||
_settingsDialog(new SettingsDialog(this)),
|
||||
#endif
|
||||
_logBrowser(0),
|
||||
_contextMenu(0),
|
||||
_recentActionsMenu(0),
|
||||
_folderOpenActionMapper(new QSignalMapper(this)),
|
||||
_recentItemsMapper(new QSignalMapper(this)),
|
||||
@ -303,11 +302,11 @@ void ownCloudGui::setupContextMenu()
|
||||
_recentActionsMenu->addAction(tr("None."));
|
||||
_recentActionsMenu->addAction(_actionRecent);
|
||||
} else {
|
||||
_contextMenu = new QMenu(_contextMenu);
|
||||
_recentActionsMenu = new QMenu(tr("Recent Changes"));
|
||||
_contextMenu.reset(new QMenu());
|
||||
_recentActionsMenu = new QMenu(tr("Recent Changes"), _contextMenu.data());
|
||||
// this must be called only once after creating the context menu, or
|
||||
// it will trigger a bug in Ubuntu's SNI bridge patch (11.10, 12.04).
|
||||
_tray->setContextMenu(_contextMenu);
|
||||
_tray->setContextMenu(_contextMenu.data());
|
||||
}
|
||||
_contextMenu->setTitle(Theme::instance()->appNameGUI() );
|
||||
_contextMenu->addAction(_actionOpenoC);
|
||||
|
||||
@ -85,7 +85,7 @@ private:
|
||||
#endif
|
||||
QPointer<LogBrowser>_logBrowser;
|
||||
// tray's menu
|
||||
QMenu *_contextMenu;
|
||||
QScopedPointer<QMenu> _contextMenu;
|
||||
QMenu *_recentActionsMenu;
|
||||
|
||||
QAction *_actionLogin;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user