mirror of
https://github.com/linuxdeepin/gio-qt.git
synced 2024-11-10 12:03:46 +01:00
Merge branch 'alter-interface' into 'master'
feat: new interface for eject See merge request dde-v20/gio-qt!1
This commit is contained in:
commit
4c412bb5bf
@ -45,17 +45,17 @@ public:
|
||||
bool isShadowed() const;
|
||||
bool canUnmount() const;
|
||||
bool canEject() const;
|
||||
QString sortKey() const;
|
||||
QStringList themedIconNames() const;
|
||||
QStringList themedSymbolicIconNames() const;
|
||||
|
||||
void unmount(bool forceUnmount = false);
|
||||
void eject(bool forceEject = false);
|
||||
|
||||
QExplicitlySharedDataPointer<DGioFile> getRootFile();
|
||||
QExplicitlySharedDataPointer<DGioFile> getDefaultLocationFile();
|
||||
QExplicitlySharedDataPointer<DGioVolume> getVolume();
|
||||
|
||||
QString getSortKey()const;
|
||||
|
||||
private:
|
||||
QScopedPointer<DGioMountPrivate> d_ptr;
|
||||
|
||||
|
@ -169,6 +169,13 @@ bool DGioMount::canEject() const
|
||||
return d->getGmmMountInstance()->can_eject();
|
||||
}
|
||||
|
||||
QString DGioMount::sortKey() const
|
||||
{
|
||||
Q_D(const DGioMount);
|
||||
|
||||
return QString::fromStdString(d->getGmmMountInstance()->get_sort_key());
|
||||
}
|
||||
|
||||
QStringList DGioMount::themedIconNames() const
|
||||
{
|
||||
Q_D(const DGioMount);
|
||||
@ -194,6 +201,13 @@ void DGioMount::unmount(bool forceUnmount)
|
||||
return d->getGmmMountInstance()->unmount(forceUnmount ? MOUNT_UNMOUNT_FORCE : MOUNT_UNMOUNT_NONE);
|
||||
}
|
||||
|
||||
void DGioMount::eject(bool forceEject)
|
||||
{
|
||||
Q_D(const DGioMount);
|
||||
|
||||
return d->getGmmMountInstance()->eject(forceEject ? MOUNT_UNMOUNT_FORCE : MOUNT_UNMOUNT_NONE);
|
||||
}
|
||||
|
||||
QExplicitlySharedDataPointer<DGioFile> DGioMount::getRootFile()
|
||||
{
|
||||
Q_D(const DGioMount);
|
||||
@ -226,11 +240,3 @@ QExplicitlySharedDataPointer<DGioVolume> DGioMount::getVolume()
|
||||
|
||||
return QExplicitlySharedDataPointer<DGioVolume>(nullptr);
|
||||
}
|
||||
|
||||
QString DGioMount::getSortKey()const
|
||||
{
|
||||
Q_D(const DGioMount);
|
||||
|
||||
return QString::fromStdString(d->getGmmMountInstance()->get_sort_key());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user