Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions server/lib/lftmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static void removeBuf(fs_buf *buf, bool &removeLFTFile)
free_fs_buf(buf);
}

bool LFTManager::addPath(QString path, bool autoIndex)
bool LFTManager::AddPath(QString path, bool autoIndex)
{
nDebug() << path << autoIndex;

Expand Down Expand Up @@ -391,7 +391,7 @@ bool LFTManager::addPath(QString path, bool autoIndex)

_global_fsWatcherMap->remove(path);

Q_EMIT addPathFinished(path, buf);
Q_EMIT AddPathFinished(path, buf);
}

if (buf) {
Expand Down Expand Up @@ -610,7 +610,7 @@ QStringList LFTManager::refresh(const QByteArray &serialUriFilter)

if (!checkFSBuf(buf)) {
// 重新生成fs buf
addPath(QString::fromLocal8Bit(get_root_path(buf)), dir_iterator.fileName().endsWith(".lft"));
AddPath(QString::fromLocal8Bit(get_root_path(buf)), dir_iterator.fileName().endsWith(".lft"));
free_fs_buf(buf);

nWarning() << "Failed on check fs buf of: " << lft_file;
Expand Down Expand Up @@ -1137,7 +1137,7 @@ void LFTManager::_indexAll()
continue;

if (!hasLFT(QString::fromLocal8Bit(device->mountPoints().first())))
_addPathByPartition(device);
_AddPathByPartition(device);
else
nDebug() << "Exist index data:" << device->mountPoints().first() << ", block:" << block;
}
Expand Down Expand Up @@ -1169,7 +1169,7 @@ void LFTManager::_cleanAllIndex()
}
}

void LFTManager::_addPathByPartition(const DBlockDevice *block)
void LFTManager::_AddPathByPartition(const DBlockDevice *block)
{
nDebug() << block->device() << block->id() << block->drive();

Expand All @@ -1187,7 +1187,7 @@ void LFTManager::_addPathByPartition(const DBlockDevice *block)
nDebug() << "can index:" << index;

if (index) // 建立索引时一切以第一个挂载点为准
addPath(QString::fromLocal8Bit(block->mountPoints().first()), true);
AddPath(QString::fromLocal8Bit(block->mountPoints().first()), true);

device->deleteLater();
}
Expand All @@ -1213,7 +1213,7 @@ void LFTManager::onMountAdded(const QString &blockDevicePath, const QByteArray &

if (DBlockDevice *block = LFTDiskTool::diskManager()->createBlockPartitionByMountPoint(mountPoint)) {
if (!block->isLoopDevice()) {
_addPathByPartition(block);
_AddPathByPartition(block);
}

block->deleteLater();
Expand Down
6 changes: 3 additions & 3 deletions server/lib/lftmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LFTManager : public QObject, protected QDBusContext
static QStringList logCategoryList();
static QByteArray setCodecNameForLocale(const QByteArray &codecName);

bool addPath(QString path, bool autoIndex = false);
bool AddPath(QString path, bool autoIndex = false);
bool removePath(const QString &path);
bool hasLFT(const QString &path) const;
bool lftBuinding(const QString &path) const;
Expand Down Expand Up @@ -82,7 +82,7 @@ public Q_SLOTS:
void setLogLevel(int logLevel);

Q_SIGNALS:
void addPathFinished(const QString &path, bool success);
void AddPathFinished(const QString &path, bool success);
void autoIndexExternalChanged(bool autoIndexExternal);
void autoIndexInternalChanged(bool autoIndexInternal);

Expand All @@ -99,7 +99,7 @@ public Q_SLOTS:
void _indexAll();
void _indexAllDelay(int time = 10 * 60 * 1000);
void _cleanAllIndex();
void _addPathByPartition(const DBlockDevice *block);
void _AddPathByPartition(const DBlockDevice *block);
void onMountAdded(const QString &blockDevicePath, const QByteArray &mountPoint);
void onMountRemoved(const QString &blockDevicePath, const QByteArray &mountPoint);
void onFSAdded(const QString &blockDevicePath);
Expand Down
4 changes: 2 additions & 2 deletions server/tool/com.deepin.anything.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<method name='allPath'>
<arg type='as' name='pathList' direction='out'/>
</method>
<method name='addPath'>
<method name='AddPath'>
<arg type='s' name='path' direction='in'/>
<arg type='b' name='success' direction='out'/>
</method>
Expand Down Expand Up @@ -93,7 +93,7 @@
</method>
<method name='quit'>
</method>
<signal name="addPathFinished">
<signal name="AddPathFinished">
<arg type="s" name="path"/>
<arg type="b" name="success"/>
</signal>
Expand Down