mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
SocketAPI: rename slot to send UPDATE_VIEW.
This commit is contained in:
parent
d2445ec72d
commit
0e9a08cbbf
Binary file not shown.
@ -49,11 +49,12 @@ FolderMan::FolderMan(QObject *parent) :
|
||||
this, SLOT(slotScheduleSync(const QString&)));
|
||||
|
||||
MirallConfigFile cfg;
|
||||
_socketApi = new SocketApi(this, QUrl::fromLocalFile(cfg.configPathWithAppName().append(QLatin1String("socket"))));
|
||||
|
||||
ne_sock_init();
|
||||
Q_ASSERT(!_instance);
|
||||
_instance = this;
|
||||
|
||||
_socketApi = new SocketApi(this, QUrl::fromLocalFile(cfg.configPathWithAppName().append(QLatin1String("socket"))));
|
||||
}
|
||||
|
||||
FolderMan *FolderMan::instance()
|
||||
@ -429,6 +430,7 @@ void FolderMan::slotScheduleSync( const QString& alias )
|
||||
f->prepareToSync();
|
||||
} else {
|
||||
qDebug() << "Folder is not enabled, not scheduled!";
|
||||
_socketApi->slotUpdateFolderView(f->alias());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,7 +155,6 @@ SyncFileStatus fileStatus(Folder *folder, const QString& fileName )
|
||||
|
||||
}
|
||||
|
||||
|
||||
SocketApi::SocketApi(QObject* parent, const QUrl& localFile)
|
||||
: QObject(parent)
|
||||
, _localServer(0)
|
||||
@ -166,8 +165,9 @@ SocketApi::SocketApi(QObject* parent, const QUrl& localFile)
|
||||
connect(_localServer, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
|
||||
|
||||
// folder watcher
|
||||
connect(FolderMan::instance(), SIGNAL(folderSyncStateChange(QString)), SLOT(slotSyncStateChanged(QString)));
|
||||
connect(ProgressDispatcher::instance(), SIGNAL(jobCompleted(QString,SyncFileItem)), SLOT(slotJobCompleted(QString,SyncFileItem)));
|
||||
connect(FolderMan::instance(), SIGNAL(folderSyncStateChange(QString)), this, SLOT(slotUpdateFolderView(QString)));
|
||||
connect(ProgressDispatcher::instance(), SIGNAL(jobCompleted(QString,SyncFileItem)),
|
||||
SLOT(slotJobCompleted(QString,SyncFileItem)));
|
||||
}
|
||||
|
||||
SocketApi::~SocketApi()
|
||||
@ -222,7 +222,7 @@ void SocketApi::slotReadSocket()
|
||||
}
|
||||
}
|
||||
|
||||
void SocketApi::slotSyncStateChanged(const QString& alias)
|
||||
void SocketApi::slotUpdateFolderView(const QString& alias)
|
||||
{
|
||||
QString msg = QLatin1String("UPDATE_VIEW");
|
||||
|
||||
|
||||
@ -36,11 +36,13 @@ public:
|
||||
SocketApi(QObject* parent, const QUrl& localFile);
|
||||
virtual ~SocketApi();
|
||||
|
||||
public slots:
|
||||
void slotUpdateFolderView(const QString&);
|
||||
|
||||
private slots:
|
||||
void slotNewConnection();
|
||||
void onLostConnection();
|
||||
void slotReadSocket();
|
||||
void slotSyncStateChanged(const QString&);
|
||||
void slotJobCompleted(const QString &, const SyncFileItem &);
|
||||
|
||||
private:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user