Skip to content

Instantly share code, notes, and snippets.

@congdanhqx-zz
Last active December 22, 2015 07:39
Show Gist options
  • Save congdanhqx-zz/6439162 to your computer and use it in GitHub Desktop.
Save congdanhqx-zz/6439162 to your computer and use it in GitHub Desktop.
const char* format(int digit) {
switch (digit) {
case 6:
return "%06d";
case 4:
return "%04d";
case 5:
return "%05d";
case 7:
return "%07d";
case 8:
return "%08d";
case 9:
return "%09d";
default:
return "%06d";
}
}
AccountItem::AccountItem(QObject* parent) :
QObject(parent), m_iId(0), m_iType(0), m_iCounter(0), m_len(0), m_iDigits(6),
m_pSecret(NULL), m_iEnabled(1), m_code("000000"), m_email("") {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment