mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
37 lines
826 B
C++
37 lines
826 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz@gmx.at>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#include "dolphinnewfilemenu.h"
|
|
|
|
#include "views/dolphinnewfilemenuobserver.h"
|
|
|
|
#include <KIO/Job>
|
|
|
|
#include <QAction>
|
|
|
|
DolphinNewFileMenu::DolphinNewFileMenu(QAction *createDirAction, QObject *parent)
|
|
: KNewFileMenu(parent)
|
|
{
|
|
setNewFolderShortcutAction(createDirAction);
|
|
DolphinNewFileMenuObserver::instance().attach(this);
|
|
}
|
|
|
|
DolphinNewFileMenu::~DolphinNewFileMenu()
|
|
{
|
|
DolphinNewFileMenuObserver::instance().detach(this);
|
|
}
|
|
|
|
void DolphinNewFileMenu::slotResult(KJob *job)
|
|
{
|
|
if (job->error() && job->error() != KIO::ERR_USER_CANCELED) {
|
|
Q_EMIT errorMessage(job->errorString());
|
|
} else {
|
|
KNewFileMenu::slotResult(job);
|
|
}
|
|
}
|
|
|
|
#include "moc_dolphinnewfilemenu.cpp"
|