@@ -159,7 +159,7 @@ void MainWindow::load_config(QString filename) {
159
159
QString key = words.takeFirst () + ' ' + words.takeFirst ();
160
160
161
161
int val = 0 ;
162
- for (const auto &word : qAsConst (words)) {
162
+ for (const auto &word : std::as_const (words)) {
163
163
if (word == " post_clocksync" ) { val |= lsl::post_clocksync; }
164
164
if (word == " post_dejitter" ) { val |= lsl::post_dejitter; }
165
165
if (word == " post_monotonize" ) { val |= lsl::post_monotonize; }
@@ -341,7 +341,7 @@ std::vector<lsl::stream_info> MainWindow::refreshStreams() {
341
341
// Then add knownStreams (only in list if resolved).
342
342
const QBrush good_brush (QColor (0 , 128 , 0 )), bad_brush (QColor (255 , 0 , 0 ));
343
343
ui->streamList ->clear ();
344
- for (auto & m : qAsConst (missingStreams)) {
344
+ for (auto & m : std::as_const (missingStreams)) {
345
345
auto *item = new QListWidgetItem (m, ui->streamList );
346
346
item->setCheckState (Qt::Checked);
347
347
item->setForeground (bad_brush);
@@ -433,7 +433,7 @@ void MainWindow::startRecording() {
433
433
}
434
434
435
435
std::vector<std::string> watchfor;
436
- for (const QString &missing : qAsConst (missingStreams)) {
436
+ for (const QString &missing : std::as_const (missingStreams)) {
437
437
std::string query;
438
438
// Convert missing to query expected by lsl::resolve_stream
439
439
// name='BioSemi' and hostname=AASDFSDF
@@ -595,13 +595,17 @@ QString MainWindow::find_config_file(const char *filename) {
595
595
<< QStandardPaths::standardLocations (QStandardPaths::AppConfigLocation)
596
596
<< QStandardPaths::standardLocations (QStandardPaths::AppDataLocation)
597
597
<< exeInfo.path ();
598
- for (const auto &path : qAsConst (cfgpaths)) {
598
+ for (const auto &path : std::as_const (cfgpaths)) {
599
599
QString cfgfilepath = path + QDir::separator () + defaultCfgFilename;
600
600
qInfo () << cfgfilepath;
601
601
if (QFileInfo::exists (cfgfilepath)) return cfgfilepath;
602
602
}
603
- QMessageBox::warning (this , " No config file not found" ,
604
- QStringLiteral (" No default config file could be found" ), " Continue with default config" );
603
+ QMessageBox msgBox;
604
+ msgBox.setWindowTitle (" Config file not found" );
605
+ msgBox.setText (" Config file not found." );
606
+ msgBox.setInformativeText (" Continuing with default config." );
607
+ msgBox.setStandardButtons (QMessageBox::Ok);
608
+ msgBox.exec ();
605
609
return " " ;
606
610
}
607
611
0 commit comments