void WebPage::finished() { progress(100); if (m_adjustingScheduled) { m_adjustingScheduled = false; mainFrame()->setZoomFactor(mainFrame()->zoomFactor() + 1); mainFrame()->setZoomFactor(mainFrame()->zoomFactor() - 1); } // File scheme watcher if (url().scheme() == QLatin1String("file")) { QFileInfo info(url().toLocalFile()); if (info.isFile()) { if (!m_fileWatcher) { m_fileWatcher = new DelayedFileWatcher(this); connect(m_fileWatcher, SIGNAL(delayedFileChanged(QString)), this, SLOT(watchedFileChanged(QString))); } const QString filePath = url().toLocalFile(); if (QFile::exists(filePath) && !m_fileWatcher->files().contains(filePath)) { m_fileWatcher->addPath(filePath); } } } else if (m_fileWatcher && !m_fileWatcher->files().isEmpty()) { m_fileWatcher->removePaths(m_fileWatcher->files()); } // AdBlock cleanBlockedObjects(); }
GM_Script::GM_Script(GM_Manager* manager, const QString &filePath) : QObject(manager) , m_manager(manager) , m_fileWatcher(new DelayedFileWatcher(this)) , m_namespace("GreaseMonkeyNS") , m_startAt(DocumentEnd) , m_noframes(false) , m_fileName(filePath) , m_enabled(true) , m_valid(false) , m_updating(false) { parseScript(); connect(m_fileWatcher, SIGNAL(delayedFileChanged(QString)), this, SLOT(watchedFileChanged(QString))); }
void AutoFileBackup::fileChanged(const QString &path) { if(!changedFileQueue.contains(path)) { changedFileQueue.append(path); addLog("File added to queue",path); ui->changedFileQueueList->clear(); ui->changedFileQueueList->addItems(changedFileQueue); // qDebug() << "before File Copying " + QTime::currentTime().toString() ; QTimer::singleShot( ui->savingTimeDelaySpinBox->value(), this, SLOT(delayedFileChanged())); // qDebug() << "Finished File Copying " + QTime::currentTime().toString() ; } else addLog("File already in queue",path); }