mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
added signals errorMessage(const QString&) and infoMessage(const QString&) for the DolphinView
svn path=/trunk/KDE/kdebase/apps/; revision=672944
This commit is contained in:
parent
3a053415f9
commit
6dddb2e81c
|
@ -58,8 +58,7 @@ DolphinView::DolphinView(QWidget* parent,
|
|||
KDirLister* dirLister,
|
||||
KDirModel* dirModel,
|
||||
DolphinSortFilterProxyModel* proxyModel,
|
||||
Mode mode,
|
||||
bool showHiddenFiles) :
|
||||
Mode mode) :
|
||||
QWidget(parent),
|
||||
m_active(true),
|
||||
m_blockContentsMovedSignal(false),
|
||||
|
@ -542,15 +541,12 @@ void DolphinView::emitSelectionChangedSignal()
|
|||
void DolphinView::startDirLister(const KUrl& url, bool reload)
|
||||
{
|
||||
if (!url.isValid()) {
|
||||
// TODO: temporary deactivated due to DolphinView/DolphinViewController split
|
||||
|
||||
//const QString location(url.pathOrUrl());
|
||||
//if (location.isEmpty()) {
|
||||
// m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error);
|
||||
//} else {
|
||||
// m_statusBar->setMessage(i18n("The location '%1' is invalid.", location),
|
||||
// DolphinStatusBar::Error);
|
||||
//}
|
||||
const QString location(url.pathOrUrl());
|
||||
if (location.isEmpty()) {
|
||||
emit errorMessage(i18n("The location is empty."));
|
||||
} else {
|
||||
emit errorMessage(i18n("The location '%1' is invalid.", location));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -679,9 +675,6 @@ void DolphinView::setUrl(const KUrl& url)
|
|||
|
||||
startDirLister(url);
|
||||
emit urlChanged(url);
|
||||
|
||||
// TODO: temporary deactivated due to DolphinView/DolphinViewController split
|
||||
//m_statusBar->clear();
|
||||
}
|
||||
|
||||
void DolphinView::changeSelection(const KFileItemList& selection)
|
||||
|
|
|
@ -123,8 +123,7 @@ public:
|
|||
KDirLister* dirLister,
|
||||
KDirModel* dirModel,
|
||||
DolphinSortFilterProxyModel* proxyModel,
|
||||
Mode mode = IconsView,
|
||||
bool showHiddenFiles = false);
|
||||
Mode mode);
|
||||
|
||||
virtual ~DolphinView();
|
||||
|
||||
|
@ -373,6 +372,18 @@ signals:
|
|||
*/
|
||||
void urlsDropped(const KUrl::List& urls, const KUrl& destination);
|
||||
|
||||
/**
|
||||
* Is emitted if an information message with the content \a msg
|
||||
* should be shown.
|
||||
*/
|
||||
void infoMessage(const QString& msg);
|
||||
|
||||
/**
|
||||
* Is emitted if an error message with the content \a msg
|
||||
* should be shown.
|
||||
*/
|
||||
void errorMessage(const QString& msg);
|
||||
|
||||
protected:
|
||||
/** @see QWidget::mouseReleaseEvent */
|
||||
virtual void mouseReleaseEvent(QMouseEvent* event);
|
||||
|
|
|
@ -131,8 +131,7 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
|
|||
m_dirLister,
|
||||
m_dirModel,
|
||||
m_proxyModel,
|
||||
mode,
|
||||
showHiddenFiles);
|
||||
mode);
|
||||
connect(m_view, SIGNAL(urlChanged(const KUrl&)),
|
||||
m_urlNavigator, SLOT(setUrl(const KUrl&)));
|
||||
connect(m_view, SIGNAL(requestContextMenu(KFileItem*, const KUrl&)),
|
||||
|
@ -141,6 +140,10 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
|
|||
m_mainWindow, SLOT(dropUrls(const KUrl::List&, const KUrl&)));
|
||||
connect(m_view, SIGNAL(requestItemInfo(const KUrl&)),
|
||||
this, SLOT(showItemInfo(const KUrl&)));
|
||||
connect(m_view, SIGNAL(errorMessage(const QString&)),
|
||||
this, SLOT(showErrorMessage(const QString&)));
|
||||
connect(m_view, SIGNAL(infoMessage(const QString&)),
|
||||
this, SLOT(showInfoMessage(const QString&)));
|
||||
|
||||
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
|
||||
m_view, SLOT(setUrl(const KUrl&)));
|
||||
|
|
Loading…
Reference in a new issue