fixed one deadlock, langs change name -> username

This commit is contained in:
John Preston 2015-06-29 15:25:28 +03:00
parent ef9aaf659c
commit 9926357af5
7 changed files with 26 additions and 18 deletions

View File

@ -166,11 +166,11 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
"lng_username_title" = "Change username";
"lng_username_about" = "You can choose a username on Telegram.\nIf you do, other people will be able to find\nyou by this username and contact you\nwithout knowing your phone number.\n\nYou can use a-z, 0-9 and underscores.\nMinimum length is 5 characters.";
"lng_username_invalid" = "This name is invalid.";
"lng_username_occupied" = "This name is already occupied.";
"lng_username_too_short" = "This name is too short.";
"lng_username_bad_symbols" = "This name has bad symbols.";
"lng_username_available" = "This name is available.";
"lng_username_invalid" = "This username is invalid.";
"lng_username_occupied" = "This username is already occupied.";
"lng_username_too_short" = "This username is too short.";
"lng_username_bad_symbols" = "This username has bad symbols.";
"lng_username_available" = "This username is available.";
"lng_username_not_found" = "User @{user} not found.";
"lng_settings_section_contact_info" = "Contact info";

View File

@ -961,9 +961,9 @@ btnSend: flatButton(btnDefFlat) {
width: -32px;
height: 46px;
textTop: 13px;
overTextTop: 13px;
downTextTop: 14px;
textTop: 12px;
overTextTop: 12px;
downTextTop: 13px;
font: font(16px);
overFont: font(16px);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 221 KiB

View File

@ -2010,10 +2010,10 @@ ImagePtr HistoryPhoto::replyPreview() {
QString formatSizeText(qint64 size) {
if (size >= 1024 * 1024) { // more than 1 mb
qint64 sizeTenthMb = (size * 10 / (1024 * 1024));
return QString::number(sizeTenthMb / 10) + '.' + QString::number(sizeTenthMb % 10) + qsl("MB");
return QString::number(sizeTenthMb / 10) + '.' + QString::number(sizeTenthMb % 10) + qsl(" MB");
}
qint64 sizeTenthKb = (size * 10 / 1024);
return QString::number(sizeTenthKb / 10) + '.' + QString::number(sizeTenthKb % 10) + qsl("KB");
return QString::number(sizeTenthKb / 10) + '.' + QString::number(sizeTenthKb % 10) + qsl(" KB");
}
QString formatDownloadText(qint64 ready, qint64 total) {

View File

@ -3735,6 +3735,8 @@ void HistoryWidget::sendBotCommand(const QString &cmd, MsgId replyTo) { // reply
hist->lastKeyboardUsed = true;
}
}
_field.setFocus();
}
void HistoryWidget::insertBotCommand(const QString &cmd) {

View File

@ -1198,15 +1198,21 @@ void MTProtoConnectionPrivate::createConn(bool createIPv4, bool createIPv6) {
void MTProtoConnectionPrivate::destroyConn(MTPabstractConnection **conn) {
if (conn) {
QWriteLocker lock(&stateConnMutex);
if (*conn) {
disconnect(*conn, SIGNAL(disconnected()), 0, 0);
disconnect(*conn, SIGNAL(receivedData()), 0, 0);
disconnect(*conn, SIGNAL(receivedSome()), 0, 0);
MTPabstractConnection *toDisconnect = 0;
(*conn)->disconnectFromServer();
(*conn)->deleteLater();
*conn = 0;
{
QWriteLocker lock(&stateConnMutex);
if (*conn) {
toDisconnect = *conn;
disconnect(*conn, SIGNAL(disconnected()), 0, 0);
disconnect(*conn, SIGNAL(receivedData()), 0, 0);
disconnect(*conn, SIGNAL(receivedSome()), 0, 0);
*conn = 0;
}
}
if (toDisconnect) {
toDisconnect->disconnectFromServer();
toDisconnect->deleteLater();
}
} else {
destroyConn(&_conn4);