comparison installer.cpp @ 100:6dc2c2adae08

No, don't show this dialog - it doesn't get positioned well, and I think it's a bit clumsy
author Chris Cannam
date Fri, 28 Feb 2020 13:21:51 +0000
parents de8552bfeadf
children 31435b4d9833
comparison
equal deleted inserted replaced
99:de8552bfeadf 100:6dc2c2adae08
1081 auto info = getLibraryInfo(*rdfStore, libraries); 1081 auto info = getLibraryInfo(*rdfStore, libraries);
1082 1082
1083 vector<LibraryInfo> toInstall = 1083 vector<LibraryInfo> toInstall =
1084 getUserApprovedPluginLibraries(info, target); 1084 getUserApprovedPluginLibraries(info, target);
1085 1085
1086 if (toInstall.empty()) { // Cancelled, or nothing selected
1087 SVCERR << "No libraries selected for installation, nothing to do"
1088 << endl;
1089 return 0;
1090 }
1091
1086 QProgressDialog progress(QObject::tr("Installing..."), 1092 QProgressDialog progress(QObject::tr("Installing..."),
1087 QObject::tr("Stop"), 0, 1093 QObject::tr("Stop"), 0,
1088 int(toInstall.size()) + 1); 1094 int(toInstall.size()) + 1);
1089 progress.setMinimumDuration(0); 1095 progress.setMinimumDuration(0);
1090 1096
1091 if (toInstall.empty()) { // Cancelled, or nothing selected
1092 SVCERR << "No libraries selected for installation, nothing to do"
1093 << endl;
1094 progress.hide();
1095 QMessageBox::information
1096 (&progress,
1097 QObject::tr("Nothing to do"),
1098 QObject::tr("No libraries selected for installation"),
1099 QMessageBox::Ok,
1100 QMessageBox::Ok);
1101 return 0;
1102 }
1103
1104 int pval = 0; 1097 int pval = 0;
1105 bool complete = true; 1098 bool complete = true;
1106 1099
1107 for (auto lib: toInstall) { 1100 for (auto lib: toInstall) {
1108 progress.setValue(++pval); 1101 progress.setValue(++pval);