mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Merge branch 'Applications/18.04'
This commit is contained in:
commit
3c6ecfa246
|
@ -61,9 +61,7 @@ void PlacesItem::setUrl(const QUrl &url)
|
|||
if (dataValue("url").toUrl() != url) {
|
||||
delete m_trashDirLister;
|
||||
if (url.scheme() == QLatin1String("trash")) {
|
||||
QObject::connect(&Trash::instance(), &Trash::emptinessChanged, [this](bool isTrashEmpty){
|
||||
setIcon(isTrashEmpty ? QStringLiteral("user-trash") : QStringLiteral("user-trash-full"));
|
||||
});
|
||||
QObject::connect(&Trash::instance(), &Trash::emptinessChanged, m_signalHandler.data(), &PlacesItemSignalHandler::onTrashEmptinessChanged);
|
||||
}
|
||||
|
||||
setDataValue("url", url);
|
||||
|
|
|
@ -51,3 +51,10 @@ void PlacesItemSignalHandler::onTearDownRequested(const QString& udi)
|
|||
}
|
||||
}
|
||||
|
||||
void PlacesItemSignalHandler::onTrashEmptinessChanged(bool isTrashEmpty)
|
||||
{
|
||||
if (m_item) {
|
||||
m_item->setIcon(isTrashEmpty ? QStringLiteral("user-trash") : QStringLiteral("user-trash-full"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ public slots:
|
|||
|
||||
void onTearDownRequested(const QString& udi);
|
||||
|
||||
void onTrashEmptinessChanged(bool isTrashEmpty);
|
||||
|
||||
signals:
|
||||
void tearDownExternallyRequested(const QString& udi);
|
||||
|
||||
|
|
Loading…
Reference in a new issue