MCPcopy Create free account
hub / github.com/Project-LemonLime/Project_LemonLime / loadAction

Method loadAction

src/lemon.cpp:799–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797void LemonLime::openFolderAction() { QDesktopServices::openUrl(QUrl::fromLocalFile(QDir::currentPath())); }
798
799void LemonLime::loadAction() {
800 auto *dialog = new OpenContestDialog(this);
801 dialog->setRecentContest(settings->getRecentContest());
802 QStringList recentContest = dialog->getRecentContest();
803
804 if (dialog->exec() == QDialog::Accepted) {
805 QString selectedContest = dialog->getSelectedContest();
806
807 for (int i = 0; i < recentContest.size(); i++) {
808 if (recentContest[i] == selectedContest) {
809 recentContest.removeAt(i);
810 break;
811 }
812 }
813
814 recentContest.prepend(selectedContest);
815 loadContest(selectedContest);
816 }
817
818 settings->setRecentContest(recentContest);
819 delete dialog;
820}
821
822void LemonLime::getFiles(const QString &path, const QStringList &filters, QMap<QString, QString> &files) {
823 QDir dir(path);

Callers

nothing calls this directly

Calls 4

loadContestFunction · 0.85
setRecentContestMethod · 0.45
getRecentContestMethod · 0.45
getSelectedContestMethod · 0.45

Tested by

no test coverage detected