diff options
| author | Emmanuel Pescosta <[email protected]> | 2013-08-16 20:22:33 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2013-08-16 20:22:33 +0200 |
| commit | 804e83f893d04ce4bed150d4e6bd39db2374d878 (patch) | |
| tree | 0968119e2ca88219d531bd8f5640ca273a8bba24 /src/dolphinmainwindow.cpp | |
| parent | b6477f4e653dc6f04a7413cd1c353fb486421526 (diff) | |
Cut the ropes between DolphinMainWindow and DolphinNewFileMenu. Error handling is now done via signals.
REVIEW: 111989
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 73001bf54..5cc608fd4 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1297,6 +1297,8 @@ void DolphinMainWindow::openContextMenu(const QPoint& pos, { QWeakPointer<DolphinContextMenu> contextMenu = new DolphinContextMenu(this, pos, item, url); contextMenu.data()->setCustomActions(customActions); + connect(contextMenu.data(), SIGNAL(errorMessage(QString)), + this, SLOT(showErrorMessage(QString))); const DolphinContextMenu::Command command = contextMenu.data()->open(); switch (command) { @@ -1482,13 +1484,15 @@ DolphinViewContainer* DolphinMainWindow::createViewContainer(const KUrl& url, QW void DolphinMainWindow::setupActions() { // setup 'File' menu - m_newFileMenu = new DolphinNewFileMenu(this); + m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this); KMenu* menu = m_newFileMenu->menu(); menu->setTitle(i18nc("@title:menu Create new folder, file, link, etc.", "Create New")); menu->setIcon(KIcon("document-new")); m_newFileMenu->setDelayed(false); connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateNewMenu())); + connect(m_newFileMenu, SIGNAL(errorMessage(QString)), + this, SLOT(showErrorMessage(QString))); KAction* newWindow = actionCollection()->addAction("new_window"); newWindow->setIcon(KIcon("window-new")); |
