fix: sidebar umount
This commit is contained in:
parent
f7ff4e1c77
commit
f89af80744
3 changed files with 37 additions and 2 deletions
|
@ -31,6 +31,31 @@ void PathHistory::append(const QUrl &path)
|
|||
m_prevHistory.append(path);
|
||||
}
|
||||
|
||||
QUrl PathHistory::first()
|
||||
{
|
||||
return m_prevHistory.first();
|
||||
}
|
||||
|
||||
QUrl PathHistory::last()
|
||||
{
|
||||
return m_prevHistory.last();
|
||||
}
|
||||
|
||||
QUrl PathHistory::at(int i)
|
||||
{
|
||||
return m_prevHistory.at(i);
|
||||
}
|
||||
|
||||
int PathHistory::count()
|
||||
{
|
||||
return m_prevHistory.count();
|
||||
}
|
||||
|
||||
bool PathHistory::isEmpty()
|
||||
{
|
||||
return m_prevHistory.isEmpty();
|
||||
}
|
||||
|
||||
QUrl PathHistory::posteriorPath()
|
||||
{
|
||||
if (m_postHistory.isEmpty())
|
||||
|
|
|
@ -32,6 +32,14 @@ public:
|
|||
|
||||
void append(const QUrl &path);
|
||||
|
||||
QUrl first();
|
||||
QUrl last();
|
||||
|
||||
QUrl at(int i);
|
||||
int count();
|
||||
|
||||
bool isEmpty();
|
||||
|
||||
QUrl posteriorPath();
|
||||
QUrl previousPath();
|
||||
|
||||
|
|
|
@ -147,7 +147,8 @@ ListView {
|
|||
text: qsTr("Eject")
|
||||
visible: model.isDevice &&
|
||||
!model.setupNeeded &&
|
||||
model.isOpticalDisc
|
||||
model.isOpticalDisc &&
|
||||
!model.url.toString() === "/"
|
||||
|
||||
onTriggered: {
|
||||
placesModel.requestEject(index)
|
||||
|
@ -159,7 +160,8 @@ ListView {
|
|||
text: qsTr("Unmount")
|
||||
visible: model.isDevice &&
|
||||
!model.setupNeeded &&
|
||||
!model.isOpticalDisc
|
||||
!model.isOpticalDisc &&
|
||||
!model.url.toString() === "/"
|
||||
|
||||
onTriggered: {
|
||||
placesModel.requestTeardown(index)
|
||||
|
|
Loading…
Reference in a new issue