msu getListOfFiles(os::Path p) { static ull sz = 0; string pstr = p.str(); string prefix = pstr + '/'; if (pstr.empty()) never(1); if (pstr == ".") prefix = ""; msu r; os::Dir d = os::FileSys::readDirEx(p, true, true); sz += d.files.size(); cout << sz << '\r' << std::flush; for ( auto f : d.files ) { if ( f.first[0] == '.' ) continue; r[prefix + f.first] = f.second; } for ( auto f : d.dirs ) { if ( f[0] == '.' ) continue; auto n = getListOfFiles(prefix + f); r.insert(n.begin(), n.end()); } return r; }
sam::mfu sam::getListOfFiles(os::Path p, bool dot) { static ull sz = 0; string pstr = p.str(); string prefix = pstr + '/'; if (pstr.empty()) never(1); if (pstr == ".") prefix = ""; mfu r; os::Dir d = os::FileSys::readDirEx(p, true, true); sz += d.files.size(); cout << sz << '\r' << std::flush; for ( auto f : d.files ) { if ( !dot && f.first[0] == '.' ) continue; string n = prefix + f.first; r[File {prefix, f.first, os::FileSys::mtime(n), ull(f.second)}] = f.second; } for ( auto f : d.dirs ) { if ( !dot && f[0] == '.' ) continue; auto n = getListOfFiles(prefix + f, dot); r.insert(n.begin(), n.end()); } return r; }
AutoFillNotification::AutoFillNotification(const QUrl &url, const PageFormData &formData, const PasswordEntry &updateData) : AnimatedWidget(AnimatedWidget::Down, 300, 0) , ui(new Ui::AutoFillNotification) , m_url(url) , m_formData(formData) , m_updateData(updateData) { setAutoFillBackground(true); setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(widget()); ui->closeButton->setIcon(IconProvider::standardIcon(QStyle::SP_DialogCloseButton)); QString hostPart; QString userPart; if (!url.host().isEmpty()) { hostPart = tr("on %1").arg(url.host()); } if (!m_formData.username.isEmpty()) { userPart = tr("for <b>%1</b>").arg(m_formData.username); } if (m_updateData.isValid()) { ui->label->setText(tr("Do you want QupZilla to update saved password %1?").arg(userPart)); ui->remember->setVisible(false); ui->never->setVisible(false); } else { ui->label->setText(tr("Do you want QupZilla to remember the password %1 %2?").arg(userPart, hostPart)); ui->update->setVisible(false); } connect(ui->update, SIGNAL(clicked()), this, SLOT(update())); connect(ui->remember, SIGNAL(clicked()), this, SLOT(remember())); connect(ui->never, SIGNAL(clicked()), this, SLOT(never())); connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); startAnimation(); }
AutoFillNotification::AutoFillNotification(const QUrl &url, const QByteArray &data, const QString &user, const QString &pass, QWidget* parent) : AnimatedWidget(AnimatedWidget::Down, 300, parent) , ui(new Ui::AutoFillWidget) , m_url(url) , m_data(data) , m_user(user) , m_pass(pass) { setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(widget()); ui->label->setText(tr("Do you want QupZilla to remember the password for <b>%1</b> on %2?").arg(user, url.host())); ui->closeButton->setIcon(IconProvider::standardIcon(QStyle::SP_DialogCloseButton)); connect(ui->remember, SIGNAL(clicked()), this, SLOT(remember())); connect(ui->never, SIGNAL(clicked()), this, SLOT(never())); connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); startAnimation(); }
classifier() : is_trivial(never()), num_trivial(0), taggers(), tag_cloud() {}