void DbItemListComboBox::queryCompleted(const QueryResult &result) { hasSelection=lineEdit()->hasSelectedText(); currentTxt=lineEdit()->text(); if(result.hasError){ clear(); addItem(IconUtil::getIcon(iconName), currentTxt); setCurrentIndex(0); emit loadingCompleted(); qDebug() << result.exception.getErrorMessage(); if(!silentMode){ QMessageBox::critical(this->window(), tr("Error loading item list. Task name: %1").arg(result.taskName), result.exception.getErrorMessage()); } return; }else{ setUpdatesEnabled(false); for(int i=count()-1; i>=1; --i){ removeItem(i); } setUpdatesEnabled(true); } if(prependEmptyValue){ addItem(IconUtil::getIcon(iconName), ""); } }
void DbItemListComboBox::fetchCompleted(const QString &) { removeItem(0); WidgetHelper::setComboBoxText(this, currentTxt); if(hasSelection){ lineEdit()->selectAll(); } emit loadingCompleted(); }
GLvoid Qubet::initQubet() { loadDone = true; setFocusPolicy(Qt::StrongFocus); audioManager = new AudioManager(this); connectAudio(this); if (!load()) errorLoading(); else loadingCompleted(); drawTimer = new QTimer(this); connect(drawTimer, SIGNAL(timeout()), this, SLOT(draw())); drawTimer->start(30); }