This commit is contained in:
cora48 2015-03-12 17:27:17 +03:00
parent 545c2d4c45
commit ebf61f1568

View File

@ -3018,7 +3018,8 @@ void nesca_3::saveOptions()
QString loadNescaSetup(char *resStr, char *option) { QString loadNescaSetup(char *resStr, char *option) {
char *lex = NULL; char *lex = NULL
;
if(strstr(resStr, option) != NULL) if(strstr(resStr, option) != NULL)
{ {
lex = strstr(resStr, option) + strlen(option); lex = strstr(resStr, option) + strlen(option);
@ -3029,6 +3030,7 @@ QString loadNescaSetup(char *resStr, char *option) {
return QString(lex); return QString(lex);
} return ""; } return "";
} }
return ""; return "";
} }
void RestoreSession() void RestoreSession()
@ -3196,7 +3198,7 @@ void CreateVerFile()
}; };
} }
char *GetVer() char GetVer()
{ {
int dver = 0; int dver = 0;
int tver = 0; int tver = 0;
@ -3237,13 +3239,9 @@ char *GetVer()
tver += __TIME__[4] - 48; tver += __TIME__[4] - 48;
char db[32] = {0}; char db[32] = {0};
char tb[32] = {0}; sprintf(db, "%X-%X", dver, tver);
sprintf(db, "%X", dver);
strcat(db, "-");
sprintf(tb, "%X", tver);
strcat(db, tb);
return db; return *db;
} }
void nesca_3::slotShowRedVersion() void nesca_3::slotShowRedVersion()
@ -3288,19 +3286,16 @@ void _startMsgCheck()
ui->ircNickBox->setText("nsa_" + QString::number(qrand() % 8999 + 1000)); ui->ircNickBox->setText("nsa_" + QString::number(qrand() % 8999 + 1000));
char rVer[32] = {0}; const char &rVer = GetVer();
strcpy(rVer, GetVer()); QString QVER((const char *)rVer);
QString QVER = QString(rVer); QVER += QString(rVer + 1);
QByteArray ba = QVER.toLatin1(); strcpy(gVER, QVER.toLatin1().data());
strcpy(gVER, ba.data());
ui->logoLabel->setToolTip("v3-" + QVER); ui->logoLabel->setToolTip("v3-" + QVER);
ui->logoLabel->setStyleSheet("color:white; border: none;background-color:black;"); ui->logoLabel->setStyleSheet("color:white; border: none;background-color:black;");
ui->newMessageLabel->setStyleSheet("color:rgba(255, 0, 0, 0);background-color: rgba(2, 2, 2, 0);"); ui->newMessageLabel->setStyleSheet("color:rgba(255, 0, 0, 0);background-color: rgba(2, 2, 2, 0);");
CreateVerFile(); CreateVerFile();
RestoreSession(); RestoreSession();
PhraseLog.push_back(""); PhraseLog.push_back("");
CreateMsgPopupWidget(); CreateMsgPopupWidget();