MCPcopy Create free account
hub / github.com/Segs/Segs / selectAddressOrReportFailure

Method selectAddressOrReportFailure

Utilities/ServerMonitor/MainWindow.cpp:115–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool MainWindow::selectAddressOrReportFailure(QComboBox *cmb,QString v, bool failedPreviously) {
116 for(int i=0; i<cmb->count(); ++i) {
117 if(cmb->itemText(i)==v) {
118 cmb->setCurrentIndex(i);
119 return false;
120 }
121 }
122 if(!failedPreviously) {
123 QMessageBox::warning(NULL,tr("Config file trouble"),QString(tr("Cannot find previously configured address %1")).arg(v));
124 }
125 if(cmb->count())
126 cmb->setCurrentIndex(0);
127 return true;
128}
129void MainWindow::selectionsFromCfg(QString sel)
130{
131 m_loaded_server_settings = new QSettings(sel,QSettings::IniFormat);

Callers

nothing calls this directly

Calls 1

QStringClass · 0.50

Tested by

no test coverage detected