void WelcomeDialog::verifyAccountDone(bool succeeded, const CString& errorMessage) { if (succeeded) { updateUserSettings(); QDialog::accept(); } else { QMessageBox::critical(this, "", errorMessage); } enableControls(true); }
void WelcomeDialog::verifyAccountDone(bool succeeded, int errorCode, const QString& errorMessage) { if (succeeded) { updateUserSettings(); QDialog::accept(); } else { QString msg; if (errorCode == 3) { msg = tr("Network Error, please check your network connection!\n\nErrorCode: ") + QString::number(errorCode); } else { msg = errorMessage + tr("\n\nErrorCode: ") + QString::number(errorCode); } QMessageBox::critical(this, tr("Verify account failed"), msg); } enableControls(true); }
ComboBox::ComboBox(QWidget *parent) : QComboBox(parent) { setObjectName("ComboBox"); this->blockSignals(true); this->setUpdatesEnabled(false); setFocusPolicy(Qt::StrongFocus); setEditable(false); QStyle* xpStyle = new QWindowsXPStyle(); setStyle(xpStyle); setFont(comboBoxFont); updateUserSettings(); setStyleSheet(QString("QComboBox { font: bold %1px; font-family: %2; padding: 0px 0px 0px 0px}"). arg(comboBoxFont.pointSize()). arg(comboBoxFont.family())); connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePadding(int))); this->setUpdatesEnabled(true); this->blockSignals(false); D_CONSTRUCT(""); }