本文整理汇总了C++中MirallConfigFile::remotePollInterval方法的典型用法代码示例。如果您正苦于以下问题:C++ MirallConfigFile::remotePollInterval方法的具体用法?C++ MirallConfigFile::remotePollInterval怎么用?C++ MirallConfigFile::remotePollInterval使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MirallConfigFile
的用法示例。
在下文中一共展示了MirallConfigFile::remotePollInterval方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
Folder::Folder(const QString &alias, const QString &path, const QString& secondPath, QObject *parent)
: QObject(parent)
, _path(path)
, _remotePath(secondPath)
, _alias(alias)
, _enabled(true)
, _csyncError(false)
, _csyncUnavail(false)
, _wipeDb(false)
, _proxyDirty(true)
, _journal(path)
, _csync_ctx(0)
{
qsrand(QTime::currentTime().msec());
_timeSinceLastSync.start();
MirallConfigFile cfg;
_syncResult.setStatus( SyncResult::NotYetStarted );
// check if the local path exists
checkLocalPath();
int polltime = cfg.remotePollInterval();
qDebug() << "setting remote poll timer interval to" << polltime << "msec";
_pollTimer.setInterval( polltime );
QObject::connect(&_pollTimer, SIGNAL(timeout()), this, SLOT(slotPollTimerTimeout()));
_pollTimer.start();
_syncResult.setFolder(alias);
}
示例2: QObject
Folder::Folder(const QString &alias, const QString &path, const QString& secondPath, QObject *parent)
: QObject(parent)
, _path(path)
, _secondPath(secondPath)
, _alias(alias)
, _enabled(true)
, _thread(0)
, _csync(0)
, _csyncError(false)
, _csyncUnavail(false)
, _csync_ctx(0)
{
qsrand(QTime::currentTime().msec());
_watcher = new FolderWatcher(path, this);
MirallConfigFile cfg;
_watcher->addIgnoreListFile( cfg.excludeFile(MirallConfigFile::SystemScope) );
_watcher->addIgnoreListFile( cfg.excludeFile(MirallConfigFile::UserScope) );
QObject::connect(_watcher, SIGNAL(folderChanged(const QStringList &)),
SLOT(slotChanged(const QStringList &)));
_syncResult.setStatus( SyncResult::NotYetStarted );
ServerActionNotifier *notifier = new ServerActionNotifier(this);
connect(notifier, SIGNAL(guiLog(QString,QString)), Logger::instance(), SIGNAL(optionalGuiLog(QString,QString)));
connect(this, SIGNAL(syncFinished(SyncResult)), this, SLOT(slotSyncFinished(SyncResult)));
connect(this, SIGNAL(syncFinished(SyncResult)), notifier, SLOT(slotSyncFinished(SyncResult)));
// check if the local path exists
checkLocalPath();
int polltime = cfg.remotePollInterval();
qDebug() << "setting remote poll timer interval to" << polltime << "msec";
_pollTimer.setInterval( polltime );
QObject::connect(&_pollTimer, SIGNAL(timeout()), this, SLOT(slotPollTimerTimeout()));
_pollTimer.start();
_syncResult.setFolder(alias);
}